blob: 13ff32dd8e8cbf4f063ca65239debc663ca66b49 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001SUMMARY = "GNU grep utility"
2HOMEPAGE = "http://savannah.gnu.org/projects/grep/"
3BUGTRACKER = "http://savannah.gnu.org/bugs/?group=grep"
4SECTION = "console/utils"
5LICENSE = "GPLv3"
6LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee"
7
8SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz \
9 file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
10 "
11
12SRC_URI[md5sum] = "f46aa9d0d2577b9212a104348a286787"
13SRC_URI[sha256sum] = "54fc478ee1ce17780109820ef30730c9e18715a949f7d5c6afc673adb2a56ecf"
14
15inherit autotools gettext texinfo
16
17EXTRA_OECONF = "--disable-perl-regexp"
18
19do_configure_prepend () {
20 rm -f ${S}/m4/init.m4
21}
22
23do_install () {
24 autotools_do_install
25 if [ "${base_bindir}" != "${bindir}" ]; then
26 install -d ${D}${base_bindir}
27 mv ${D}${bindir}/grep ${D}${base_bindir}/grep
28 mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep
29 mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep
30 rmdir ${D}${bindir}/
31 fi
32}
33
34inherit update-alternatives
35
36ALTERNATIVE_PRIORITY = "100"
37
38ALTERNATIVE_${PN} = "grep egrep fgrep"
39ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep"
40ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep"
41ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep"
42
43export CONFIG_SHELL="/bin/sh"