blob: 3566e18b7e729ca03ef4da4215dd0eab69ab54ff [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001SUMMARY = "A parallel implementation of gzip"
2DESCRIPTION = "pigz, which stands for parallel implementation of gzip, is a \
3fully functional replacement for gzip that exploits multiple processors and \
4multiple cores to the hilt when compressing data. pigz was written by Mark \
5Adler, and uses the zlib and pthread libraries."
6HOMEPAGE = "http://zlib.net/pigz/"
7SECTION = "console/utils"
8LICENSE = "Zlib & Apache-2.0"
9LIC_FILES_CHKSUM = "file://pigz.c;md5=9ae6dee8ceba9610596ed0ada493d142;beginline=7;endline=21"
10
11SRC_URI = "http://zlib.net/${BPN}/fossils/${BP}.tar.gz"
Andrew Geissler9b4d8b02021-02-19 12:26:16 -060012SRC_URI[sha256sum] = "2eed7b0d7449d1d70903f2a62cd6005d262eb3a8c9e98687bc8cbb5809db2a7d"
Patrick Williams213cb262021-08-07 19:21:33 -050013PROVIDES:class-native += "gzip-native"
Brad Bishop15ae2502019-06-18 21:44:24 -040014
Brad Bishop316dfdd2018-06-25 12:45:53 -040015# Point this at the homepage in case /fossils/ isn't updated
16UPSTREAM_CHECK_URI = "http://zlib.net/${BPN}/"
17UPSTREAM_CHECK_REGEX = "pigz-(?P<pver>.*)\.tar"
18
19DEPENDS = "zlib"
20
21EXTRA_OEMAKE = "-e MAKEFLAGS="
22
Brad Bishop15ae2502019-06-18 21:44:24 -040023inherit update-alternatives
24
Brad Bishop316dfdd2018-06-25 12:45:53 -040025do_install() {
26 # Install files into /bin (FHS), which is typical place for gzip
27 install -d ${D}${base_bindir}
28 install ${B}/pigz ${D}${base_bindir}/pigz
29 ln -nsf pigz ${D}${base_bindir}/unpigz
30 ln -nsf pigz ${D}${base_bindir}/pigzcat
31}
32
Patrick Williams213cb262021-08-07 19:21:33 -050033do_install:append:class-native() {
Brad Bishop15ae2502019-06-18 21:44:24 -040034 install -d ${D}${bindir}
35 install ${B}/pigz ${D}${bindir}/gzip
36 ln -nsf gzip ${D}${bindir}/gunzip
37 ln -nsf gzip ${D}${bindir}/zcat
38}
39
Brad Bishopc8f47122019-06-24 09:36:18 -040040ALTERNATIVE_PRIORITY = "110"
Patrick Williams213cb262021-08-07 19:21:33 -050041ALTERNATIVE:${PN} = "gunzip gzip zcat"
42ALTERNATIVE:${PN}:class-nativesdk = ""
Brad Bishop15ae2502019-06-18 21:44:24 -040043ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
44ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
45ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat"
46ALTERNATIVE_TARGET = "${base_bindir}/pigz"
47
Brad Bishop316dfdd2018-06-25 12:45:53 -040048BBCLASSEXTEND = "native nativesdk"