# Template build file for 'bash'. pkgname=bash _bash_distver=4.4 _bash_patchlevel=018 version=${_bash_distver}.${_bash_patchlevel} revision=2 wrksrc=${pkgname}-${_bash_distver} build_style=gnu-configure configure_args="--without-bash-malloc --with-curses --without-installed-readline" make_build_args="TERMCAP_LIB=${XBPS_CROSS_BASE}/usr/lib/libncursesw.a" hostmakedepends="bison" makedepends="ncurses-devel" conflicts="chroot-bash>=0" register_shell="/bin/bash" short_desc="The GNU Bourne Again Shell" maintainer="Juan RP " homepage="http://www.gnu.org/software/bash/bash.html" license="GPL-3" distfiles="${GNU_SITE}/$pkgname/$pkgname-${_bash_distver}.tar.gz" CFLAGS="-DSYS_BASHRC='\"/etc/bash/bashrc\"'" make_dirs="/etc/bash/bashrc.d 755 root root" checksum=d86b3392c1202e8ff5a423b302e6284db7f8f435ea9f39b5b1b20fd3ac36dfcb alternatives=" sh:sh:/usr/bin/bash sh:sh.1:/usr/share/man/man1/bash.1" pre_configure() { local ver=$(echo ${_bash_distver}|sed "s|\.||g") cd ${wrksrc} for p in $(seq -w 001 ${_bash_patchlevel}); do patch -sNp0 -i ${FILESDIR}/bash${ver}-${p} msg_normal " Applying patch bash${ver}-$p.\n" done } do_check() { make tests } post_install() { rm -r ${DESTDIR}/usr/share/doc ln -s bash ${DESTDIR}/usr/bin/rbash vmkdir /etc/bash vinstall ${FILESDIR}/bashrc 644 etc/bash vinstall ${FILESDIR}/bash.sh 644 etc/profile.d }