summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2014-09-25 23:55:38 +0200
committerAndreas Oberritter <obi@opendreambox.org>2015-02-23 17:15:53 +0100
commit2f383931144701cebdf7a1c762d298dda7dd0b83 (patch)
treef3bbcf0c894b90e0cb2c96834987a3e33dcefac6
parent87d244c925c37d3408874649a2092989c95acc24 (diff)
downloadopenembedded-core-contrib-2f383931144701cebdf7a1c762d298dda7dd0b83.tar.gz
openembedded-core-contrib-2f383931144701cebdf7a1c762d298dda7dd0b83.tar.bz2
openembedded-core-contrib-2f383931144701cebdf7a1c762d298dda7dd0b83.zip
pigz: fix alternatives handling, use symlinks, provide zcat
The installed unpigz is a hardlink to pigz. Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
-rw-r--r--meta/recipes-extended/pigz/pigz.inc20
1 files changed, 13 insertions, 7 deletions
diff --git a/meta/recipes-extended/pigz/pigz.inc b/meta/recipes-extended/pigz/pigz.inc
index 355fb2a4ec..635dbbc5db 100644
--- a/meta/recipes-extended/pigz/pigz.inc
+++ b/meta/recipes-extended/pigz/pigz.inc
@@ -13,20 +13,26 @@ PROVIDES_class-native += "gzip-native"
DEPENDS = "zlib"
+inherit update-alternatives
+
do_install () {
if [ "${CLASSOVERRIDE}" = "class-target" ] ; then
# Install files into /bin (FHS), which is typical place for gzip
- install -d ${D}${base_bindir}
- install ${B}/pigz ${D}${base_bindir}/gzip
- install ${B}/unpigz ${D}${base_bindir}/gunzip
+ install -d ${D}${base_bindir}
+ install ${B}/pigz ${D}${base_bindir}/pigz
+ ln -nsf pigz ${D}${base_bindir}/unpigz
+ ln -nsf pigz ${D}${base_bindir}/pigzcat
else
install -d ${D}${bindir}
install ${B}/pigz ${D}${bindir}/gzip
- install ${B}/unpigz ${D}${bindir}/gunzip
+ ln -nsf gzip ${D}${bindir}/gunzip
+ ln -nsf gzip ${D}${bindir}/zcat
fi
}
-ALTERNATIVE_${PN} = "gzip gunzip"
-ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
-ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
ALTERNATIVE_PRIORITY = "80"
+ALTERNATIVE_${PN} = "gunzip gzip zcat"
+ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
+ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
+ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat"
+ALTERNATIVE_TARGET = "${base_bindir}/pigz"