actions.py 1.2 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. from pisi.actionsapi import shelltools
  10. shelltools.export("JOBS", get.makeJOBS().replace("-j", ""))
  11. def setup():
  12. options = "--builtin-libraries=replace \
  13. --bundled-libraries=NONE \
  14. --disable-rpath \
  15. "
  16. if get.buildTYPE() == "_emul32":
  17. shelltools.export("CC", "%s -m32" % get.CC())
  18. shelltools.export("CXX", "%s -m32" % get.CXX())
  19. shelltools.export("PKG_CONFIG_PATH", "/usr/lib32/pkgconfig")
  20. options += " --libdir=/usr/lib32 \
  21. --bindir=/usr/bin32 \
  22. --disable-python \
  23. "
  24. else: shelltools.export("LDFLAGS", "-lpthread")
  25. autotools.configure(options)
  26. def build():
  27. shelltools.system("make")
  28. def install():
  29. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  30. if get.buildTYPE() == "_emul32":
  31. pisitools.removeDir("usr/bin32")
  32. return
  33. pisitools.dodoc("docs/README")