actions.py 722 B

123456789101112131415161718192021222324
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file https://www.gnu.org/licenses/gpl-3.0.txt
  6. from pisi.actionsapi import shelltools, pisitools
  7. i = ''.join([
  8. ' -DHAVE_STRING_H=1',
  9. ' -DHAVE_UNISTD_H=1',
  10. ' -DSTDC_HEADERS=1 '
  11. ])
  12. def build():
  13. shelltools.system("gcc -fPIC -c termcap.c %s" % i)
  14. shelltools.system("gcc -fPIC -c tparam.c %s" % i)
  15. shelltools.system("gcc -fPIC -c version.c %s" % i)
  16. shelltools.system("gcc -shared -Wl,-soname,'libtermcap.so' -o 'libtermcap.so.1.3.1' 'termcap.o' tparam.o version.o")
  17. def install():
  18. pisitools.dolib_so("libtermcap.so.1.3.1")
  19. pisitools.dosym("libtermcap.so.1.3.1", "/usr/lib/libtermcap.so")