summaryrefslogtreecommitdiff
path: root/packages/grep
diff options
context:
space:
mode:
authorDavid Karlstrom <daka@thg.se>2005-07-23 13:36:38 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-07-23 13:36:38 +0000
commit5e01906b8433bc6a8c03be2e31758589641124c9 (patch)
treec400790ffa5ebb896c464da84752a4937d889400 /packages/grep
parent57808a977840bce11bdbab373d9eacaba7ef88c1 (diff)
Updated to use update-alternatives and fix some FHS bugs
Diffstat (limited to 'packages/grep')
-rw-r--r--packages/grep/grep_2.5.1.bb22
1 files changed, 22 insertions, 0 deletions
diff --git a/packages/grep/grep_2.5.1.bb b/packages/grep/grep_2.5.1.bb
index 0f18902190..8f6b9b39a7 100644
--- a/packages/grep/grep_2.5.1.bb
+++ b/packages/grep/grep_2.5.1.bb
@@ -2,6 +2,7 @@ LICENSE = "GPL"
SECTION = "console/utils"
DESCRIPTION = "grep GNU utility"
MAINTAINER = "Pawel Osiczko <p.osiczko@tetrapyloctomy.org>"
+PR = "r1"
SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.bz2"
@@ -13,3 +14,24 @@ do_configure () {
rm -f ${S}/m4/init.m4
autotools_do_configure
}
+
+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}
+}
+
+
+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
+}
+
+pkg_prerm_${PN} () {
+ update-alternatives --remove grep grep.${PN}
+ update-alternatives --remove egrep egrep.${PN}
+ update-alternatives --remove fgrep fgrep.${PN}
+}