actions.py 1.4 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/copyleft/gpl.txt.
  6. from pisi.actionsapi import autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import get
  9. from pisi.actionsapi import cmaketools
  10. from pisi.actionsapi import shelltools
  11. def setup():
  12. shelltools.system("sed -i 's@ca-bundle.pem@ca-bundle.crt@' CMakeLists.txt")
  13. shelltools.makedirs("build")
  14. shelltools.cd("build")
  15. cmaketools.configure("-DCMAKE_INSTALL_PREFIX=/usr \
  16. -DCMAKE_BUILD_TYPE=Release \
  17. -DBUILD_TESTS=OFF \
  18. -DQCA_INSTALL_IN_QT_PREFIX=ON \
  19. -DQCA_MAN_INSTALL_DIR=/usr/share/man \
  20. -DOPENSSL_INCLUDE_DIR=/usr/include/openssl \
  21. -DOPENSSL_SSL_LIBRARY=/usr/lib/libssl.so \
  22. -DQCA_SUFFIX=qt5 \
  23. -DOPENSSL_CRYPTO_LIBRARY=/usr/lib/libcrypto.so", sourceDir="..")
  24. def build():
  25. shelltools.cd("build")
  26. cmaketools.make()
  27. def install():
  28. shelltools.cd("build")
  29. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  30. shelltools.cd("..")
  31. pisitools.dodoc("README", "TODO", "COPYING")
  32. #pisitools.domove("/usr/share/qt5/man/man1/qcatool-qt5.1", "/usr/share/man/man1/qcatool-qt5.1")
  33. #pisitools.removeDir("/usr/share/qt5")