2013-12-19 15:13:01 +00:00
|
|
|
SUMMARY = "An sh-compatible command language interpreter"
|
2013-12-21 23:34:16 +00:00
|
|
|
HOMEPAGE = "http://tiswww.case.edu/php/chet/bash/bashtop.html"
|
2007-10-25 11:52:46 +00:00
|
|
|
SECTION = "base/shell"
|
2010-06-17 04:48:16 +00:00
|
|
|
|
2016-04-26 08:48:24 +00:00
|
|
|
DEPENDS = "ncurses bison-native virtual/libiconv"
|
2007-10-25 11:52:46 +00:00
|
|
|
|
2015-01-13 03:08:51 +00:00
|
|
|
inherit autotools gettext texinfo update-alternatives ptest
|
2007-10-25 11:52:46 +00:00
|
|
|
|
2014-11-28 15:35:15 +00:00
|
|
|
EXTRA_AUTORECONF += "--exclude=autoheader"
|
2015-10-09 22:21:44 +00:00
|
|
|
EXTRA_OECONF = "--enable-job-control --without-bash-malloc"
|
2007-10-25 11:52:46 +00:00
|
|
|
|
2015-04-21 09:30:47 +00:00
|
|
|
# If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the
|
|
|
|
# startup files, even if they are not interactive.
|
|
|
|
# This is what other major distros do. And this is what we wanted. See bug#5359 and bug#7137.
|
|
|
|
CFLAGS += "-DNON_INTERACTIVE_LOGIN_SHELLS"
|
|
|
|
|
2016-11-30 18:50:26 +00:00
|
|
|
ALTERNATIVE_${PN} = "bash sh"
|
|
|
|
ALTERNATIVE_LINK_NAME[bash] = "${base_bindir}/bash"
|
|
|
|
ALTERNATIVE_TARGET[bash] = "${base_bindir}/bash"
|
2012-05-30 11:55:31 +00:00
|
|
|
ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
|
2016-11-30 18:50:26 +00:00
|
|
|
ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash.${BPN}"
|
2011-01-26 11:37:10 +00:00
|
|
|
ALTERNATIVE_PRIORITY = "100"
|
|
|
|
|
2013-10-22 03:12:00 +00:00
|
|
|
RDEPENDS_${PN} += "base-files"
|
|
|
|
RDEPENDS_${PN}_class-nativesdk = ""
|
2012-12-19 16:18:31 +00:00
|
|
|
RDEPENDS_${PN}-ptest += "make"
|
|
|
|
|
2015-11-28 06:53:40 +00:00
|
|
|
USERADD_PACKAGES = "${PN}-ptest"
|
|
|
|
USERADD_PARAM_${PN}-ptest = "--create-home --user-group test"
|
|
|
|
|
2011-11-02 11:41:05 +00:00
|
|
|
do_configure_prepend () {
|
2013-08-07 03:33:19 +00:00
|
|
|
if [ ! -e ${S}/acinclude.m4 ]; then
|
|
|
|
cat ${S}/aclocal.m4 > ${S}/acinclude.m4
|
2011-11-02 11:41:05 +00:00
|
|
|
fi
|
2007-10-25 11:52:46 +00:00
|
|
|
}
|
|
|
|
|
2013-03-06 09:41:11 +00:00
|
|
|
do_compile_ptest () {
|
|
|
|
oe_runmake buildtest
|
2012-12-19 16:18:31 +00:00
|
|
|
}
|
|
|
|
|
2012-07-20 17:12:09 +00:00
|
|
|
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
|
2013-03-06 09:41:11 +00:00
|
|
|
}
|
2014-10-21 07:53:15 +00:00
|
|
|
do_install_append_class-target () {
|
|
|
|
# Clean host path in bashbug
|
2015-12-24 09:47:53 +00:00
|
|
|
sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
|
|
|
|
-e "s,-I${WORKDIR}/\S* ,,g" ${D}${bindir}/bashbug
|
2014-10-21 07:53:15 +00:00
|
|
|
}
|
2012-12-19 16:18:31 +00:00
|
|
|
|
2013-03-06 09:41:11 +00:00
|
|
|
do_install_ptest () {
|
|
|
|
make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test
|
|
|
|
cp ${B}/Makefile ${D}${PTEST_PATH}
|
2015-12-24 09:47:53 +00:00
|
|
|
sed -i -e 's/^Makefile/_Makefile/' -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
|
|
|
|
-e "s,${S},,g" -e "s,${B},,g" -e "s,${STAGING_DIR_NATIVE},,g" ${D}${PTEST_PATH}/Makefile
|
2012-07-20 17:12:09 +00:00
|
|
|
}
|
|
|
|
|
2011-02-10 00:13:50 +00:00
|
|
|
pkg_postinst_${PN} () {
|
2013-10-22 03:12:00 +00:00
|
|
|
grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postrm_${PN} () {
|
|
|
|
printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > $D${sysconfdir}/shells
|
2007-10-25 11:52:46 +00:00
|
|
|
}
|
2017-03-10 11:24:20 +00:00
|
|
|
|
|
|
|
PACKAGES += "${PN}-bashbug"
|
|
|
|
FILES_${PN} = "${bindir}/bash ${base_bindir}/bash.bash"
|
|
|
|
FILES_${PN}-bashbug = "${bindir}/bashbug"
|