actions.py 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 get
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import shelltools
  10. LOGO_FILE = "/usr/share/pixmaps/plymouth-pisilinux.png"
  11. THEMEPATH = "/usr/share/plymouth/themes"
  12. def setup():
  13. pisitools.ldflags.add(" -ludev ")
  14. # /var/run => /run
  15. pisitools.dosed("configure.ac", "^(\s+plymouthruntimedir=)\$localstatedir(\/run\/plymouth)", r"\1\2")
  16. pisitools.dosed("src/Makefile.am", "^(plymouthdrundir\s=\s)\$\(localstatedir\)(\/run\/plymouth)", r"\1\2")
  17. autotools.autoreconf("-fis")
  18. # The end-start colors seems to be used by the two-step plugin
  19. # Disable nouveau drm renderer as it causes hangs when starting X server
  20. autotools.configure("--enable-tracing \
  21. --with-logo=%s \
  22. --with-release-file=/etc/pisilinux-release \
  23. --with-background-color=0x000000 \
  24. --with-background-end-color-stop=0x000000 \
  25. --with-background-start-color-stop=0x000000 \
  26. --with-system-root-install \
  27. --with-boot-tty=/dev/tty7 \
  28. --with-shutdown-tty=/dev/tty1 \
  29. --with-log-viewer \
  30. --disable-libdrm_nouveau \
  31. --disable-systemd-integration \
  32. --disable-tests \
  33. --disable-static \
  34. --enable-gdm-transition \
  35. --without-rhgb-compat-link" % LOGO_FILE)
  36. def build():
  37. autotools.make()
  38. def install():
  39. autotools.rawInstall("DESTDIR='%s'" % get.installDIR())
  40. # Copy necessary files for Charge theme
  41. pisitools.dodir("%s/charge" % THEMEPATH)
  42. for f in ("box", "bullet", "entry", "lock"):
  43. shelltools.copy("%s%s/glow/%s.png" % (get.installDIR(), THEMEPATH, f), "%s%s/charge/" % (get.installDIR(), THEMEPATH))
  44. # Remove glow theme as it's premature
  45. pisitools.removeDir("/usr/share/plymouth/themes/glow")
  46. # Generate initramfs filelist
  47. #shelltools.system("./generate-flist %s" % get.installDIR())
  48. pisitools.dodoc("TODO", "COPYING", "README", "ChangeLog")