Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | SUMMARY = "A parallel implementation of gzip" |
| 2 | DESCRIPTION = "pigz, which stands for parallel implementation of gzip, is a \ |
| 3 | fully functional replacement for gzip that exploits multiple processors and \ |
| 4 | multiple cores to the hilt when compressing data. pigz was written by Mark \ |
| 5 | Adler, and uses the zlib and pthread libraries." |
| 6 | HOMEPAGE = "http://zlib.net/pigz/" |
| 7 | SECTION = "console/utils" |
| 8 | LICENSE = "Zlib & Apache-2.0" |
| 9 | LIC_FILES_CHKSUM = "file://pigz.c;md5=9ae6dee8ceba9610596ed0ada493d142;beginline=7;endline=21" |
| 10 | |
| 11 | SRC_URI = "http://zlib.net/${BPN}/fossils/${BP}.tar.gz" |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 12 | SRC_URI[sha256sum] = "2eed7b0d7449d1d70903f2a62cd6005d262eb3a8c9e98687bc8cbb5809db2a7d" |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 13 | PROVIDES_class-native += "gzip-native" |
| 14 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 15 | # Point this at the homepage in case /fossils/ isn't updated |
| 16 | UPSTREAM_CHECK_URI = "http://zlib.net/${BPN}/" |
| 17 | UPSTREAM_CHECK_REGEX = "pigz-(?P<pver>.*)\.tar" |
| 18 | |
| 19 | DEPENDS = "zlib" |
| 20 | |
| 21 | EXTRA_OEMAKE = "-e MAKEFLAGS=" |
| 22 | |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 23 | inherit update-alternatives |
| 24 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 25 | do_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 | |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 33 | do_install_append_class-native() { |
| 34 | 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 Bishop | c8f4712 | 2019-06-24 09:36:18 -0400 | [diff] [blame] | 40 | ALTERNATIVE_PRIORITY = "110" |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 41 | ALTERNATIVE_${PN} = "gunzip gzip zcat" |
| 42 | ALTERNATIVE_${PN}_class-nativesdk = "" |
| 43 | ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip" |
| 44 | ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip" |
| 45 | ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat" |
| 46 | ALTERNATIVE_TARGET = "${base_bindir}/pigz" |
| 47 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 48 | BBCLASSEXTEND = "native nativesdk" |