xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-extended/pigz/pigz_2.7.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "A parallel implementation of gzip"
2*4882a593SmuzhiyunDESCRIPTION = "pigz, which stands for parallel implementation of gzip, is a \
3*4882a593Smuzhiyunfully functional replacement for gzip that exploits multiple processors and \
4*4882a593Smuzhiyunmultiple cores to the hilt when compressing data. pigz was written by Mark \
5*4882a593SmuzhiyunAdler, and uses the zlib and pthread libraries."
6*4882a593SmuzhiyunHOMEPAGE = "http://zlib.net/pigz/"
7*4882a593SmuzhiyunSECTION = "console/utils"
8*4882a593SmuzhiyunLICENSE = "Zlib & Apache-2.0"
9*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://pigz.c;md5=9ae6dee8ceba9610596ed0ada493d142;beginline=7;endline=21"
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunSRC_URI = "http://zlib.net/${BPN}/fossils/${BP}.tar.gz"
12*4882a593SmuzhiyunSRC_URI[sha256sum] = "b4c9e60344a08d5db37ca7ad00a5b2c76ccb9556354b722d56d55ca7e8b1c707"
13*4882a593SmuzhiyunPROVIDES:class-native += "gzip-native"
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun# Point this at the homepage in case /fossils/ isn't updated
16*4882a593SmuzhiyunUPSTREAM_CHECK_URI = "http://zlib.net/${BPN}/"
17*4882a593SmuzhiyunUPSTREAM_CHECK_REGEX = "pigz-(?P<pver>.*)\.tar"
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunDEPENDS = "zlib"
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunEXTRA_OEMAKE = "-e MAKEFLAGS="
22*4882a593Smuzhiyun
23*4882a593Smuzhiyuninherit update-alternatives
24*4882a593Smuzhiyun
25*4882a593Smuzhiyundo_install() {
26*4882a593Smuzhiyun	# Install files into /bin (FHS), which is typical place for gzip
27*4882a593Smuzhiyun	install -d ${D}${base_bindir}
28*4882a593Smuzhiyun	install ${B}/pigz ${D}${base_bindir}/pigz
29*4882a593Smuzhiyun	ln -nsf pigz ${D}${base_bindir}/unpigz
30*4882a593Smuzhiyun	ln -nsf pigz ${D}${base_bindir}/pigzcat
31*4882a593Smuzhiyun}
32*4882a593Smuzhiyun
33*4882a593Smuzhiyundo_install:append:class-native() {
34*4882a593Smuzhiyun	install -d ${D}${bindir}
35*4882a593Smuzhiyun	install ${B}/pigz ${D}${bindir}/gzip
36*4882a593Smuzhiyun	ln -nsf gzip ${D}${bindir}/gunzip
37*4882a593Smuzhiyun	ln -nsf gzip ${D}${bindir}/zcat
38*4882a593Smuzhiyun}
39*4882a593Smuzhiyun
40*4882a593SmuzhiyunALTERNATIVE_PRIORITY = "110"
41*4882a593SmuzhiyunALTERNATIVE:${PN} = "gunzip gzip zcat"
42*4882a593SmuzhiyunALTERNATIVE:${PN}:class-nativesdk = ""
43*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
44*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
45*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat"
46*4882a593SmuzhiyunALTERNATIVE_TARGET = "${base_bindir}/pigz"
47*4882a593Smuzhiyun
48*4882a593SmuzhiyunBBCLASSEXTEND = "native nativesdk"
49