aboutsummaryrefslogtreecommitdiffstats
path: root/testing/gron/APKBUILD
blob: ee265d11c1419311ddfc0d99f9b695450f6135f8 (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
# Contributor: Tiago Ilieve <tiago.myhro@gmail.com>
# Maintainer: Tiago Ilieve <tiago.myhro@gmail.com>
pkgname=gron
pkgver=0.6.0
pkgrel=0
pkgdesc="Make JSON greppable"
url="https://github.com/tomnomnom/gron"
arch="all"
license="MIT"
depends=""
makedepends="go>=1.11"
source="gron-$pkgver.tar.gz::https://github.com/tomnomnom/gron/archive/v${pkgver}.tar.gz
	go.mod go.sum"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"

	go build -v -ldflags "-s -w -X main.gronVersion=$pkgver" -o gron
}

check() {
	cd "$builddir"

	./gron --version
	./gron testdata/one.json
	go test
}

package() {
	cd "$builddir"

	install -Dm755 ./gron "$pkgdir"/usr/bin/gron
}

sha512sums="aa1e2e6d00927b8b0abb5b39593deed9037d7f1fdf669f1c3c2e28ce117b270e10758027afd962499783a1f6f4d848cc6c6a0f6e4323ba8c53be14e1add622fe  gron-0.6.0.tar.gz
30d5e835903698ae1cb1203c986b4eb4989aa74fcc50b907656b5182fd5060e403ba991dcba3a65a3a215898dfeb5caa46f24ec0bc58535e4f80d937583407bb  go.mod
8d1898bd5d6dba0e121615b4c6c279b0df031eb2ec900c2afc39126be6006557f1b5e87c1a0572cca2ef45ec66775b7606b5701f28c6dbefaa9fa2fd65587a4d  go.sum"