diff options
author | Dexuan Cui <dexuan.cui@intel.com> | 2010-08-27 16:36:58 +0800 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-31 17:22:19 +0100 |
commit | d5bc20830d8c1551db7f3cbb1f3ae1aa07b0719a (patch) | |
tree | 36a59b101dbb6774af28eb00a5f5e4db10909109 /meta/recipes-extended | |
parent | dc5f45c4e1865381e440788a91a1a20cf5c31269 (diff) | |
download | poky-d5bc20830d8c1551db7f3cbb1f3ae1aa07b0719a.tar.gz |
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.bb | 18 |
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 b177949788..7eeb320a75 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" | |||
8 | LICENSE = "GPLv2+" | 8 | LICENSE = "GPLv2+" |
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" |
10 | 10 | ||
11 | PR = "r0" | 11 | PR = "r1" |
12 | 12 | ||
13 | SRC_URI = "http://www.xs4all.nl/~carlo17/which/which-${PV}.tar.gz \ | 13 | SRC_URI = "http://www.xs4all.nl/~carlo17/which/which-${PV}.tar.gz \ |
14 | file://fix_name_conflict_group_member.patch" | 14 | file://fix_name_conflict_group_member.patch" |
15 | 15 | ||
16 | DEPENDS = "cwautomacros-native" | 16 | DEPENDS = "cwautomacros-native" |
17 | 17 | ||
18 | inherit autotools | 18 | inherit autotools update-alternatives |
19 | 19 | ||
20 | do_configure_prepend() { | 20 | do_configure_prepend() { |
21 | OLD="@ACLOCAL_CWFLAGS@" | 21 | OLD="@ACLOCAL_CWFLAGS@" |
@@ -26,15 +26,7 @@ do_install_append() { | |||
26 | mv ${D}/${bindir}/which ${D}/${bindir}/which.${PN} | 26 | mv ${D}/${bindir}/which ${D}/${bindir}/which.${PN} |
27 | } | 27 | } |
28 | 28 | ||
29 | pkg_postinst_${PN}() { | 29 | ALTERNATIVE_NAME = "which" |
30 | if [ "${PN}" = "${BPN}" ] ; then | 30 | ALTERNATIVE_PATH = "which.${PN}" |
31 | update-alternatives --install ${bindir}/which which which.${PN} 100 | 31 | ALTERNATIVE_PRIORITY = "100" |
32 | fi | ||
33 | } | ||
34 | |||
35 | pkg_prerm_${PN}() { | ||
36 | if [ "${PN}" = "${BPN}" ] ; then | ||
37 | update-alternatives --remove which which.${PN} | ||
38 | fi | ||
39 | } | ||
40 | 32 | ||