actions.py 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 pisitools
  8. from pisi.actionsapi import cmaketools
  9. from pisi.actionsapi import shelltools
  10. from pisi.actionsapi import pythonmodules
  11. WorkDir="brotli-%s" % get.srcVERSION()
  12. def setup():
  13. shelltools.cd("..")
  14. shelltools.makedirs("build_python3")
  15. shelltools.copytree("./%s" % WorkDir, "build_python3")
  16. shelltools.cd(WorkDir)
  17. cmaketools.configure("-DCMAKE_INSTALL_PREFIX=/usr \
  18. -DCMAKE_INSTALL_LIBDIR=/usr/lib \
  19. -DCMAKE_BUILD_TYPE=Release")
  20. def build():
  21. cmaketools.make()
  22. shelltools.cd("../build_python3/%s" % WorkDir)
  23. # fix unused direct dependency analysis
  24. shelltools.export("LDSHARED", "x86_64-pc-linux-gnu-gcc -Wl,-O1,--as-needed -shared -lpthread -lbz2 -ldl")
  25. pythonmodules.compile(pyVer="3")
  26. def check():
  27. cmaketools.make("test")
  28. #shelltools.cd("../build_python3/%s" % WorkDir)
  29. #pythonmodules.run("setup.py test", pyVer="3")
  30. def install():
  31. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  32. #pisitools.dodoc("LICENSE*")
  33. shelltools.cd("../build_python3/%s" % WorkDir)
  34. pythonmodules.install(pyVer="3")