summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/grep/grep_2.9.bb
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-05-21 16:17:55 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-30 12:04:43 +0100
commit0b5c42347577425757afaf062f4d6aae4d27c7f7 (patch)
treef43cf742cf114c4a614234414ea35dc77ae5164c /meta/recipes-extended/grep/grep_2.9.bb
parent2851d751a814bcf76f4032e8d3ff875a1012ba03 (diff)
downloadpoky-0b5c42347577425757afaf062f4d6aae4d27c7f7.tar.gz
grep: use new update-alternatives
(From OE-Core rev: ca478f563575ff2262741821ec35d4dfbf9f4487) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/grep/grep_2.9.bb')
-rw-r--r--meta/recipes-extended/grep/grep_2.9.bb26
1 files changed, 12 insertions, 14 deletions
diff --git a/meta/recipes-extended/grep/grep_2.9.bb b/meta/recipes-extended/grep/grep_2.9.bb
index 1bc79f21c9..f936611062 100644
--- a/meta/recipes-extended/grep/grep_2.9.bb
+++ b/meta/recipes-extended/grep/grep_2.9.bb
@@ -6,7 +6,7 @@ SECTION = "console/utils"
6LICENSE = "GPLv3" 6LICENSE = "GPLv3"
7LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee" 7LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee"
8 8
9PR = "r1" 9PR = "r2"
10 10
11SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.gz" 11SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.gz"
12 12
@@ -24,20 +24,18 @@ do_configure_prepend () {
24do_install () { 24do_install () {
25 autotools_do_install 25 autotools_do_install
26 install -d ${D}${base_bindir} 26 install -d ${D}${base_bindir}
27 mv ${D}${bindir}/grep ${D}${base_bindir}/grep.${PN} 27 mv ${D}${bindir}/grep ${D}${base_bindir}/grep
28 mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep.${PN} 28 mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep
29 mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep.${PN} 29 mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep
30 rmdir ${D}${bindir}/ 30 rmdir ${D}${bindir}/
31} 31}
32 32
33pkg_postinst_${PN} () { 33inherit update-alternatives
34 update-alternatives --install ${base_bindir}/grep grep grep.${PN} 100 34
35 update-alternatives --install ${base_bindir}/egrep egrep egrep.${PN} 100 35ALTERNATIVE_PRIORITY = "100"
36 update-alternatives --install ${base_bindir}/fgrep fgrep fgrep.${PN} 100 36
37} 37ALTERNATIVE_${PN} = "grep egrep fgrep"
38ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep"
39ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep"
40ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep"
38 41
39pkg_prerm_${PN} () {
40 update-alternatives --remove grep grep.${PN}
41 update-alternatives --remove egrep egrep.${PN}
42 update-alternatives --remove fgrep fgrep.${PN}
43}