summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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"