actions.py 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 libtools
  8. from pisi.actionsapi import autotools
  9. from pisi.actionsapi import pisitools
  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. autotools.autoreconf("-vif")
  14. autotools.configure("--enable-jit \
  15. --libdir=%s \
  16. --bindir=%s \
  17. --enable-pcretest-libreadline \
  18. --enable-pcre32 \
  19. --enable-pcre16 \
  20. --enable-utf \
  21. --enable-unicode-properties \
  22. --enable-cpp \
  23. --docdir=/%s/%s \
  24. --disable-static" % (LIBDIR, bindir, get.docDIR(), get.srcNAME()))
  25. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  26. def build():
  27. autotools.make()
  28. def check():
  29. if get.buildTYPE() == "emul32":
  30. pass
  31. else:
  32. autotools.make("-j1 check")
  33. def install():
  34. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  35. if get.buildTYPE() == "emul32":
  36. pisitools.removeDir("/usr/bin32")
  37. return