blob: 04f8f95dd5a6e63ac4f951cd5a07e4e32c38942a [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001SUMMARY = "Standard GNU compressor"
2DESCRIPTION = "GNU Gzip is a popular data compression program originally written by Jean-loup Gailly for the GNU \
3project. Mark Adler wrote the decompression part"
4HOMEPAGE = "http://www.gnu.org/software/gzip/"
5SECTION = "console/utils"
6# change to GPLv3+ in 2007/07. Previous GPLv2 version is 1.3.12
7
8inherit autotools texinfo
9export DEFS="NO_ASM"
10
11EXTRA_OEMAKE_class-target = "GREP=${base_bindir}/grep"
12EXTRA_OECONF_append_libc-musl = " gl_cv_func_fflush_stdin=yes "
13
14do_install_append () {
15 if [ "${base_bindir}" != "${bindir}" ]; then
16 # Rename and move files into /bin (FHS), which is typical place for gzip
17 install -d ${D}${base_bindir}
18 mv ${D}${bindir}/gunzip ${D}${base_bindir}/gunzip
19 mv ${D}${bindir}/gzip ${D}${base_bindir}/gzip
20 mv ${D}${bindir}/zcat ${D}${base_bindir}/zcat
21 mv ${D}${bindir}/uncompress ${D}${base_bindir}/uncompress
22 fi
23}
24
25inherit update-alternatives
26
27ALTERNATIVE_PRIORITY = "100"
28ALTERNATIVE_${PN} = "gunzip gzip zcat"
29ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
30ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
31ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat"
32
33export CONFIG_SHELL="/bin/sh"