summaryrefslogtreecommitdiffstats
path: root/meta
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-25 12:39:43 +0000
commitf43d13c1d0599ad32864d053d5e97f7395b27092 (patch)
treea027098f0d136bfc162cfa8e8c8a8a09ebd16b35 /meta
parent4ca684a0f79aeef2bfcaa176d7c3392d4b98c88d (diff)
downloadpoky-f43d13c1d0599ad32864d053d5e97f7395b27092.tar.gz
pigz: fix alternatives handling, use symlinks, provide zcat
The installed unpigz is a hardlink to pigz. (From OE-Core rev: 5017ff434130c62fabb42f8224fb246801f13d0c) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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"
13 13
14DEPENDS = "zlib" 14DEPENDS = "zlib"
15 15
16inherit update-alternatives
17
16do_install_class-target() { 18do_install_class-target() {
17 # Install files into /bin (FHS), which is typical place for gzip 19 # Install files into /bin (FHS), which is typical place for gzip
18 install -d ${D}${base_bindir} 20 install -d ${D}${base_bindir}
19 install ${B}/pigz ${D}${base_bindir}/gzip 21 install ${B}/pigz ${D}${base_bindir}/pigz
20 install ${B}/unpigz ${D}${base_bindir}/gunzip 22 ln -nsf pigz ${D}${base_bindir}/unpigz
23 ln -nsf pigz ${D}${base_bindir}/pigzcat
21} 24}
22 25
23do_install() { 26do_install() {
24 install -d ${D}${bindir} 27 install -d ${D}${bindir}
25 install ${B}/pigz ${D}${bindir}/gzip 28 install ${B}/pigz ${D}${bindir}/gzip
26 install ${B}/unpigz ${D}${bindir}/gunzip 29 ln -nsf gzip ${D}${bindir}/gunzip
30 ln -nsf gzip ${D}${bindir}/zcat
27} 31}
28 32
29ALTERNATIVE_${PN} = "gzip gunzip"
30ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
31ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
32ALTERNATIVE_PRIORITY = "80" 33ALTERNATIVE_PRIORITY = "80"
34ALTERNATIVE_${PN} = "gunzip gzip zcat"
35ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
36ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
37ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat"
38ALTERNATIVE_TARGET = "${base_bindir}/pigz"