# Contributor: Sören Tempel # Contributor: Kiyoshi Aman # Maintainer: Lucas Ramage pkgname=bash-completion pkgver=2.9 pkgrel=0 pkgdesc="Command-line tab-completion for bash" options="!check" # 7 Tests fail url="https://github.com/scop/bash-completion" arch="noarch" license="GPL-2.0-or-later" depends="bash" makedepends="autoconf automake bc grep iputils musl-utils procps psmisc sed usbutils" checkdepends="py3-pexpect py3-pytest" subpackages="$pkgname-doc" source="https://github.com/scop/${pkgname}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.xz 01-generalized-containers.patch 02-skip-getconf-test.patch 03-skip-iconv-test.patch 04-fix-ifupdown.patch 05-fix-arp-test.patch" builddir="$srcdir"/$pkgname-$pkgver # Provided with util-linux and networkmanager: _conflicting=" cal chsh dmesg eject hd hexdump hwclock ionice look ncal newgrp renice rfkill rtcwake su nmcli umount mount " prepare() { cd "$builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir/$i" || return 1;; esac done # ifup/down tests are still failing rm $builddir/test/t/test_ifdown.py rm $builddir/test/t/test_ifup.py sed -i '/test_ifdown.py \\/d' $builddir/test/t/Makefile.am || return 1; sed -i '/test_ifup.py \\/d' $builddir/test/t/Makefile.am || return 1; autoreconf -fiv || return 1; } build() { cd "$builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var make } check() { cd "$builddir" mkdir ./bin ln -sf "$(which pytest-3)" ./bin/pytest export PATH="${PATH}:$PWD/bin" make check } package() { cd "$builddir" make -j1 DESTDIR="$pkgdir" install mkdir -p "$pkgdir"/usr/share/doc/$pkgname/ install -m644 AUTHORS CHANGES CONTRIBUTING.md README.md \ "$pkgdir"/usr/share/doc/$pkgname/ cd "$pkgdir"/usr/share/bash-completion/completions for c in $_conflicting; do rm -f $c done } sha512sums="e864091196d670699bdb2af3fc40464788e79c932fa564afa7ba34a637aa1583db7dbceab0e7ba6718fac99e9fd2dfb03d1ee51d7cf279d925ad63f60401d7d5 bash-completion-2.9.tar.xz 1f7466e7bbc2eea30e75e3dd10819289f1586c2ba9b2a2f5199e4e8af99ed4ec081638e8c8efc6aefd8a8336cb67527b4152c2cd89620b173dfed798268c686c 01-generalized-containers.patch 540cdc655911912475a48a191061f7a94a550d94ac750b601dc8a21e72ef469890b6416cee8fcb677cdb51b21b6f54742a0dc954b0cea5bc4d0b4adf8af86ec6 02-skip-getconf-test.patch a8d145f8b38ed9422426696e2204167e6dacfb03dec09dc7c23e83c9a6295524a9f93be6ac10e0e4a5ca079965dfe542bca11aae392248c7e21c6855a4543d64 03-skip-iconv-test.patch 97de46d137b6f6b54891a13f8308928854e1bdc33e35808e1aa760514c9d3dbb87bcf2a08db72dc941e68bc3af7a106a81e7159e452823dc07f874d3b8e27b77 04-fix-ifupdown.patch 262f7b6c654d8be95930c6230b4b9d1add344ef1a60f0c6c81cf46bb104dab3814a96e0fb92e99449cbd086a53ec1169e1db21b45436007710952004895e7a3f 05-fix-arp-test.patch"