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