mirror of
https://git.yoctoproject.org/poky
synced 2026-02-14 04:33:03 +01:00
bash-3.2.48 did not provide the linking from sh to bash, making it unusable. Moving the license part out of the bash.inc file, and into bash_4.2.bb file makes us able to use that file also for bash_3.2.48.bb, which makes maintaining both at the same time a lot easier. (From OE-Core rev: e7b82cb4d107bfbfa5c939d406dd6ce6615b24e1) Signed-off-by: Martin Ertsaas <mertsas@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
40 lines
1021 B
PHP
40 lines
1021 B
PHP
DESCRIPTION = "An sh-compatible command language interpreter."
|
|
HOMEPAGE = "http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html"
|
|
SECTION = "base/shell"
|
|
|
|
DEPENDS = "ncurses bison-native"
|
|
|
|
inherit autotools gettext update-alternatives
|
|
|
|
PARALLEL_MAKE = ""
|
|
|
|
EXTRA_OECONF = "--enable-job-control"
|
|
export CC_FOR_BUILD = "${BUILD_CC}"
|
|
|
|
ALTERNATIVE_${PN} = "sh"
|
|
ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
|
|
ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash"
|
|
ALTERNATIVE_PRIORITY = "100"
|
|
|
|
export AUTOHEADER = "true"
|
|
|
|
do_configure_prepend () {
|
|
if [ ! -e acinclude.m4 ]; then
|
|
cat aclocal.m4 > acinclude.m4
|
|
fi
|
|
}
|
|
|
|
do_install_append () {
|
|
# Move /usr/bin/bash to /bin/bash, if need
|
|
if [ "${base_bindir}" != "${bindir}" ]; then
|
|
mkdir -p ${D}${base_bindir}
|
|
mv ${D}${bindir}/bash ${D}${base_bindir}
|
|
fi
|
|
}
|
|
|
|
pkg_postinst_${PN} () {
|
|
touch $D${sysconfdir}/shells
|
|
grep -q "bin/bash" $D${sysconfdir}/shells || echo /bin/bash >> $D${sysconfdir}/shells
|
|
grep -q "bin/sh" $D${sysconfdir}/shells || echo /bin/sh >> $D${sysconfdir}/shells
|
|
}
|