summaryrefslogtreecommitdiff
path: root/repo/bash-completion/bash-completion.xibuild
blob: 0b4b0d7bc5f05f9f406a8147eec3ac0ae1a9cd08 (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
35
36
37
38
39
40
41
42
43
#!/bin/sh

NAME="bash-completion"
DESC="Command-line tab-completion for bash"

MAKEDEPS="autoconf automake bc grep procps-ng psmisc sed usbutils"

PKG_VER=2.11
SOURCE="https://github.com/scop/bash-completion/releases/download/$PKG_VER/bash-completion-$PKG_VER.tar.xz"

prepare() {
	default_prepare

	# ifup/down tests are still failing
	rm $BUILD_ROOT/test/t/test_ifdown.py
	rm $BUILD_ROOT/test/t/test_ifup.py
	sed -i '/test_ifdown.py \\/d' $BUILD_ROOT/test/t/Makefile.am
	sed -i '/test_ifup.py \\/d' $BUILD_ROOT/test/t/Makefile.am
	autoreconf -fiv
}

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	make -j1 DESTDIR="$PKG_DEST" install

	mkdir -p "$PKG_DEST"/usr/share/doc/bash-completion/
	install -m644 AUTHORS CHANGES CONTRIBUTING.md README.md \
		"$PKG_DEST"/usr/share/doc/bash-completion/

	cd "$PKG_DEST"/usr/share/bash-completion/completions
	for c in $_conflicting; do
		rm -f $c
	done
}