blob: 6e81883472f5a16fefa422671e9616bca448ee1a [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "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
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05009export DEFS="NO_ASM"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050010
11EXTRA_OEMAKE_class-target = "GREP=${base_bindir}/grep"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050012EXTRA_OECONF_append_libc-musl = " gl_cv_func_fflush_stdin=yes "
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013
14do_install_append () {
Patrick Williamsf1e5d692016-03-30 15:21:19 -050015 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
Patrick Williamsc124f4f2015-09-15 14:41:29 -050023}
24
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050025do_install_append_libc-musl () {
26 rm ${D}${libdir}/charset.alias
27 rmdir ${D}${libdir}
28}
29
Patrick Williamsc124f4f2015-09-15 14:41:29 -050030inherit update-alternatives
31
32ALTERNATIVE_PRIORITY = "100"
33ALTERNATIVE_${PN} = "gunzip gzip zcat"
34ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
35ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
36ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat"
37
38export CONFIG_SHELL="/bin/sh"