diffutils: use new batch update-alternatives feature
Signed-off-by Kevin Tian <kevin.tian@intel.com>
This commit is contained in:
parent
2b18117820
commit
b797a842ba
|
@ -3,7 +3,7 @@ LICENSE = "GPL"
|
|||
DESCRIPTION = "Diffutils contains the GNU diff, diff3, \
|
||||
sdiff, and cmp utilities. These programs are usually \
|
||||
used for creating patch files."
|
||||
PR = "r3"
|
||||
PR = "r4"
|
||||
|
||||
SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.gz"
|
||||
|
||||
|
@ -16,23 +16,5 @@ inherit autotools update-alternatives gettext
|
|||
# see diffutils.mk in buildroot)
|
||||
EXTRA_OECONF_linux-uclibc = "--without-included-regex"
|
||||
|
||||
do_install_append () {
|
||||
mv ${D}${bindir}/diff ${D}${bindir}/diff.${PN}
|
||||
mv ${D}${bindir}/cmp ${D}${bindir}/cmp.${PN}
|
||||
}
|
||||
|
||||
ALTERNATIVE_NAME = "diff"
|
||||
ALTERNATIVE_PATH = "diff.${PN}"
|
||||
ALTERNATIVE_LINKS = "${bindir}/diff ${bindir}/cmp"
|
||||
ALTERNATIVE_PRIORITY = "100"
|
||||
|
||||
pkg_postinst_${PN} () {
|
||||
|
||||
update-alternatives --install /usr/bin/cmp cmp cmp.diffutils 100
|
||||
|
||||
}
|
||||
|
||||
pkg_postrm_${PN} () {
|
||||
|
||||
update-alternatives --remove cmp cmp.diffutils
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue