pkgname=bash
pkgver=5.2.21
pkgrel=4
arch=('armv7h' 'aarch64')
license=('unknown')
source=("$pkgname-$pkgver.tar.gz"
bash-5.2.21-upstream_fixes-1.patch
dot.bashrc
dot.bash_profile
dot.bash_logout
system.bashrc
system.bash_logout
)
depends=(readline
#libreadline.so
glibc ncurses)
provides=(sh)
prepare() {
cd "$pkgname-$pkgver"
patch -Np1 -i "$srcdir"/bash-5.2.21-upstream_fixes-1.patch
}
build() {
cd "$pkgname-$pkgver"
_bashconfig=(-DSYS_BASHRC=\'\"/etc/bash.bashrc\"\'
-DSYS_BASH_LOGOUT=\'\"/etc/bash.bash_logout\"\'
-DNON_INTERACTIVE_LOGIN_SHELLS)
export CFLAGS="${CFLAGS} ${_bashconfig[@]}"
./configure --prefix=/usr \
--host=$CHOST \
--build=$CHOST \
--target=$CHOST \
--with-curses \
--without-bash-malloc \
--with-installed-readline \
--docdir=/usr/share/doc/bash-$pkgver
make
}
package() {
cd "$pkgname-$pkgver"
make DESTDIR="$pkgdir/" install
cd ..
# system-wide configuration files
install -Dm644 system.bashrc "$pkgdir/etc/bash.bashrc"
install -Dm644 system.bash_logout "$pkgdir/etc/bash.bash_logout"
# user configuration file skeletons
install -dm755 "$pkgdir/etc/skel/"
install -m644 dot.bashrc "$pkgdir/etc/skel/.bashrc"
install -m644 dot.bash_profile "$pkgdir/etc/skel/.bash_profile"
install -m644 dot.bash_logout "$pkgdir/etc/skel/.bash_logout"
cd "$pkgdir/usr/bin"
ln -s bash sh
}
sha256sums=('c8e31bdc59b69aaffc5b36509905ba3e5cbb12747091d27b4b977f078560d5b8'
'461ef75965a7fc75e2de86816dde160d8440e721595ed20513b1d8ede7c89bdc'
'78838c533bbd87e2017cf32309024abcd6dcce58495e4f8d13ade9db733ffc8d'
'e149407c2bee17779caec70a7edd3d0000d172e7e4347429b80cb4d55bcec9c2'
'4330edf340394d0dae50afb04ac2a621f106fe67fb634ec81c4bfb98be2a1eb5'
'631f6af5aa0d07b0b42d0f67881959f75ee6a6c2b9db94d698c2601b86ef42d1'
'025bccfb374a3edce0ff8154d990689f30976b78f7a932dc9a6fcef81821811e')