2010-11-12 06:49:29 +08:00
|
|
|
#
|
|
|
|
# Core Packages for Chakra, part of chakra-project.org
|
|
|
|
#
|
|
|
|
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
|
|
|
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
|
|
|
|
2010-03-13 23:25:19 +08:00
|
|
|
pkgname=bash
|
2011-04-23 00:44:32 +08:00
|
|
|
_basever=4.2
|
|
|
|
_patchlevel=008 #prepare for some patches
|
|
|
|
pkgver=$_basever.$_patchlevel
|
2010-05-16 23:08:55 +08:00
|
|
|
pkgrel=1
|
2010-03-13 23:25:19 +08:00
|
|
|
pkgdesc="The GNU Bourne Again shell"
|
|
|
|
arch=('i686' 'x86_64')
|
|
|
|
license=('GPL')
|
|
|
|
url="http://www.gnu.org/software/bash/bash.html"
|
|
|
|
groups=('base')
|
2011-04-23 00:44:32 +08:00
|
|
|
backup=(etc/bash.bash{rc,_logout} etc/skel/.bash{rc,_profile,_logout})
|
2010-03-13 23:25:19 +08:00
|
|
|
depends=('readline>=6.1' 'glibc')
|
|
|
|
provides=('sh')
|
|
|
|
install=bash.install
|
2011-04-23 00:44:32 +08:00
|
|
|
source=(http://ftp.gnu.org/gnu/bash/bash-$_basever.tar.gz
|
|
|
|
dot.bashrc
|
|
|
|
dot.bash_profile
|
|
|
|
dot.bash_logout
|
|
|
|
system.bashrc
|
|
|
|
system.bash_logout)
|
|
|
|
md5sums=('3fb927c7c33022f1c327f14a81c0d4b0'
|
|
|
|
'027d6bd8f5f6a06b75bb7698cb478089'
|
|
|
|
'2902e0fee7a9168f3a4fd2ccd60ff047'
|
|
|
|
'42f4400ed2314bd7519c020d0187edc5'
|
|
|
|
'fe5d3a367f7d5f754214dc05e3d958ab'
|
|
|
|
'472f536d7c9e8250dc4568ec4cfaf294'
|
|
|
|
'1100bc1dda2cdc06ac44d7e5d17864a3'
|
|
|
|
'30e7948079921d3261efcc6a40722135'
|
|
|
|
'9ea06decec43a198f3d7cf29acc602f8'
|
|
|
|
'fb48f6134d7b013135929476aa0c250c'
|
|
|
|
'e70e45de33426b38153b390be0dbbcd4'
|
|
|
|
'ce4e5c484993705b27daa151eca242c2'
|
|
|
|
'88d1f96db29461767602e2546803bda7'
|
|
|
|
'24c574bf6d6a581e300823d9c1276af6')
|
|
|
|
|
2010-03-13 23:25:19 +08:00
|
|
|
if [ $_patchlevel -gt 000 ]; then
|
2011-04-23 00:44:32 +08:00
|
|
|
for (( p=1; p<=$((10#${_patchlevel})); p++ )); do
|
|
|
|
source=(${source[@]} http://ftp.gnu.org/gnu/bash/bash-$_basever-patches/bash${_basever//./}-$(printf "%03d" $p))
|
|
|
|
done
|
2010-03-13 23:25:19 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
build() {
|
2011-04-23 00:44:32 +08:00
|
|
|
cd ${srcdir}/${pkgname}-$_basever
|
|
|
|
for p in ../bash${_basever//./}-*; do
|
|
|
|
[[ -e "$p" ]] || continue
|
|
|
|
msg "applying patch ${p}"
|
|
|
|
patch -Np0 -i ${p}
|
|
|
|
done
|
2010-03-13 23:25:19 +08:00
|
|
|
|
2011-04-23 00:44:32 +08:00
|
|
|
_bashconfig=(-DDEFAULT_PATH_VALUE=\'\"/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin\"\'
|
|
|
|
-DSTANDARD_UTILS_PATH=\'\"/usr/bin:/bin:/usr/sbin:/sbin\"\'
|
|
|
|
-DSYS_BASHRC=\'\"/etc/bash.bashrc\"\'
|
|
|
|
-DSYS_BASH_LOGOUT=\'\"/etc/bash.bash_logout\"\')
|
|
|
|
export CFLAGS="${CFLAGS} ${_bashconfig[@]}"
|
2010-03-13 23:25:19 +08:00
|
|
|
|
2011-04-23 00:44:32 +08:00
|
|
|
./configure --prefix=/usr --with-curses --enable-readline \
|
|
|
|
--without-bash-malloc --with-installed-readline \
|
|
|
|
--bindir=/bin --mandir=/usr/share/man --infodir=/usr/share/info
|
|
|
|
make
|
|
|
|
}
|
2010-03-13 23:25:19 +08:00
|
|
|
|
2011-04-23 00:44:32 +08:00
|
|
|
package() {
|
|
|
|
cd ${srcdir}/${pkgname}-$_basever
|
|
|
|
make DESTDIR=${pkgdir} install
|
2010-03-13 23:25:19 +08:00
|
|
|
|
2011-04-23 00:44:32 +08:00
|
|
|
# for now, bash is our default /bin/sh
|
|
|
|
cd ${pkgdir}/bin
|
|
|
|
ln -s bash sh
|
2010-03-13 23:25:19 +08:00
|
|
|
|
2011-04-23 00:44:32 +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
|
2010-03-13 23:25:19 +08:00
|
|
|
}
|
|
|
|
|