ncurses: use new update-alternatives

(From OE-Core rev: 54a92bdd0555d776efe92f7cf57a75039562556a)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Mark Hatle 2012-05-15 18:35:04 -05:00 committed by Richard Purdie
parent 07da870e5a
commit 4ca029b30f
1 changed files with 4 additions and 18 deletions

View File

@ -166,12 +166,6 @@ shell_do_install() {
rm -f ${D}${libdir}/terminfo
if [ "${PN}" = "ncurses" ]; then
mv ${D}${bindir}/clear ${D}${bindir}/clear.${PN}
mv ${D}${bindir}/reset ${D}${bindir}/reset.${PN}
fi
# create linker scripts for libcurses.so and libncurses to
# link against -ltinfo when needed. Some builds might break
# else when '-Wl,--no-copy-dt-needed-entries' has been set in
@ -220,19 +214,11 @@ python populate_packages_prepend () {
}
pkg_postinst_ncurses-tools () {
if [ "${PN}" = "ncurses" ]; then
update-alternatives --install ${bindir}/clear clear clear.${PN} 100
update-alternatives --install ${bindir}/reset reset reset.${PN} 100
fi
}
inherit update-alternatives
pkg_prerm_ncurses-tools () {
if [ "${PN}" = "ncurses" ]; then
update-alternatives --remove clear clear.${PN}
update-alternatives --remove reset reset.${PN}
fi
}
ALTERNATIVE_PRIORITY = "100"
ALTERNATIVE_ncurses-tools = "clear reset"
BBCLASSEXTEND = "native nativesdk"