actions.py 907 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file https://www.gnu.org/licenses/gpl-3.0.txt
  6. from pisi.actionsapi import shelltools
  7. from pisi.actionsapi import cmaketools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import get
  10. j = "-DCMAKE_INSTALL_PREFIX=/usr \
  11. -DCMAKE_BUILD_TYPE=RELEASE \
  12. -DCMAKE_THREAD_LIBS_INIT='-lpthread' \
  13. -DCMAKE_HAVE_THREADS_LIBRARY=ON \
  14. -DCMAKE_USE_PTHREADS_INIT=ON \
  15. -DBUILD_TESTING=OFF \
  16. -B_build -LA \
  17. "
  18. def setup():
  19. shelltools.export("CC", "clang")
  20. shelltools.export("CXX", "clang++")
  21. cmaketools.configure(j)
  22. def build():
  23. shelltools.cd("_build")
  24. cmaketools.make()
  25. def install():
  26. shelltools.cd("_build")
  27. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  28. pisitools.dodoc("../CONTRIBUTING.md", "../INSTALL.md", "../README.md", "../TESTING.md")