actions.py 1.6 KB

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