actions.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 pisitools
  7. from pisi.actionsapi import cmaketools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import get
  10. def setup():
  11. shelltools.system("""sed -i 's|Fancy GNU/Linux 2020.2 LTS "Turgid Tuba"|Pisi GNU/Linux 2.3.4 LTS "Pisi Linux"|g' src/branding/default/branding.desc""")
  12. shelltools.system("sed -i 's|2020.2|2.3.4|g' src/branding/default/branding.desc")
  13. shelltools.system("sed -i 's|FancyGL|Pisilinux|g' src/branding/default/branding.desc")
  14. shelltools.makedirs("build")
  15. shelltools.cd("build")
  16. cmaketools.configure("-DCMAKE_BUILD_TYPE=Debug \
  17. -DCMAKE_INSTALL_PREFIX=/usr \
  18. -DCMAKE_INSTALL_LIBDIR=lib \
  19. -DWITH_PYTHONQT=OFF \
  20. -DINSTALL_CONFIG=ON \
  21. -DWITH_QT6=ON \
  22. -DWITH_QT5=OFF \
  23. -DWITH_KF5DBus=OFF \
  24. -DWITH_CRASHREPORTER=ON", \
  25. sourceDir=".." )
  26. def build():
  27. shelltools.cd("build")
  28. cmaketools.make()
  29. def install():
  30. shelltools.cd("build")
  31. cmaketools.install()
  32. #pisitools.insinto("/usr/share/calamares", "../settings.conf")
  33. #pisitools.insinto("/usr/share/calamares/modules", "src/modules/machineid/machineid.conf")
  34. #dbus configuration for pisi
  35. pisitools.dosed("%s/usr/share/calamares/modules/machineid.conf" % get.installDIR(), "systemd: true", "systemd: false")
  36. pisitools.dosed("%s/usr/share/calamares/modules/machineid.conf" % get.installDIR(), "symlink: true", "symlink: false")
  37. pisitools.dodoc("../README.*")