actions.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. def setup():
  11. options = "--with-module-path=/usr/lib/pkcs11 \
  12. "
  13. if get.buildTYPE() == "emul32":
  14. options += "--sysconfdir=/usr/emul32/etc \
  15. --bindir=/usr/emul32/bin \
  16. --libdir=/usr/lib32 \
  17. --datadir=/usr/emul32/share \
  18. --with-module-path=/usr/lib32/pkcs11 \
  19. --libexecdir=/usr/emul32/libexec"
  20. shelltools.export("CC", "%s -m32" % get.CC())
  21. shelltools.export("CXX", "%s -m32" % get.CXX())
  22. shelltools.export("PKG_CONFIG_PATH", "/usr/lib32/pkgconfig")
  23. autotools.configure(options)
  24. def build():
  25. autotools.make()
  26. def install():
  27. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  28. if get.buildTYPE() == "emul32":
  29. pisitools.removeDir("/usr/emul32")
  30. return
  31. pisitools.dodoc("AUTHORS", "ChangeLog", "COPYING", "README")