actions.py 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. -DQT6=ON \
  23. -DQCA_SUFFIX=qt6 \
  24. -DOPENSSL_CRYPTO_LIBRARY=/usr/lib/libcrypto.so", sourceDir="..")
  25. def build():
  26. shelltools.cd("build")
  27. cmaketools.make()
  28. def install():
  29. shelltools.cd("build")
  30. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  31. for bin in shelltools.ls("%s/usr/lib/qt6/bin" % get.installDIR()):
  32. pisitools.dosym("/usr/lib/qt6/bin/%s" % bin, "/usr/bin/%s" % bin)
  33. shelltools.cd("..")
  34. pisitools.dodoc("README", "TODO", "COPYING")
  35. #pisitools.domove("/usr/share/qt5/man/man1/qcatool-qt5.1", "/usr/share/man/man1/qcatool-qt5.1")
  36. #pisitools.removeDir("/usr/share/qt5")