summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/psplash/psplash_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/psplash/psplash_git.bb')
-rw-r--r--meta/recipes-core/psplash/psplash_git.bb88
1 files changed, 49 insertions, 39 deletions
diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb
index aab2c0360d..40937098e6 100644
--- a/meta/recipes-core/psplash/psplash_git.bb
+++ b/meta/recipes-core/psplash/psplash_git.bb
@@ -2,26 +2,28 @@ SUMMARY = "Userspace framebuffer boot logo based on usplash"
DESCRIPTION = "PSplash is a userspace graphical boot splash screen for mainly embedded Linux devices supporting a 16bpp or 32bpp framebuffer. It has few dependencies (just libc), supports basic images and text and handles rotation. Its visual look is configurable by basic source changes. Also included is a 'client' command utility for sending information to psplash such as boot progress information."
HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/psplash"
SECTION = "base"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://psplash.h;beginline=1;endline=16;md5=840fb2356b10a85bed78dd09dc7745c6"
+LICENSE = "GPL-2.0-or-later"
+LIC_FILES_CHKSUM = "file://psplash.h;beginline=1;endline=8;md5=8f232c1e95929eacab37f00900580224"
+DEPENDS = "gdk-pixbuf-native"
-SRCREV = "2015f7073e98dd9562db0936a254af5ef56356cf"
-PV = "0.1+git${SRCPV}"
-PR = "r15"
+SRCREV = "ecc1913756698d0c87ad8fa10e44b29537f09ad1"
+PV = "0.1+git"
-SRC_URI = "git://git.yoctoproject.org/${BPN} \
+SRC_URI = "git://git.yoctoproject.org/${BPN};branch=master;protocol=https \
file://psplash-init \
+ file://psplash-start.service \
+ file://psplash-systemd.service \
${SPLASH_IMAGES}"
UPSTREAM_CHECK_COMMITS = "1"
-SPLASH_IMAGES = "file://psplash-poky-img.h;outsuffix=default"
+SPLASH_IMAGES = "file://psplash-poky-img.png;outsuffix=default"
python __anonymous() {
oldpkgs = d.getVar("PACKAGES").split()
splashfiles = d.getVar('SPLASH_IMAGES').split()
+ mlprefix = d.getVar('MLPREFIX') or ''
pkgs = []
localpaths = []
- haspng = False
for uri in splashfiles:
fetcher = bb.fetch2.Fetch([uri], d)
flocal = os.path.basename(fetcher.localpath(uri))
@@ -39,53 +41,56 @@ python __anonymous() {
bb.fatal("The output name '%s' derived from the URI %s is not valid, please specify the outsuffix parameter" % (outname, uri))
else:
pkgs.append(outname)
- if flocal.endswith(".png"):
- haspng = True
localpaths.append(flocal)
- # Set these so that we have less work to do in do_compile and do_install_append
+ # Set these so that we have less work to do in do_compile and do_install:append
d.setVar("SPLASH_INSTALL", " ".join(pkgs))
d.setVar("SPLASH_LOCALPATHS", " ".join(localpaths))
+ for p in pkgs:
+ d.prependVar("PACKAGES", "%s%s " % (mlprefix, p))
- if haspng:
- d.appendVar("DEPENDS", " gdk-pixbuf-native")
-
- d.prependVar("PACKAGES", "%s " % (" ".join(pkgs)))
- mlprefix = d.getVar('MLPREFIX') or ''
pn = d.getVar('PN') or ''
for p in pkgs:
ep = '%s%s' % (mlprefix, p)
epsplash = '%s%s' % (mlprefix, 'psplash')
- d.setVar("FILES_%s" % ep, "${bindir}/%s" % p)
- d.setVar("ALTERNATIVE_%s" % ep, 'psplash')
+ d.setVar("FILES:%s" % ep, "${bindir}/%s" % p)
+ d.setVar("ALTERNATIVE:%s" % ep, 'psplash')
d.setVarFlag("ALTERNATIVE_TARGET_%s" % ep, 'psplash', '${bindir}/%s' % p)
- d.appendVar("RDEPENDS_%s" % ep, " %s" % pn)
+ d.appendVar("RDEPENDS:%s" % ep, " %s" % pn)
if p == "psplash-default":
- d.appendVar("RRECOMMENDS_%s" % pn, " %s" % ep)
+ d.appendVar("RDEPENDS:%s" % pn, " %s" % ep)
}
S = "${WORKDIR}/git"
-inherit autotools pkgconfig update-rc.d update-alternatives
+inherit autotools pkgconfig update-rc.d update-alternatives systemd
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} progress-bar fullscreen"
+
+PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd"
+PACKAGECONFIG[fullscreen] = "--enable-img-fullscreen"
+PACKAGECONFIG[startup-msg] = ",--disable-startup-msg"
+PACKAGECONFIG[progress-bar] = ",--disable-progress-bar"
ALTERNATIVE_PRIORITY = "100"
ALTERNATIVE_LINK_NAME[psplash] = "${bindir}/psplash"
python do_compile () {
import shutil
+ import subprocess
# Build a separate executable for each splash image
workdir = d.getVar('WORKDIR')
convertscript = "%s/make-image-header.sh" % d.getVar('S')
- destfile = "%s/psplash-poky-img.h" % d.getVar('S')
+ destfile = "%s/psplash-poky-img.h" % d.getVar('B')
localfiles = d.getVar('SPLASH_LOCALPATHS').split()
outputfiles = d.getVar('SPLASH_INSTALL').split()
for localfile, outputfile in zip(localfiles, outputfiles):
if localfile.endswith(".png"):
- outp = oe.utils.getstatusoutput('%s %s POKY' % (convertscript, os.path.join(workdir, localfile)))
- print(outp[1])
+ if subprocess.call([ convertscript, os.path.join(workdir, localfile), 'POKY' ], cwd=workdir):
+ bb.fatal("Error calling convert script '%s'" % (convertscript))
fbase = os.path.splitext(localfile)[0]
- shutil.copyfile("%s-img.h" % fbase, destfile)
+ shutil.copyfile(os.path.join(workdir, "%s-img.h" % fbase), destfile)
else:
shutil.copyfile(os.path.join(workdir, localfile), destfile)
# For some reason just updating the header is not enough, we have to touch the .c
@@ -95,10 +100,22 @@ python do_compile () {
shutil.copyfile("psplash", outputfile)
}
-do_install_append() {
- install -d ${D}/mnt/.psplash/
- install -d ${D}${sysconfdir}/init.d/
- install -m 0755 ${WORKDIR}/psplash-init ${D}${sysconfdir}/init.d/psplash.sh
+do_install:append() {
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/init.d/
+ install -m 0755 ${WORKDIR}/psplash-init ${D}${sysconfdir}/init.d/psplash.sh
+
+ # make fifo for psplash
+ install -d ${D}/mnt
+ mkfifo ${D}/mnt/psplash_fifo
+ fi
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${systemd_system_unitdir}
+ install -m 644 ${WORKDIR}/psplash-start.service ${D}/${systemd_system_unitdir}
+ install -m 644 ${WORKDIR}/psplash-systemd.service ${D}/${systemd_system_unitdir}
+ fi
+
install -d ${D}${bindir}
for i in ${SPLASH_INSTALL} ; do
install -m 0755 $i ${D}${bindir}/$i
@@ -106,17 +123,10 @@ do_install_append() {
rm -f ${D}${bindir}/psplash
}
-FILES_${PN} += "/mnt/.psplash"
+SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
+SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'psplash-start.service psplash-systemd.service', '', d)}"
INITSCRIPT_NAME = "psplash.sh"
INITSCRIPT_PARAMS = "start 0 S . stop 20 0 1 6 ."
-PACKAGE_WRITE_DEPS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
-pkg_postinst_${PN} () {
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
- if [ -n "$D" ]; then
- OPTS="--root=$D"
- fi
- systemctl $OPTS mask psplash.service
- fi
-}
+FILES:${PN} += "/mnt"