actions.py 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  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 get
  9. from pisi.actionsapi import shelltools
  10. def setup():
  11. options = "--disable-aload"
  12. if get.buildTYPE() == "emul32":
  13. options += " --disable-python"
  14. shelltools.export("CFLAGS", "%s -m32" % get.CFLAGS())
  15. autotools.autoreconf("-fi")
  16. autotools.configure(options)
  17. pisitools.dosed("libtool", " -shared ", " -Wl,--as-needed -shared ")
  18. # rpath fix
  19. pisitools.dosed("libtool", "^hardcode_libdir_flag_spec=.*", "hardcode_libdir_flag_spec=\"\"")
  20. pisitools.dosed("libtool", "^runpath_var=LD_RUN_PATH", "runpath_var=DIE_RPATH_DIE")
  21. def build():
  22. autotools.make()
  23. def install():
  24. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  25. if get.buildTYPE() == "emul32": return
  26. pisitools.dodoc("ChangeLog", "TODO", "COPYING", "doc/*.txt")