core/bash-completion/PKGBUILD

37 lines
1.0 KiB
Bash

# Maintainer: abveritas@chakra-project.org>
pkgname=bash-completion
pkgver=2.0
pkgrel=2
pkgdesc="Programmable completion for the bash shell"
arch=('any')
url="http://bash-completion.alioth.debian.org/"
license=('GPL')
depends=('bash')
source=("http://bash-completion.alioth.debian.org/files/${pkgname}-${pkgver}.tar.bz2")
md5sums=('0d903f398be8c8f24bc5ffa6f86127f8')
sha1sums=('3011add35574b4042c04b95fc0fd0f14006adc69')
build() {
cd "${srcdir}/${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 "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
# bash-completion is sourced in /etc/bash.bashrc so that non-bash shell don't source it
rm -r "${pkgdir}/etc/profile.d"
# remove Slackware's makepkg completion
rm "${pkgdir}/usr/share/bash-completion/completions/makepkg"
# part of systemd
rm "${pkgdir}/usr/share/bash-completion/completions/udevadm"
}