actions.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 shelltools
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import libtools
  10. from pisi.actionsapi import get
  11. WorkDir = "ZenLib/Project/GNU/Library"
  12. def setup():
  13. libtools.libtoolize("--automake")
  14. autotools.aclocal()
  15. autotools.automake("-afc")
  16. autotools.autoconf()
  17. autotools.configure("--disable-static --enable-shared")
  18. def build():
  19. autotools.make()
  20. def install():
  21. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  22. pisitools.dosed("libzen.pc", "^(Version:).*", r"\1 %s" % get.srcVERSION())
  23. pisitools.dosed("libzen.pc", "^Libs_Static.*$")
  24. pisitools.dodir("/usr/lib/pkgconfig")
  25. pisitools.insinto("/usr/lib/pkgconfig", "libzen.pc")
  26. shelltools.cd("../../../")
  27. pisitools.dodoc("*.txt")
  28. shelltools.cd("Source/ZenLib")
  29. pisitools.dodir("/usr/include/ZenLib")
  30. pisitools.insinto("/usr/include/ZenLib", "*.h")
  31. for it in ["HTTP_Client", "Format/Html", "Format/Http"]:
  32. pisitools.dodir("/usr/include/ZenLib/%s" % it)
  33. pisitools.insinto("/usr/include/ZenLib/%s" % it, "%s/*.h" % it)