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
|
|
|
|
2011-05-04 22:21:54 +00:00
|
|
|
DEPENDS = "ncurses bison-native"
|
2007-10-25 11:52:46 +00:00
|
|
|
|
2014-05-01 20:00:28 +00:00
|
|
|
inherit autotools-brokensep gettext texinfo update-alternatives ptest
|
2007-10-25 11:52:46 +00:00
|
|
|
|
|
|
|
PARALLEL_MAKE = ""
|
|
|
|
|
2014-11-28 15:35:15 +00:00
|
|
|
EXTRA_AUTORECONF += "--exclude=autoheader"
|
2010-10-20 20:55:02 +00:00
|
|
|
EXTRA_OECONF = "--enable-job-control"
|
2007-10-25 11:52:46 +00:00
|
|
|
|
2012-05-30 11:55:31 +00:00
|
|
|
ALTERNATIVE_${PN} = "sh"
|
|
|
|
ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
|
|
|
|
ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash"
|
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"
|
|
|
|
|
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
|
|
|
|
sed -i -e "s,${STAGING_DIR_TARGET},,g" ${D}${bindir}/bashbug
|
|
|
|
}
|
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}
|
2013-06-24 07:45:52 +00:00
|
|
|
sed -i 's/^Makefile/_Makefile/' ${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
|
|
|
}
|