# Maintainer: abveritas@chakra-project.org> pkgname=bash-completion pkgver=2.1 pkgrel=2 pkgdesc="Programmable completion for the bash shell" arch=('any') url="http://bash-completion.alioth.debian.org/" license=('GPL') depends=('bash') options=('!emptydirs' '!makeflags') #http://bash-completion.alioth.debian.org/files/${pkgname}-${pkgver}.tar.bz2 source=('http://anonscm.debian.org/gitweb/?p=bash-completion/bash-completion.git;a=snapshot;h=867282a7341ccfff9a0e8a8ef6bba6e781b66afb;sf=tgz' bash-4.3.patch bash-completion-lz4.patch words_bad_array_subscript.patch) sha1sums=('153a8d056d0f5cdc22477ebfa13c1a461ff95556' 'd2a01350990c1221bd53d55edf31210c74d02bca' 'a8cdbadacdce845ec69575e1046c197d54e64074' 'ae1d9a334e4908464b339f929dd5874c2af11bd2') prepare() { rm -rf ${pkgname}-${pkgver} mv ${pkgname}-867282a ${pkgname}-${pkgver} cd ${pkgname}-${pkgver} patch -p1 -i ../bash-4.3.patch patch -p0 -i ../bash-completion-lz4.patch patch -p1 -i ../words_bad_array_subscript.patch autoreconf --install } build() { cd ${pkgname}-${pkgver} # this should be removed once /lib is a symlink to usr/lib sed -i '/lib\/modules/ s,/lib/modules,/usr&,' bash_completion ./configure --prefix=/usr --sysconfdir=/etc make } package() { cd ${pkgname}-${pkgver} make DESTDIR="${pkgdir}" install # bash-completion is sourced in /etc/bash.bashrc so that non-bash shell don't source it rm "${pkgdir}/etc/profile.d/bash_completion.sh" # remove Slackware's makepkg completion rm "${pkgdir}/usr/share/bash-completion/completions/makepkg" }