summaryrefslogtreecommitdiff
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorDexuan Cui <dexuan.cui@intel.com>2010-08-27 16:36:58 +0800
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-31 17:22:19 +0100
commitd5bc20830d8c1551db7f3cbb1f3ae1aa07b0719a (patch)
tree36a59b101dbb6774af28eb00a5f5e4db10909109 /meta/recipes-extended
parentdc5f45c4e1865381e440788a91a1a20cf5c31269 (diff)
downloadopenembedded-core-d5bc20830d8c1551db7f3cbb1f3ae1aa07b0719a.tar.gz
openembedded-core-d5bc20830d8c1551db7f3cbb1f3ae1aa07b0719a.tar.bz2
openembedded-core-d5bc20830d8c1551db7f3cbb1f3ae1aa07b0719a.tar.xz
openembedded-core-d5bc20830d8c1551db7f3cbb1f3ae1aa07b0719a.zip
which (GPLv2): inherit update-alternatives
by this, we can avoid the pkg_postinst/postrm in the recipe file. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/which/which_2.18.bb18
1 files changed, 5 insertions, 13 deletions
diff --git a/meta/recipes-extended/which/which_2.18.bb b/meta/recipes-extended/which/which_2.18.bb
index b17794978..7eeb320a7 100644
--- a/meta/recipes-extended/which/which_2.18.bb
+++ b/meta/recipes-extended/which/which_2.18.bb
@@ -8,14 +8,14 @@ BUGTRACKER = "n/a"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-PR = "r0"
+PR = "r1"
SRC_URI = "http://www.xs4all.nl/~carlo17/which/which-${PV}.tar.gz \
file://fix_name_conflict_group_member.patch"
DEPENDS = "cwautomacros-native"
-inherit autotools
+inherit autotools update-alternatives
do_configure_prepend() {
OLD="@ACLOCAL_CWFLAGS@"
@@ -26,15 +26,7 @@ do_install_append() {
mv ${D}/${bindir}/which ${D}/${bindir}/which.${PN}
}
-pkg_postinst_${PN}() {
- if [ "${PN}" = "${BPN}" ] ; then
- update-alternatives --install ${bindir}/which which which.${PN} 100
- fi
-}
-
-pkg_prerm_${PN}() {
- if [ "${PN}" = "${BPN}" ] ; then
- update-alternatives --remove which which.${PN}
- fi
-}
+ALTERNATIVE_NAME = "which"
+ALTERNATIVE_PATH = "which.${PN}"
+ALTERNATIVE_PRIORITY = "100"