aboutsummaryrefslogtreecommitdiffstats
path: root/testing/datamash/APKBUILD
blob: e14f4b893f92bc24dda8f8abad18c004780c1b04 (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
44
45
46
47
# Contributor: Assaf Gordon <assafgordon@gmail.com>
# Maintainer: Assaf Gordon <assafgordon@gmail.com>
pkgname=datamash
pkgver=1.6
pkgrel=0
pkgdesc="command-line text/math procesing"
url="https://www.gnu.org/software/datamash/"
arch="all"
license="GPL-3.0-or-later"
source="https://ftpmirror.gnu.org/datamash/datamash-$pkgver.tar.gz"
subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--disable-nls \
		--disable-werror \
		--with-bash-completion-dir=local
	make
}

check() {
	make check
}

package() {
	make -j1 DESTDIR="$pkgdir" install
	rm -rf "$pkgdir"/usr/share/datamash/examples \
		"$pkgdir"/usr/lib/charset.alias
}

bashcomp() {
	depends=""
	pkgdesc="Bash completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

	mkdir -p "$subpkgdir"/usr/share/bash-completion/completions/
	mv "$pkgdir"/usr/share/datamash/bash-completion.d/datamash \
		"$subpkgdir"/usr/share/bash-completion/completions/
	rm -r "$pkgdir"/usr/share/datamash/bash-completion.d || true
}

sha512sums="bd4e147e68f9b71d04a2c8150fc3726720aff111a9d1ce873ec0fbcd1fc0f12369e866327180f0561e68a1085bff042673cd97a9ad146edeccca3a1bdc45ac18  datamash-1.6.tar.gz"