summaryrefslogtreecommitdiffstats
path: root/abs/extra/bash-completion/PKGBUILD
blob: a2b3d9cc43549b9461bb64260a4b804873417f4c (plain)
1
2
3
4
5
6
7
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
# $Id$
# Maintainer: Eric BĂ©langer <eric@archlinux.org>

pkgname=bash-completion
pkgver=2.7
pkgrel=2
pkgdesc='Programmable completion for the bash shell'
arch=('any')
url='https://github.com/scop/bash-completion'
license=(GPL2)
depends=(bash)
options=(!emptydirs !makeflags)
source=($url/releases/download/$pkgver/$pkgname-$pkgver.tar.xz)
sha1sums=('2260342127086cfedd4801f796fdaaa051411a14')

build() {
  cd $pkgname-$pkgver
  ./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"

  # remove completions which overlap with util-linux
  rm "$pkgdir/usr/share/bash-completion/completions"/{{u,}mount,rfkill}
}