blob: d1584ab9dba4fae9bee435d211f043ace8a5fbea (
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
|
# Maintainer: Caleb Maclennan <caleb@alerque.com>
pkgname=ijq
pkgver=1.1.0
pkgrel=1
pkgdesc='Interactive jq tool, like jqplay for the commandline'
arch=(x86_64)
url="https://git.sr.ht/~gpanders/$pkgname"
license=(GPL3)
depends=(jq)
makedepends=(go
scdoc)
_archive="$pkgname-v$pkgver"
source=("$_archive.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('5ee2071919c6e33e28b5becd09a42410d59c4b3c1b2928741cf2420cdbadd075')
prepare(){
cd "$_archive"
export GOPATH="$srcdir"
go mod download
}
build() {
cd "$_archive"
export GOPATH="$srcdir"
go build \
-trimpath \
-buildmode=pie \
-mod=readonly \
-modcacherw \
-ldflags "-linkmode external -extldflags \"$LDFLAGS\" -X main.Version=$pkgver" \
. ./...
make docs
}
check() {
cd "$_archive"
export GOPATH="$srcdir"
go test ./...
}
package() {
cd "$_archive"
install -Dm0755 -t "$pkgdir/usr/bin/" "$pkgname"
install -Dm0644 -t "$pkgdir/usr/share/man/man1/" "$pkgname.1"
}
|