app=bash-completion
version=2.11
build=1sml
homepage="https://github.com/scop/bash-completion"
download="https://github.com/scop/bash-completion/archive/refs/tags/$version.tar.gz"
requires="bash"
desc="Programmable completion for the bash shell"

build() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z**
  cd $app-$version
  fixbuilddirpermissions

  # Thank you slackware
  applypatch $srcdir/fixup-sh-script-completions.diff

  ./configure \
    --prefix="" \
    --sysconfdir=/etc

  make
  make install DESTDIR=$pkg 

  cp COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
551638e4b97be74ec97624bb9b952dd093a0f6b41f85932efc6a2b914d3a58a9e34b3efd0f4f49ed20fc089e2c93cb0997a0017fefaa7aa3b78d83878d58eda2  bash-completion-2.11.tar.lz
313db416a83f811d52ed7ea530a45851b34ed736eb119ff539127983f300cfd9d4fef95c5e134255f55b082e3f41e9129f48eb85d81c87e8321b735d4d83a483  fixup-sh-script-completions.diff
"
