summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/pigz
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2019-05-28 06:32:10 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-30 12:34:56 +0100
commitad1db93d134db1ec4f6d6598c9741dc13e82e1f3 (patch)
tree86fafe8277e211157352f6bddd39a285e66d93de /meta/recipes-extended/pigz
parent3a73662ea72fbf0180d9a66032b6d92248ae4ddf (diff)
downloadopenembedded-core-contrib-ad1db93d134db1ec4f6d6598c9741dc13e82e1f3.tar.gz
Revert "pigz: pigz is not gzip"
This reverts commit a54c59f2a24904daffe51582b6863eebd071db0d. The compatibility issues have since been resolved [1][2] and pigz 2.4 annoucement also states that this can be considered as a drop-in replacemment [3] now. [1] https://github.com/madler/pigz/commit/33c140e5fdc5cd639d1e7cc3c5e52ec016aa8a65 [2] https://github.com/madler/pigz/commit/6fda8570f633ec582ba72ea00dad2bbac825bc17 [3] https://zlib.net/pipermail/pigz-announce_zlib.net/2017-December/000028.html Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/pigz')
-rw-r--r--meta/recipes-extended/pigz/pigz_2.4.bb21
1 files changed, 20 insertions, 1 deletions
diff --git a/meta/recipes-extended/pigz/pigz_2.4.bb b/meta/recipes-extended/pigz/pigz_2.4.bb
index 6e6da9c3c5..974c035147 100644
--- a/meta/recipes-extended/pigz/pigz_2.4.bb
+++ b/meta/recipes-extended/pigz/pigz_2.4.bb
@@ -11,6 +11,8 @@ LIC_FILES_CHKSUM = "file://pigz.c;md5=9ae6dee8ceba9610596ed0ada493d142;beginline
SRC_URI = "http://zlib.net/${BPN}/fossils/${BP}.tar.gz"
SRC_URI[md5sum] = "def2f6e19d9d8231445adc1349d346df"
SRC_URI[sha256sum] = "a4f816222a7b4269bd232680590b579ccc72591f1bb5adafcd7208ca77e14f73"
+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,7 +21,9 @@ DEPENDS = "zlib"
EXTRA_OEMAKE = "-e MAKEFLAGS="
-do_install() {
+inherit update-alternatives
+
+do_install_class-target() {
# Install files into /bin (FHS), which is typical place for gzip
install -d ${D}${base_bindir}
install ${B}/pigz ${D}${base_bindir}/pigz
@@ -27,4 +31,19 @@ do_install() {
ln -nsf pigz ${D}${base_bindir}/pigzcat
}
+do_install() {
+ install -d ${D}${bindir}
+ install ${B}/pigz ${D}${bindir}/gzip
+ ln -nsf gzip ${D}${bindir}/gunzip
+ ln -nsf gzip ${D}${bindir}/zcat
+}
+
+ALTERNATIVE_PRIORITY = "80"
+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"