actions.py 957 B

123456789101112131415161718192021222324252627282930
  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 cmaketools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import kde6, qt6
  10. from pisi.actionsapi import get
  11. def setup():
  12. pisitools.dosed("tools/testapp/main.cpp", "#include <QApplication>", "#include <qt6/QtWidgets/QApplication>")
  13. shelltools.system("sed -e '/tests/d' -i CMakeLists.txt")
  14. # shelltools.system("sed -e '/tools/d' -i CMakeLists.txt")
  15. cmaketools.configure("-B build -DCMAKE_INSTALL_PREFIX=/usr \
  16. -DUSE_QT6=ON \
  17. -DUSE_QT5=OFF")
  18. def build():
  19. shelltools.cd("build")
  20. cmaketools.make()
  21. def install():
  22. shelltools.cd("build")
  23. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  24. pisitools.dodoc("COPYING", "NEWS", "README")