actions.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. def setup():
  11. # Forcibly prevent detection of shm_open (which then picks up but
  12. # does not use -lrt).
  13. shelltools.system("./buildconf")
  14. shelltools.export("ac_cv_search_shm_open", "no")
  15. autotools.configure("--disable-static \
  16. --includedir=/usr/include/apr-1 \
  17. --with-installbuilddir=/usr/lib/apr-1/build \
  18. --with-devrandom=/dev/urandom \
  19. --enable-nonportable-atomics --without-sendfile")
  20. # Make it use system's libtool
  21. pisitools.dosed("build/apr_rules.mk", "\$\(apr_builddir\)\/libtool", "/usr/bin/libtool")
  22. pisitools.dosed("apr-1-config", "\$\{installbuilddir\}\/libtool", "/usr/bin/libtool")
  23. # fix unused-direct-shlib-dependency
  24. pisitools.dosed("libtool", "( -shared )", " -Wl,-O1,--as-needed\\1")
  25. def build():
  26. autotools.make()
  27. #def check():
  28. #autotools.make("check")
  29. def install():
  30. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  31. # Trim exported dependencies
  32. pisitools.dosed("%s/usr/lib/pkgconfig/*.pc" % get.installDIR(), "-luuid -lcrypt", "")
  33. pisitools.dosed("%s/usr/bin/apr-1-config" % get.installDIR(), "-luuid -lcrypt", "")
  34. # Install find_apr.m4
  35. pisitools.dodir("/usr/share/aclocal")
  36. pisitools.insinto("/usr/share/aclocal", "build/find_apr.m4")
  37. pisitools.dodoc("CHANGES", "LICENSE", "NOTICE")