PKGBUILD 2.26 KB
Newer Older
Manuel Tortosa's avatar
Manuel Tortosa committed
1 2 3 4 5 6 7 8
#
# 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>

# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
Jan Mette's avatar
Jan Mette committed
9 10

pkgname=bash
11
_patchlevel=005 #prepare for some patches
Jan Mette's avatar
Jan Mette committed
12
pkgver=4.1.$_patchlevel
13
pkgrel=1
Jan Mette's avatar
Jan Mette committed
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
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

43
  patch -Np0 -i $srcdir/enable-system-config-files.patch || return 1
Jan Mette's avatar
Jan Mette committed
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64

  ./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
}

md5sums=('9800d8724815fd84994d9be65ab5e7b8'
         '17f20ec69535a2f50f2112a8c700630d'
Jan Mette's avatar
Jan Mette committed
65
         '3d2837e84645eac9bde399b58014bafa'
Jan Mette's avatar
Jan Mette committed
66 67 68
         '51725defa4c2dec49c1bc15883e0bee2'
         '196697769f1667a8a1aed608811129c6'
         '582dea5671b557f783e18629c2f77b68'
69 70 71 72
         '118d465095d4a4706eb1d34696a2666a'
         '120f7cf039a40d35fe375e59d6f17adc'
         '336ee037fc2cc1e2350b05097fbdc87c'
         '9471e666797f0b03eb2175ed752a9550')