diff options
Diffstat (limited to 'meta/recipes-core/psplash/psplash_git.bb')
-rw-r--r-- | meta/recipes-core/psplash/psplash_git.bb | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb index 0537426513..56734c1582 100644 --- a/meta/recipes-core/psplash/psplash_git.bb +++ b/meta/recipes-core/psplash/psplash_git.bb @@ -5,19 +5,20 @@ SECTION = "base" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://psplash.h;beginline=1;endline=16;md5=840fb2356b10a85bed78dd09dc7745c6" -SRCREV = "88343ad23c90fa1dd8d79ac0d784a691aa0c6d2b" +SRCREV = "2015f7073e98dd9562db0936a254af5ef56356cf" PV = "0.1+git${SRCPV}" PR = "r15" SRC_URI = "git://git.yoctoproject.org/${BPN} \ file://psplash-init \ ${SPLASH_IMAGES}" +UPSTREAM_CHECK_COMMITS = "1" SPLASH_IMAGES = "file://psplash-poky-img.h;outsuffix=default" python __anonymous() { - oldpkgs = d.getVar("PACKAGES", True).split() - splashfiles = d.getVar('SPLASH_IMAGES', True).split() + oldpkgs = d.getVar("PACKAGES").split() + splashfiles = d.getVar('SPLASH_IMAGES').split() pkgs = [] localpaths = [] haspng = False @@ -50,8 +51,8 @@ python __anonymous() { d.appendVar("DEPENDS", " gdk-pixbuf-native") d.prependVar("PACKAGES", "%s " % (" ".join(pkgs))) - mlprefix = d.getVar('MLPREFIX', True) or '' - pn = d.getVar('PN', True) or '' + mlprefix = d.getVar('MLPREFIX') or '' + pn = d.getVar('PN') or '' for p in pkgs: ep = '%s%s' % (mlprefix, p) epsplash = '%s%s' % (mlprefix, 'psplash') @@ -72,30 +73,30 @@ 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', True) - convertscript = "%s/make-image-header.sh" % d.getVar('S', True) - destfile = "%s/psplash-poky-img.h" % d.getVar('S', True) - localfiles = d.getVar('SPLASH_LOCALPATHS', True).split() - outputfiles = d.getVar('SPLASH_INSTALL', True).split() + workdir = d.getVar('WORKDIR') + convertscript = "%s/make-image-header.sh" % d.getVar('S') + destfile = "%s/psplash-poky-img.h" % d.getVar('S') + 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 # file in order to get it to rebuild - os.utime("%s/psplash.c" % d.getVar('S', True), None) + os.utime("%s/psplash.c" % d.getVar('S'), None) bb.build.exec_func("oe_runmake", d) 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 install -d ${D}${bindir} @@ -105,12 +106,10 @@ do_install_append() { rm -f ${D}${bindir}/psplash } -FILES_${PN} += "/mnt/.psplash" - INITSCRIPT_NAME = "psplash.sh" INITSCRIPT_PARAMS = "start 0 S . stop 20 0 1 6 ." -DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}" +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 |