M7350/oe-core/meta/recipes-extended/bash/bash.inc

56 lines
1.5 KiB
PHP
Raw Normal View History

2024-09-09 08:57:42 +00:00
SUMMARY = "An sh-compatible command language interpreter"
HOMEPAGE = "http://tiswww.case.edu/php/chet/bash/bashtop.html"
2024-09-09 08:52:07 +00:00
SECTION = "base/shell"
DEPENDS = "ncurses bison-native"
2024-09-09 08:57:42 +00:00
inherit autotools gettext texinfo update-alternatives ptest
2024-09-09 08:52:07 +00:00
2024-09-09 08:57:42 +00:00
EXTRA_AUTORECONF += "--exclude=autoheader"
2024-09-09 08:52:07 +00:00
EXTRA_OECONF = "--enable-job-control"
2024-09-09 08:57:42 +00:00
ALTERNATIVE_${PN} = "sh"
ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash"
2024-09-09 08:52:07 +00:00
ALTERNATIVE_PRIORITY = "100"
2024-09-09 08:57:42 +00:00
RDEPENDS_${PN} += "base-files"
RDEPENDS_${PN}_class-nativesdk = ""
RDEPENDS_${PN}-ptest += "make"
2024-09-09 08:52:07 +00:00
do_configure_prepend () {
2024-09-09 08:57:42 +00:00
if [ ! -e ${S}/acinclude.m4 ]; then
cat ${S}/aclocal.m4 > ${S}/acinclude.m4
fi
}
do_compile_ptest () {
oe_runmake buildtest
}
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}
2024-09-09 08:52:07 +00:00
fi
}
2024-09-09 08:57:42 +00:00
do_install_append_class-target () {
# Clean host path in bashbug
sed -i -e "s,${STAGING_DIR_TARGET},,g" ${D}${bindir}/bashbug
}
do_install_ptest () {
make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test
cp ${B}/Makefile ${D}${PTEST_PATH}
sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile
}
2024-09-09 08:52:07 +00:00
pkg_postinst_${PN} () {
2024-09-09 08:57:42 +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
2024-09-09 08:52:07 +00:00
}