blob: b32584033b1f7e63278d9399c44d3e861ba0d3d2 [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"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05006
7inherit autotools texinfo
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05008export DEFS="NO_ASM"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05009
Patrick Williams213cb262021-08-07 19:21:33 -050010EXTRA_OEMAKE:class-target = "GREP=${base_bindir}/grep"
11EXTRA_OECONF:append:libc-musl = " gl_cv_func_fflush_stdin=yes "
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012
Patrick Williams213cb262021-08-07 19:21:33 -050013do_install:append () {
Patrick Williamsf1e5d692016-03-30 15:21:19 -050014 if [ "${base_bindir}" != "${bindir}" ]; then
15 # Rename and move files into /bin (FHS), which is typical place for gzip
16 install -d ${D}${base_bindir}
17 mv ${D}${bindir}/gunzip ${D}${base_bindir}/gunzip
18 mv ${D}${bindir}/gzip ${D}${base_bindir}/gzip
19 mv ${D}${bindir}/zcat ${D}${base_bindir}/zcat
20 mv ${D}${bindir}/uncompress ${D}${base_bindir}/uncompress
21 fi
Patrick Williamsc124f4f2015-09-15 14:41:29 -050022}
23
Patrick Williamsc124f4f2015-09-15 14:41:29 -050024inherit update-alternatives
25
26ALTERNATIVE_PRIORITY = "100"
Patrick Williams213cb262021-08-07 19:21:33 -050027ALTERNATIVE:${PN} = "gunzip gzip zcat"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050028ALTERNATIVE_LINK_NAME[gunzip] = "${base_bindir}/gunzip"
29ALTERNATIVE_LINK_NAME[gzip] = "${base_bindir}/gzip"
30ALTERNATIVE_LINK_NAME[zcat] = "${base_bindir}/zcat"
31
32export CONFIG_SHELL="/bin/sh"