aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/grep/grep_2.5.1a.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 10:45:33 +0100
commitca478f563575ff2262741821ec35d4dfbf9f4487 (patch)
tree0697ce4f4da7811ae4abdfa2cc7f95e1ae268b4e /meta/recipes-extended/grep/grep_2.5.1a.bb
parent6dee3050a4a0c4f3cc9fec23a0bc02155d680863 (diff)
downloadopenembedded-core-ca478f563575ff2262741821ec35d4dfbf9f4487.tar.gz
openembedded-core-ca478f563575ff2262741821ec35d4dfbf9f4487.tar.bz2
openembedded-core-ca478f563575ff2262741821ec35d4dfbf9f4487.zip
grep: use new update-alternatives
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta/recipes-extended/grep/grep_2.5.1a.bb')
-rw-r--r--meta/recipes-extended/grep/grep_2.5.1a.bb23
1 files changed, 10 insertions, 13 deletions
diff --git a/meta/recipes-extended/grep/grep_2.5.1a.bb b/meta/recipes-extended/grep/grep_2.5.1a.bb
index 5aecf17cf0..3a8bcbfdb7 100644
--- a/meta/recipes-extended/grep/grep_2.5.1a.bb
+++ b/meta/recipes-extended/grep/grep_2.5.1a.bb
@@ -27,20 +27,17 @@ do_configure_prepend () {
do_install () {
autotools_do_install
install -d ${D}${base_bindir}
- mv ${D}${bindir}/grep ${D}${base_bindir}/grep.${PN}
- mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep.${PN}
- mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep.${PN}
+ mv ${D}${bindir}/grep ${D}${base_bindir}/grep
+ mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep
+ mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep
rmdir ${D}${bindir}/
}
-pkg_postinst_${PN} () {
- update-alternatives --install ${base_bindir}/grep grep grep.${PN} 100
- update-alternatives --install ${base_bindir}/egrep egrep egrep.${PN} 100
- update-alternatives --install ${base_bindir}/fgrep fgrep fgrep.${PN} 100
-}
+inherit update-alternatives
-pkg_prerm_${PN} () {
- update-alternatives --remove grep grep.${PN}
- update-alternatives --remove egrep egrep.${PN}
- update-alternatives --remove fgrep fgrep.${PN}
-}
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "grep egrep fgrep"
+ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep"
+ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep"
+ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep"