archrelease: copy trunk to extra-x86_64
[arch-packages.git] / bash / trunk / PKGBUILD
blob340ef36d622b98a43f884bb51300e8f981ee86ad
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>
7 pkgname=bash
8 _basever=5.2
9 _patchlevel=15
10 pkgver=${_basever}.${_patchlevel}
11 pkgrel=1
12 pkgdesc='The GNU Bourne Again shell'
13 arch=(x86_64)
14 license=(GPL)
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')
19 provides=('sh')
20 install=bash.install
21 source=(https://ftp.gnu.org/gnu/bash/bash-$_basever.tar.gz{,.sig}
22         dot.bashrc
23         dot.bash_profile
24         dot.bash_logout
25         system.bashrc
26         system.bash_logout)
27 validpgpkeys=('7C0135FB088AAF6C66C650B9BB5869F064EA74AB') # Chet Ramey
28 sha256sums=('a139c166df7ff4471c5e0733051642ee5556c1cc8a4a78f145583c5c81ab32fb'
29             'SKIP'
30             '959bc596166c9758fdd68836581f6b8f1d6fdb947d580bf24dce607998a077b8'
31             'e149407c2bee17779caec70a7edd3d0000d172e7e4347429b80cb4d55bcec9c2'
32             '4330edf340394d0dae50afb04ac2a621f106fe67fb634ec81c4bfb98be2a1eb5'
33             '51ceca7cd615ff4e2f8f3373a46ac7bfd453be70bbaddc074cb17f6db1ac7370'
34             '025bccfb374a3edce0ff8154d990689f30976b78f7a932dc9a6fcef81821811e'
35             'f42f2fee923bc2209f406a1892772121c467f44533bedfe00a176139da5d310a'
36             'SKIP'
37             '45cc5e1b876550eee96f95bffb36c41b6cb7c07d33f671db5634405cd00fd7b8'
38             'SKIP'
39             '6a090cdbd334306fceacd0e4a1b9e0b0678efdbbdedbd1f5842035990c8abaff'
40             'SKIP'
41             '38827724bba908cf5721bd8d4e595d80f02c05c35f3dd7dbc4cd3c5678a42512'
42             'SKIP'
43             'ece0eb544368b3b4359fb8464caa9d89c7a6743c8ed070be1c7d599c3675d357'
44             'SKIP'
45             'd1e0566a257d149a0d99d450ce2885123f9995e9c01d0a5ef6df7044a72a468c'
46             'SKIP'
47             '2500a3fc21cb08133f06648a017cebfa27f30ea19c8cbe8dfefdf16227cfd490'
48             'SKIP'
49             '6b4bd92fd0099d1bab436b941875e99e0cb3c320997587182d6267af1844b1e8'
50             'SKIP'
51             'f95a817882eaeb0cb78bce82859a86bbb297a308ced730ebe449cd504211d3cd'
52             'SKIP'
53             'c7705e029f752507310ecd7270aef437e8043a9959e4d0c6065a82517996c1cd'
54             'SKIP'
55             '831b5f25bf3e88625f3ab315043be7498907c551f86041fa3b914123d79eb6f4'
56             'SKIP'
57             '2fb107ce1fb8e93f36997c8b0b2743fc1ca98a454c7cc5a3fcabec533f67d42c'
58             'SKIP'
59             '094b4fd81bc488a26febba5d799689b64d52a5505b63e8ee854f48d356bc7ce6'
60             'SKIP'
61             '3ef9246f2906ef1e487a0a3f4c647ae1c289cbd8459caa7db5ce118ef136e624'
62             'SKIP'
63             'ef73905169db67399a728e238a9413e0d689462cb9b72ab17a05dba51221358a'
64             'SKIP')
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})
69   done
72 prepare() {
73   cd $pkgname-$_basever
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)
78   done
81 build() {
82   cd $pkgname-$_basever
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[@]}"
91   ./configure \
92     --prefix=/usr \
93     --with-curses \
94     --enable-readline \
95     --without-bash-malloc \
96     --with-installed-readline
97   make
100 check() {
101   make -C $pkgname-$_basever check
104 package() {
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"
120 # vim: ts=2 sw=2 et: