HOMEPAGE = "http://ftp.gnu.org/gnu/which/"
DEPENDS = "cwautomacros-native"
-inherit autotools
+inherit autotools update-alternatives
-PR = "r0"
+PR = "r1"
SRC_URI = "http://ftp.gnu.org/gnu/which/which-${PV}.tar.gz \
file://remove-declaration.patch"
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"