actions.py 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file http://www.gnu.org/licenses/gpl.txt
  6. from pisi.actionsapi import autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import get
  10. sd = "shared"
  11. def setup():
  12. shelltools.makedirs(sd)
  13. shelltools.cd(sd)
  14. shelltools.sym("libcompface.so", "libcompface.so.1")
  15. shelltools.sym("libcompface.so.1.0.0", "libcompface.so")
  16. def build():
  17. shelltools.cd(sd)
  18. autotools.make('-f ../Makefile \
  19. VPATH=".." \
  20. srcdir=".." \
  21. LDFLAGS="-lc" \
  22. CFLAGS="%s -L%s -fPIC -pipe -D_BSD_SOURCE -D_REENTRANT" \
  23. shared' % (get.CFLAGS(), sd))
  24. shelltools.cd("..")
  25. autotools.make()
  26. def install():
  27. pisitools.dolib_so("%s/libcompface.so.1.0.0" % sd)
  28. pisitools.dosym("libcompface.so.1.0.0", "/usr/lib/libcompface.so.1")
  29. pisitools.dosym("libcompface.so.1", "/usr/lib/libcompface.so")
  30. pisitools.insinto("/usr/include", "compface.h")
  31. for f in ["xbm2xface.pl", "compface", "uncompface"]:
  32. pisitools.dobin(f)
  33. for f in ["compface.1", "compface.3"]:
  34. pisitools.doman(f)
  35. pisitools.dodoc("ChangeLog", "README")