PKGBUILD 1.98 KB
Newer Older
Jan Mette's avatar
Jan Mette committed
1 2 3 4 5 6
# $Id: PKGBUILD 66503 2010-01-31 12:15:27Z allan $
# Maintainer: Aaron Griffin <aaron@archlinux.org>

pkgname=bash
_patchlevel=002 #prepare for some patches
pkgver=4.1.$_patchlevel
Jan Mette's avatar
Jan Mette committed
7
pkgrel=4
Jan Mette's avatar
Jan Mette committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
pkgdesc="The GNU Bourne Again shell"
arch=('i686' 'x86_64')
license=('GPL')
url="http://www.gnu.org/software/bash/bash.html"
groups=('base')
backup=(etc/profile.bash etc/skel/.bashrc etc/skel/.bash_profile)
depends=('readline>=6.1' 'glibc')
makedepends=(gzip)
provides=('sh')
install=bash.install
source=(http://ftp.gnu.org/gnu/bash/bash-4.1.tar.gz
        profile.bash
        bashrc
        enable-system-config-files.patch
        system.bashrc)
if [ $_patchlevel -gt 000 ]; then
    for p in $(seq -w 001 $_patchlevel); do
        source=(${source[@]} http://ftp.gnu.org/gnu/bash/bash-4.1-patches/bash41-$p)
    done
fi

build() {
  cd ${srcdir}/${pkgname}-4.1
  for p in ../bash41-*; do
    [ -e "$p" ] || continue
    msg "applying patch ${p}"
    patch -Np0 -i ${p} || return 1
  done

  patch -Np0 -i ../enable-system-config-files.patch || return 1

  ./configure --prefix=/usr --with-curses --enable-readline \
    --without-bash-malloc --with-installed-readline \
    --bindir=/bin --mandir=/usr/share/man --infodir=/usr/share/info
  make || return 1
  make DESTDIR=${pkgdir} install

  install -D -m644 ${srcdir}/profile.bash ${pkgdir}/etc/profile.bash || return 1
  install -D -m644 ${srcdir}/system.bashrc ${pkgdir}/etc/bash.bashrc || return 1

  # for now, bash is our default /bin/sh
  cd ${pkgdir}/bin
  ln -s bash sh

  mkdir -p ${pkgdir}/etc/skel/
  install -D -m644 ${srcdir}/bashrc ${pkgdir}/etc/skel/.bashrc
  echo ". \$HOME/.bashrc" >${pkgdir}/etc/skel/.bash_profile
Jan Mette's avatar
Jan Mette committed
55 56

  rm -rf $pkgdir/usr/share/info/dir
Jan Mette's avatar
Jan Mette committed
57 58 59 60
}

md5sums=('9800d8724815fd84994d9be65ab5e7b8'
         '17f20ec69535a2f50f2112a8c700630d'
Jan Mette's avatar
Jan Mette committed
61
         '98a1c465933f18c1337d31620523010d'
Jan Mette's avatar
Jan Mette committed
62 63 64 65
         '51725defa4c2dec49c1bc15883e0bee2'
         '196697769f1667a8a1aed608811129c6'
         '582dea5671b557f783e18629c2f77b68'
         '118d465095d4a4706eb1d34696a2666a')