diff options
author | Andreas Oberritter <obi@opendreambox.org> | 2015-03-23 16:34:17 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-03-25 12:39:43 +0000 |
commit | f43d13c1d0599ad32864d053d5e97f7395b27092 (patch) | |
tree | a027098f0d136bfc162cfa8e8c8a8a09ebd16b35 | |
parent | 4ca684a0f79aeef2bfcaa176d7c3392d4b98c88d (diff) | |
download | poky-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>
-rw-r--r-- | meta/recipes-extended/pigz/pigz.inc | 18 |
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 | ||
14 | DEPENDS = "zlib" | 14 | DEPENDS = "zlib" |
15 | 15 | ||
16 | inherit update-alternatives | ||
17 | |||
16 | do_install_class-target() { | 18 | do_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 | ||
23 | do_install() { | 26 | do_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 | ||
29 | ALTERNATIVE_${PN} = "gzip gunzip" | ||
30 | ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip" | ||
31 | ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip" | ||
32 | ALTERNATIVE_PRIORITY = "80" | 33 | ALTERNATIVE_PRIORITY = "80" |
34 | ALTERNATIVE_${PN} = "gunzip gzip zcat" | ||
35 | ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip" | ||
36 | ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip" | ||
37 | ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat" | ||
38 | ALTERNATIVE_TARGET = "${base_bindir}/pigz" | ||