aboutsummaryrefslogtreecommitdiffstats
path: root/testing/datamash/APKBUILD
blob: 57d7bcb369a9a3e264f4cfa9b56987457df04458 (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
48
49
50
51
# Contributor: Assaf Gordon <assafgordon@gmail.com>
# Maintainer: Assaf Gordon <assafgordon@gmail.com>
pkgname=datamash
pkgver=1.3
pkgrel=0

pkgdesc="command-line text/math procesing"
url="https://www.gnu.org/software/datamash/"
arch="all"
license="GPL"
source="http://ftpmirror.gnu.org/datamash/$pkgname-$pkgver.tar.gz"
subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch"

builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"

	./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
}

package() {
	cd "$builddir"

	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="3c36dd01035dc114f2fbfcb8746354e496e6c1536f7b5908cf25632d9cbaddfcd06fc26f8883ef845a6ecd85ceb5708bb7edb3d1b1c6efa273ef5ec0b758366a  datamash-1.3.tar.gz"