actions.py 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 get
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. Libdir = "/usr/lib32" if get.buildTYPE() == "emul32" else "/usr/lib"
  10. def setup():
  11. python = "--without-python" if get.buildTYPE() == "emul32" else "--with-python=/usr/bin/python2.7 "
  12. # don't remove --with-debugger as it is needed for reverse dependencies
  13. autotools.configure("%s \
  14. --with-crypto \
  15. --with-debugger \
  16. --disable-static \
  17. --includedir=/usr/include \
  18. --with-xz \
  19. --with-zlib \
  20. --disable-silent-rules \
  21. " % python)
  22. pisitools.dosed("libtool", "^(hardcode_libdir_flag_spec=).*", '\\1""')
  23. pisitools.dosed("libtool", "^(runpath_var=)LD_RUN_PATH", "\\1DIE_RPATH_DIE")
  24. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  25. def build():
  26. autotools.make()
  27. #def check():
  28. # autotools.make("check")
  29. def install():
  30. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  31. pisitools.dodoc("AUTHORS", "ChangeLog", "Copyright", "FEATURES", "NEWS", "README", "TODO")