diff options
-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" | ||