actions.py 1007 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 2.
  5. # See the file http://www.gnu.org/copyleft/gpl.txt.
  6. from pisi.actionsapi import mesontools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import get
  10. def setup():
  11. shelltools.system("sed 's@/bin/sh@/bin/sh -l@' -i gnome-session/gnome-session.in")
  12. # shelltools.system("""sed -i "/ systemd_dep/,+3d;/if enable_systemd/a \ systemd_userunitdir = '/tmp\'" meson.build""")
  13. mesontools.configure("--buildtype=release \
  14. -Dsystemduserunitdir=/tmp")
  15. def build():
  16. mesontools.build()
  17. def install():
  18. mesontools.install()
  19. # lfs
  20. # shelltools.system("sed -e 's@^Exec=@&/usr/bin/dbus-run-session @' \
  21. # -i %s/usr/share/wayland-sessions/gnome-wayland.desktop" % get.installDIR())
  22. pisitools.removeDir("/tmp")
  23. #shelltools.system("rm -rv %s/tmp/{*.d,*.target,*.service}" % get.installDIR())