summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerin Stock2020-05-18 17:54:49 -0700
committerTerin Stock2020-05-18 17:54:49 -0700
commit4f96b8da8200c94712ad9b29dd9c6fde1376788f (patch)
tree545c47c6655f47601cfdeff47846db2aad5b9779
downloadaur-4f96b8da8200c94712ad9b29dd9c6fde1376788f.tar.gz
gojq: v0.10.1
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD41
2 files changed, 55 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c06012a6bec4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = gojq
+ pkgdesc = Pure go implementation of jq
+ pkgver = 0.10.1
+ pkgrel = 1
+ url = https://github.com/itchyny/gojq
+ arch = x86_64
+ license = MIT
+ makedepends = go
+ depends = glibc
+ source = gojq-0.10.1.tar.gz::https://github.com/itchyny/gojq/archive/v0.10.1.tar.gz
+ sha256sums = 9a5676cf3132cd4eef1f48b36b480cd07e4e57cd1ef1d0304edd242b4f6ff0f4
+
+pkgname = gojq
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a15921b338b6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Terin Stock <terinjokes@gmail.com>
+
+pkgname=gojq
+pkgver=0.10.1
+pkgrel=1
+pkgdesc='Pure go implementation of jq'
+arch=('x86_64')
+url="https://github.com/itchyny/gojq"
+license=('MIT')
+makedepends=('go')
+depends=('glibc')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/itchyny/gojq/archive/v${pkgver}.tar.gz")
+sha256sums=('9a5676cf3132cd4eef1f48b36b480cd07e4e57cd1ef1d0304edd242b4f6ff0f4')
+
+prepare(){
+ cd "${pkgname}-${pkgver}"
+ mkdir -p build/
+}
+
+build() {
+ cd "${pkgname}-${pkgver}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -modcacherw"
+ go build -o build ./cmd/gojq
+}
+
+check() {
+ cd "${pkgname}-${pkgver}"
+ go test ./...
+}
+
+package() {
+ cd "${pkgname}-${pkgver}"
+
+ install -Dm755 "build/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+ install -Dm755 _gojq "${pkgdir}/usr/share/zsh/site-functions/_gojq"
+ install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}