actions.py 1.6 KB

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