summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/pigz
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/pigz')
-rw-r--r--meta/recipes-extended/pigz/pigz_2.8.bb (renamed from meta/recipes-extended/pigz/pigz_2.4.bb)22
1 files changed, 20 insertions, 2 deletions
diff --git a/meta/recipes-extended/pigz/pigz_2.4.bb b/meta/recipes-extended/pigz/pigz_2.8.bb
index 6e6da9c3c5..fcf0c93e41 100644
--- a/meta/recipes-extended/pigz/pigz_2.4.bb
+++ b/meta/recipes-extended/pigz/pigz_2.8.bb
@@ -9,8 +9,9 @@ LICENSE = "Zlib & Apache-2.0"
LIC_FILES_CHKSUM = "file://pigz.c;md5=9ae6dee8ceba9610596ed0ada493d142;beginline=7;endline=21"
SRC_URI = "http://zlib.net/${BPN}/fossils/${BP}.tar.gz"
-SRC_URI[md5sum] = "def2f6e19d9d8231445adc1349d346df"
-SRC_URI[sha256sum] = "a4f816222a7b4269bd232680590b579ccc72591f1bb5adafcd7208ca77e14f73"
+SRC_URI[sha256sum] = "eb872b4f0e1f0ebe59c9f7bd8c506c4204893ba6a8492de31df416f0d5170fd0"
+PROVIDES:class-native += "gzip-native"
+
# Point this at the homepage in case /fossils/ isn't updated
UPSTREAM_CHECK_URI = "http://zlib.net/${BPN}/"
UPSTREAM_CHECK_REGEX = "pigz-(?P<pver>.*)\.tar"
@@ -19,6 +20,8 @@ DEPENDS = "zlib"
EXTRA_OEMAKE = "-e MAKEFLAGS="
+inherit update-alternatives
+
do_install() {
# Install files into /bin (FHS), which is typical place for gzip
install -d ${D}${base_bindir}
@@ -27,4 +30,19 @@ do_install() {
ln -nsf pigz ${D}${base_bindir}/pigzcat
}
+do_install:append:class-native() {
+ install -d ${D}${bindir}
+ install ${B}/pigz ${D}${bindir}/gzip
+ ln -nsf gzip ${D}${bindir}/gunzip
+ ln -nsf gzip ${D}${bindir}/zcat
+}
+
+ALTERNATIVE_PRIORITY = "110"
+ALTERNATIVE:${PN} = "gunzip gzip zcat"
+ALTERNATIVE:${PN}:class-nativesdk = ""
+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"
+
BBCLASSEXTEND = "native nativesdk"