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/copyleft/gpl.txt.
  6. from pisi.actionsapi import autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import get
  10. def setup():
  11. options = "--prefix=/usr \
  12. --sysconfdir=/etc"
  13. if get.buildTYPE() == "_emul32":
  14. options += " --libdir=/usr/lib32 \
  15. --bindir=/_emul32/bin \
  16. --sbindir=/_emul32/sbin \
  17. --disable-dtrace"
  18. shelltools.export("CC", "%s -m32" % get.CC())
  19. shelltools.export("CXX", "%s -m32" % get.CXX())
  20. shelltools.export("PKG_CONFIG_PATH", "/usr/lib32/pkgconfig")
  21. autotools.configure(options)
  22. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  23. def build():
  24. autotools.make()
  25. def install():
  26. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  27. pisitools.dodoc("AUTHORS", "ChangeLog", "COPYING*", "README")