summaryrefslogtreecommitdiff
path: root/meta/recipes-extended/pigz
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2015-03-23 16:34:17 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-24 17:52:40 +0000
commit5017ff434130c62fabb42f8224fb246801f13d0c (patch)
tree7659f0652a3d16b13c38a3d41684f88d34e4cc70 /meta/recipes-extended/pigz
parentdc20323cfe6f3f5a880dfeb02e9463ffa3db1ad9 (diff)
downloadopenembedded-core-5017ff434130c62fabb42f8224fb246801f13d0c.tar.gz
openembedded-core-5017ff434130c62fabb42f8224fb246801f13d0c.tar.bz2
openembedded-core-5017ff434130c62fabb42f8224fb246801f13d0c.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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/pigz')
-rw-r--r--meta/recipes-extended/pigz/pigz.inc18
1 files changed, 12 insertions, 6 deletions
diff --git a/meta/recipes-extended/pigz/pigz.inc b/meta/recipes-extended/pigz/pigz.inc
index b5caa95184..c271f70159 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_class-target() {
# 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 ${B}/pigz ${D}${base_bindir}/pigz
+ ln -nsf pigz ${D}${base_bindir}/unpigz
+ ln -nsf pigz ${D}${base_bindir}/pigzcat
}
do_install() {
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
}
-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"