1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Maintainer: Giancarlo Razzolini <grazzolini@archlinux.org>
3 # Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
4 # Contributor: Allan McRae <allan@archlinux.org>
5 # Contributor: Aaron Griffin <aaron@archlinux.org>
10 pkgver=${_basever}.${_patchlevel}
12 pkgdesc='The GNU Bourne Again shell'
15 url='https://www.gnu.org/software/bash/bash.html'
16 backup=(etc/bash.bash{rc,_logout} etc/skel/.bash{rc,_profile,_logout})
17 depends=(readline libreadline.so glibc ncurses)
18 optdepends=('bash-completion: for tab completion')
21 source=(https://ftp.gnu.org/gnu/bash/bash-$_basever.tar.gz{,.sig}
27 validpgpkeys=('7C0135FB088AAF6C66C650B9BB5869F064EA74AB') # Chet Ramey
28 sha256sums=('a139c166df7ff4471c5e0733051642ee5556c1cc8a4a78f145583c5c81ab32fb'
30 '959bc596166c9758fdd68836581f6b8f1d6fdb947d580bf24dce607998a077b8'
31 'e149407c2bee17779caec70a7edd3d0000d172e7e4347429b80cb4d55bcec9c2'
32 '4330edf340394d0dae50afb04ac2a621f106fe67fb634ec81c4bfb98be2a1eb5'
33 '51ceca7cd615ff4e2f8f3373a46ac7bfd453be70bbaddc074cb17f6db1ac7370'
34 '025bccfb374a3edce0ff8154d990689f30976b78f7a932dc9a6fcef81821811e'
35 'f42f2fee923bc2209f406a1892772121c467f44533bedfe00a176139da5d310a'
37 '45cc5e1b876550eee96f95bffb36c41b6cb7c07d33f671db5634405cd00fd7b8'
39 '6a090cdbd334306fceacd0e4a1b9e0b0678efdbbdedbd1f5842035990c8abaff'
41 '38827724bba908cf5721bd8d4e595d80f02c05c35f3dd7dbc4cd3c5678a42512'
43 'ece0eb544368b3b4359fb8464caa9d89c7a6743c8ed070be1c7d599c3675d357'
45 'd1e0566a257d149a0d99d450ce2885123f9995e9c01d0a5ef6df7044a72a468c'
47 '2500a3fc21cb08133f06648a017cebfa27f30ea19c8cbe8dfefdf16227cfd490'
49 '6b4bd92fd0099d1bab436b941875e99e0cb3c320997587182d6267af1844b1e8'
51 'f95a817882eaeb0cb78bce82859a86bbb297a308ced730ebe449cd504211d3cd'
53 'c7705e029f752507310ecd7270aef437e8043a9959e4d0c6065a82517996c1cd'
55 '831b5f25bf3e88625f3ab315043be7498907c551f86041fa3b914123d79eb6f4'
57 '2fb107ce1fb8e93f36997c8b0b2743fc1ca98a454c7cc5a3fcabec533f67d42c'
59 '094b4fd81bc488a26febba5d799689b64d52a5505b63e8ee854f48d356bc7ce6'
61 '3ef9246f2906ef1e487a0a3f4c647ae1c289cbd8459caa7db5ce118ef136e624'
63 'ef73905169db67399a728e238a9413e0d689462cb9b72ab17a05dba51221358a'
66 if [[ $((10#${_patchlevel})) -gt 0 ]]; then
67 for (( _p=1; _p<=$((10#${_patchlevel})); _p++ )); do
68 source=(${source[@]} https://ftp.gnu.org/gnu/bash/bash-$_basever-patches/bash${_basever//.}-$(printf "%03d" $_p){,.sig})
75 for (( _p=1; _p<=$((10#${_patchlevel})); _p++ )); do
76 echo "applying patch bash${_basever//.}-$(printf "%03d" $_p)"
77 patch -p0 -i ../bash${_basever//.}-$(printf "%03d" $_p)
84 _bashconfig=(-DDEFAULT_PATH_VALUE=\'\"/usr/local/sbin:/usr/local/bin:/usr/bin\"\'
85 -DSTANDARD_UTILS_PATH=\'\"/usr/bin\"\'
86 -DSYS_BASHRC=\'\"/etc/bash.bashrc\"\'
87 -DSYS_BASH_LOGOUT=\'\"/etc/bash.bash_logout\"\'
88 -DNON_INTERACTIVE_LOGIN_SHELLS)
89 export CFLAGS="${CFLAGS} ${_bashconfig[@]}"
95 --without-bash-malloc \
96 --with-installed-readline
101 make -C $pkgname-$_basever check
105 make -C $pkgname-$_basever DESTDIR="$pkgdir" install
106 ln -s bash "$pkgdir/usr/bin/sh"
107 ln -s bash "$pkgdir/usr/bin/rbash"
109 # system-wide configuration files
110 install -Dm644 system.bashrc "$pkgdir/etc/bash.bashrc"
111 install -Dm644 system.bash_logout "$pkgdir/etc/bash.bash_logout"
113 # user configuration file skeletons
114 install -dm755 "$pkgdir/etc/skel/"
115 install -m644 dot.bashrc "$pkgdir/etc/skel/.bashrc"
116 install -m644 dot.bash_profile "$pkgdir/etc/skel/.bash_profile"
117 install -m644 dot.bash_logout "$pkgdir/etc/skel/.bash_logout"