summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Maclennan2021-01-25 09:16:30 +0300
committerCaleb Maclennan2021-01-25 09:16:30 +0300
commitf10d301b627e7668da2ba7b8ab537688b3d35d70 (patch)
treecf9930b0f5e18823824f8bb61df0a535a40bc53d
downloadaur-f10d301b627e7668da2ba7b8ab537688b3d35d70.tar.gz
Initial upload: ijq 0.2.3-1
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD42
2 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4ffb9ee544c0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = ijq
+ pkgdesc = Interactive jq tool, like jqplay for the commandline
+ pkgver = 0.2.3
+ pkgrel = 1
+ url = https://git.sr.ht/~gpanders/ijq
+ arch = x86_64
+ license = GPL3
+ makedepends = go
+ depends = jq
+ source = ijq-v0.2.3.tar.gz::https://git.sr.ht/~gpanders/ijq/archive/v0.2.3.tar.gz
+ sha256sums = 1802a7b319349d86927908854e1cb27ec465e1abf502914c45658c61a9793dda
+
+pkgname = ijq
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c7fd9909719d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Caleb Maclennan <caleb@alerque.com>
+
+pkgname=ijq
+pkgver=0.2.3
+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)
+source=("$pkgname-v$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
+sha256sums=('1802a7b319349d86927908854e1cb27ec465e1abf502914c45658c61a9793dda')
+
+prepare(){
+ cd "$pkgname-v$pkgver"
+ export GOPATH="$srcdir"
+ go mod download
+}
+
+build() {
+ cd "$pkgname-v$pkgver"
+ export GOPATH="$srcdir"
+ go build \
+ -trimpath \
+ -buildmode=pie \
+ -modcacherw \
+ -ldflags "-linkmode external -extldflags \"$LDFLAGS\"" \
+ . ./...
+ # -mod=readonly \
+}
+
+check() {
+ cd "$pkgname-v$pkgver"
+ export GOPATH="$srcdir"
+ go test ./...
+}
+
+package() {
+ cd "$pkgname-v$pkgver"
+ install -Dm755 -t "$pkgdir/usr/bin/" $pkgname
+}