core/bash/PKGBUILD

95 lines
3.2 KiB
Bash
Raw Normal View History

2014-09-30 12:29:45 +08:00
pkgname=bash
2017-01-03 09:27:44 +08:00
_basever=4.4
_patchlevel=012 #prepare for some patches
2014-09-30 12:29:45 +08:00
pkgver=$_basever.$_patchlevel
2017-01-03 09:27:44 +08:00
pkgrel=1
2014-09-30 12:29:45 +08:00
pkgdesc="The GNU Bourne Again shell"
arch=('x86_64')
license=('GPL')
url="http://www.gnu.org/software/bash/bash.html"
groups=('base')
backup=(etc/bash.bash{rc,_logout} etc/skel/.bash{rc,_profile,_logout})
depends=('readline>=7.0' 'glibc')
2014-09-30 12:29:45 +08:00
optdepends=('bash-completion: for tab completion')
provides=('sh')
install=bash.install
2017-01-03 09:27:44 +08:00
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)
sha1sums=('8de012df1e4f3e91f571c3eb8ec45b43d7c747eb'
'SKIP'
'3211397399c367a501d103d36abfe5c7cadfeab2'
'672c3c0c28c3642a5cff0e4093ff98359c747ff0'
'9fd0cfda5b85651169f8761a834941b1f6f53952'
'895ffd3f5c729271859a659c4ca17aefc3fda927'
'0bc4dc72ef407eefe27b6ba5b384ccddb3e0852b'
'b0a20634e049a7b747703235b96ac0da10215d99'
'c9b7329897295301879a9600d96b2182ea2023b1'
'21cf7e0c6151de7fe8aca0bab8deb601bac2849e'
'32789657933c288d81210dd96a6b08e67207b593'
'8eee9cf9997215bd14f53dfc25c97186cee9437c'
'59d9e79adb1fc35e086caa0fa2af49381fe8b2f5'
'8924cde74fbb4fafeaf0ff6b5e4e94fcd2c2b98a'
'b38e9df20869643ef9388cbab585610a20ccc847'
'4bd44109ff79f0d6da19c27948dc40db9598da85'
'31180db58d25591f0744fc6923df1f8a97f0d19b'
'240c287dc60cb69185a2a05b1341bfceafd1071a'
'6dcceca364953498d3eb0c18c49fb0f3374fa3c2')
2017-01-03 09:27:44 +08:00
validpgpkeys=('7C0135FB088AAF6C66C650B9BB5869F064EA74AB') # Chet Ramey
2014-08-27 05:19:00 +08:00
2014-09-30 12:29:45 +08:00
if [[ $((10#${_patchlevel})) -gt 0 ]]; then
for (( _p=1; _p<=$((10#${_patchlevel})); _p++ )); do
2015-05-26 06:00:24 +08:00
source=(${source[@]} http://ftp.gnu.org/gnu/bash/bash-$_basever-patches/bash${_basever//.}-$(printf "%03d" $_p))
2014-09-30 12:29:45 +08:00
done
fi
2012-01-12 06:23:00 +08:00
2014-09-30 12:29:45 +08:00
prepare() {
cd $pkgname-$_basever
2014-08-27 05:19:00 +08:00
2014-09-30 12:29:45 +08:00
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
2012-09-10 04:35:31 +08:00
2014-09-30 12:29:45 +08:00
}
2014-08-27 05:19:00 +08:00
2014-09-30 12:29:45 +08:00
build() {
cd $pkgname-$_basever
2012-09-10 04:35:31 +08:00
2014-10-11 21:38:18 +08:00
_bashconfig=(-DDEFAULT_PATH_VALUE=\'\"/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin\"\'
-DSTANDARD_UTILS_PATH=\'\"/usr/bin:/usr/sbin\"\'
2014-09-30 12:29:45 +08:00
-DSYS_BASHRC=\'\"/etc/bash.bashrc\"\'
-DSYS_BASH_LOGOUT=\'\"/etc/bash.bash_logout\"\'
-DNON_INTERACTIVE_LOGIN_SHELLS)
2014-09-30 12:29:45 +08:00
export CFLAGS="${CFLAGS} ${_bashconfig[@]}"
2012-09-10 04:35:31 +08:00
2014-09-30 12:29:45 +08:00
./configure --prefix=/usr --with-curses --enable-readline \
--without-bash-malloc --with-installed-readline
make
}
2012-09-10 04:35:31 +08:00
2014-09-30 12:29:45 +08:00
check() {
cd $pkgname-$_basever
make check
}
2012-09-10 04:35:31 +08:00
2014-09-30 12:29:45 +08:00
package() {
cd $pkgname-$_basever
make DESTDIR=${pkgdir} install
2014-09-25 05:39:40 +08:00
2014-09-30 12:29:45 +08:00
ln -s bash ${pkgdir}/usr/bin/sh
2014-09-29 20:23:46 +08:00
2014-09-30 12:29:45 +08:00
install -dm755 ${pkgdir}/etc/skel/
# system-wide configuration files
install -m644 ${srcdir}/system.bashrc ${pkgdir}/etc/bash.bashrc
install -m644 ${srcdir}/system.bash_logout ${pkgdir}/etc/bash.bash_logout
# user configuration file skeletons
install -m644 ${srcdir}/dot.bashrc ${pkgdir}/etc/skel/.bashrc
install -m644 ${srcdir}/dot.bash_profile ${pkgdir}/etc/skel/.bash_profile
install -m644 ${srcdir}/dot.bash_logout ${pkgdir}/etc/skel/.bash_logout
}