actions.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 cmaketools
  7. from pisi.actionsapi import shelltools
  8. from pisi.actionsapi import autotools
  9. from pisi.actionsapi import pisitools
  10. from pisi.actionsapi import get
  11. def setup():
  12. # fix unittest error
  13. pisitools.dosed("tests/unittests/torture_misc.c", "cmocka_unit_test\(torture_path_expand_tilde_unix\),", "")
  14. pisitools.dosed("tests/unittests/CMakeLists.txt", "torture_config", "")
  15. shelltools.makedirs("build")
  16. shelltools.cd("build")
  17. cmaketools.configure("-DCMAKE_INSTALL_LIBDIR=lib \
  18. -DCMAKE_BUILD_TYPE=Release \
  19. -DUNIT_TESTING=ON \
  20. -DWITH_NACL=OFF \
  21. -DWITH_GSSAPI=OFF", sourceDir="..")
  22. def build():
  23. shelltools.cd("build")
  24. cmaketools.make()
  25. autotools.make("docs")
  26. def check():
  27. shelltools.cd("build")
  28. autotools.make("test")
  29. def install():
  30. shelltools.cd("build")
  31. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  32. #pisitools.doman("doc/man/*/*")
  33. pisitools.dohtml("doc/html/*")
  34. shelltools.cd("..")
  35. pisitools.dodoc("COPYING", "README*")