bash/PKGBUILD

92 lines
2.9 KiB
Bash

# Maintainer: Bernhard Landauer <oberon@manjaro.org>
# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Aaron Griffin <aaron@archlinux.org>
pkgbase=bash
pkgname=('bash' 'bashrc-manjaro')
_basever=5.0
_patchlevel=0
pkgver=${_basever}.${_patchlevel}
pkgrel=1
arch=('i686' 'x86_64')
license=('GPL')
url='http://www.gnu.org/software/bash/bash.html'
groups=('base')
source=(https://ftp.gnu.org/gnu/bash/bash-$_basever.tar.gz{,.sig}
'dot.bashrc'
'dot.bash_profile'
'dot.bash_logout'
'system.bashrc'
'system.bash_logout')
md5sums=('2b44b47b905be16f45709648f671820b'
'SKIP'
'7330b61cf37870d609c5fdfd3fa8f60a'
'2902e0fee7a9168f3a4fd2ccd60ff047'
'42f4400ed2314bd7519c020d0187edc5'
'd8f3f334e72c0e30032eae1a1229aef1'
'472f536d7c9e8250dc4568ec4cfaf294')
validpgpkeys=('7C0135FB088AAF6C66C650B9BB5869F064EA74AB') # Chet Ramey
if [[ $((10#${_patchlevel})) -gt 0 ]]; then
for (( _p=1; _p<=$((10#${_patchlevel})); _p++ )); do
source=(${source[@]} https://ftp.gnu.org/gnu/bash/bash-$_basever-patches/bash${_basever//.}-$(printf "%03d" $_p){,.sig})
done
fi
prepare() {
cd $pkgbase-$_basever
for (( _p=1; _p<=$((10#${_patchlevel})); _p++ )); do
msg "applying patch bash${_basever//.}-$(printf "%03d" $_p)"
patch -p0 -i ../bash${_basever//.}-$(printf "%03d" $_p)
done
}
build() {
cd $pkgbase-$_basever
_bashconfig=(-DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/bin\"\'
-DSTANDARD_UTILS_PATH=\'\"/usr/bin\"\'
-DSYS_BASHRC=\'\"/etc/bash.bashrc\"\'
-DSYS_BASH_LOGOUT=\'\"/etc/bash.bash_logout\"\'
-DNON_INTERACTIVE_LOGIN_SHELLS)
export CFLAGS="${CFLAGS} ${_bashconfig[@]}"
./configure --prefix=/usr --with-curses --enable-readline \
--without-bash-malloc --with-installed-readline
make
}
check() {
make -C $pkgname-$_basever check
}
package_bash() {
pkgdesc='The GNU Bourne Again shell'
backup=(etc/bash.bash_logout etc/skel/.bash{_profile,_logout})
depends=('bashrc'
'glibc'
'ncurses'
'readline>=7.0')
optdepends=('bash-completion: for tab completion')
provides=('sh')
make -C $pkgname-$_basever DESTDIR="$pkgdir" install
ln -s bash "$pkgdir"/usr/bin/sh
# system-wide configuration files
install -Dm644 system.bash_logout "$pkgdir"/etc/bash.bash_logout
# user configuration file skeletons
install -Dm644 dot.bash_profile "$pkgdir"/etc/skel/.bash_profile
install -m644 dot.bash_logout "$pkgdir"/etc/skel/.bash_logout
}
package_bashrc-manjaro() {
pkgdesc="Manjaro's default bashrc"
arch=('any')
backup=('etc/bash.bashrc etc/skel/.bashrc')
depends=('bash')
provides=('bashrc')
install -Dm644 system.bashrc "$pkgdir"/etc/bash.bashrc
install -Dm644 dot.bashrc "$pkgdir"/etc/skel/.bashrc
}