actions.py 2.2 KB

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