void-packages/srcpkgs/bash/template
2020-04-29 13:58:36 +02:00

58 lines
1.5 KiB
Bash

# Template file for 'bash'
pkgname=bash
_bash_distver=5.0
_bash_patchlevel=017
version="${_bash_distver}.${_bash_patchlevel}"
revision=1
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"
short_desc="GNU Bourne Again Shell"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://www.gnu.org/software/bash/bash.html"
distfiles="${GNU_SITE}/${pkgname}/${pkgname}-${_bash_distver}.tar.gz"
make_dirs="/etc/bash/bashrc.d 755 root root"
checksum=b4a80f2ac66170b2913efbfb9f2594f1f76c7b1afd11f799e22035d63077fb4d
conflicts="chroot-bash>=0"
register_shell="/usr/bin/bash /bin/bash"
alternatives="
sh:sh:/usr/bin/bash
sh:sh.1:/usr/share/man/man1/bash.1"
CFLAGS="-DSYS_BASHRC='\"/etc/bash/bashrc\"'"
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
vinstall ${FILESDIR}/bashrc 644 etc/bash
vinstall ${FILESDIR}/bash.sh 644 etc/profile.d
}
bash-devel_package() {
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/bash
vmove usr/lib/pkgconfig
}
}