# Maintainer: Alexey Pavlov <alexpux@gmail.com>

pkgname=bash-completion
pkgver=2.16.0
pkgrel=1
pkgdesc="Programmable completion for the bash shell"
arch=('any')
url="https://github.com/scop/bash-completion"
license=('GPL')
depends=('bash')
makedepends=('autotools')
options=('!emptydirs' '!makeflags')
source=(https://github.com/scop/${pkgname}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.xz)
sha256sums=('3369bd5e418a75fb990863925aed5b420398acebb320ec4c0306b3eae23f107a')
prepare() {
  cd ${pkgname}-${pkgver}

  autoreconf --install
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr --sysconfdir=/etc
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install

  rm "${pkgdir}"/usr/share/bash-completion/completions/makepkg
}
