updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / bash-static / PKGBUILD
blobdaf8baba83bb575aed9cc7b42f2bf9305fe01c7f
1 # $Id: PKGBUILD 114694 2011-03-15 13:55:01Z allan $
2 # Maintainer: Aaron Griffin <aaron@archlinux.org>
3 # Maintainer: Allan McRae <allan@archlinux.org>
5 pkgname=bash-static
6 progname=bash
7 _basever=4.2
8 _patchlevel=008 #prepare for some patches
9 pkgver=$_basever.$_patchlevel
10 pkgrel=1
11 pkgdesc="The GNU Bourne Again shell"
12 arch=('i686' 'x86_64')
13 license=('GPL')
14 url="http://www.gnu.org/software/bash/bash.html"
15 groups=('base')
16 backup=(etc/bash.bash{rc,_logout} etc/skel/.bash{rc,_profile,_logout})
17 depends=('readline>=6.1' 'glibc')
18 provides=('sh' 'bash')
19 replaces=('bash')
20 conflicts=('bash')
21 install=bash.install
22 source=(http://ftp.gnu.org/gnu/bash/bash-$_basever.tar.gz
23         dot.bashrc
24         dot.bash_profile
25         dot.bash_logout
26         system.bashrc
27         system.bash_logout)
28 if [ $_patchlevel -gt 000 ]; then
29     for (( p=1; p<=$((10#${_patchlevel})); p++ )); do
30         source=(${source[@]} http://ftp.gnu.org/gnu/bash/bash-$_basever-patches/bash${_basever//./}-$(printf "%03d" $p))
31     done
34 build() {
35   cd ${srcdir}/${progname}-$_basever
36   for p in ../bash${_basever//./}-*; do
37     [[ -e "$p" ]] || continue
38     msg "applying patch ${p}"
39     patch -Np0 -i ${p}
40   done
42   _bashconfig=(-DDEFAULT_PATH_VALUE=\'\"/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin\"\'
43                -DSTANDARD_UTILS_PATH=\'\"/usr/bin:/bin:/usr/sbin:/sbin\"\'
44                -DSYS_BASHRC=\'\"/etc/bash.bashrc\"\'
45                -DSYS_BASH_LOGOUT=\'\"/etc/bash.bash_logout\"\')
46   export CFLAGS="${CFLAGS} ${_bashconfig[@]}"
48   ./configure --prefix=/usr --with-curses --enable-readline \
49     --without-bash-malloc --with-installed-readline \
50     --bindir=/bin --mandir=/usr/share/man --infodir=/usr/share/info \
51     --enable-static-link
52   make
53   make check
56 package() {
57   cd ${srcdir}/${progname}-$_basever
58   make DESTDIR=${pkgdir} install
60   # for now, bash is our default /bin/sh
61   cd ${pkgdir}/bin
62   ln -s bash sh
64   install -dm755 ${pkgdir}/etc/skel/
65   
66   # system-wide configuration files
67   install -m644 ${srcdir}/system.bashrc ${pkgdir}/etc/bash.bashrc
68   install -m644 ${srcdir}/system.bash_logout ${pkgdir}/etc/bash.bash_logout
69   
70   # user configuration file skeletons
71   install -m644 ${srcdir}/dot.bashrc ${pkgdir}/etc/skel/.bashrc
72   install -m644 ${srcdir}/dot.bash_profile ${pkgdir}/etc/skel/.bash_profile
73   install -m644 ${srcdir}/dot.bash_logout ${pkgdir}/etc/skel/.bash_logout
76 md5sums=('3fb927c7c33022f1c327f14a81c0d4b0'
77          '027d6bd8f5f6a06b75bb7698cb478089'
78          '2902e0fee7a9168f3a4fd2ccd60ff047'
79          '42f4400ed2314bd7519c020d0187edc5'
80          'fe5d3a367f7d5f754214dc05e3d958ab'
81          '472f536d7c9e8250dc4568ec4cfaf294'
82          '1100bc1dda2cdc06ac44d7e5d17864a3'
83          '30e7948079921d3261efcc6a40722135'
84          '9ea06decec43a198f3d7cf29acc602f8'
85          'fb48f6134d7b013135929476aa0c250c'
86          'e70e45de33426b38153b390be0dbbcd4'
87          'ce4e5c484993705b27daa151eca242c2'
88          '88d1f96db29461767602e2546803bda7'
89          '24c574bf6d6a581e300823d9c1276af6')