52 lines
1.5 KiB
Bash
52 lines
1.5 KiB
Bash
# Maintainer: Jesus E. <heckyel@riseup.net>
|
|
|
|
pkgname=bash-completion
|
|
pkgver=2.11
|
|
_debver=2.11
|
|
_debrel=2
|
|
pkgrel=1
|
|
pkgdesc='Programmable completion for the bash shell'
|
|
arch=(any)
|
|
url='https://github.com/scop/bash-completion'
|
|
license=(GPL-2)
|
|
depends=(bash)
|
|
makedepends=(quilt)
|
|
options=(!emptydirs !makeflags)
|
|
source=($url/releases/download/$pkgver/$pkgname-$pkgver.tar.xz
|
|
https://deb.debian.org/debian/pool/main/b/bash-completion/bash-completion_$_debver-$_debrel.debian.tar.xz)
|
|
sha512sums=('41585f730b5114d397831ba36d10d05643c6a6179e746ddc49aa1cbef61ea5525fd2f09b2e474adee14e647f99df8d5983ee48e29a59d8a30e1daf7fb1837e06'
|
|
'da9f14358efedf516bd040a5ba69b6bdb597185cc671e2a84080fcc64f2389de0b88211aa06d6704a2ea45636de2897b5a262625b669083566b3b63bf0d203d3')
|
|
|
|
prepare() {
|
|
cd $pkgname-$pkgver
|
|
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
|
# Debian patches
|
|
export QUILT_PATCHES=debian/patches
|
|
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
|
export QUILT_DIFF_ARGS='--no-timestamps'
|
|
|
|
mv "$srcdir"/debian .
|
|
|
|
quilt push -av
|
|
fi
|
|
}
|
|
|
|
build() {
|
|
cd $pkgname-$pkgver
|
|
./configure --prefix=/usr --sysconfdir=/etc
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd $pkgname-$pkgver
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
install -Dm644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
|
|
|
|
# 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"
|
|
}
|