diff options
author | Caleb Maclennan | 2022-02-01 00:59:07 +0300 |
---|---|---|
committer | Caleb Maclennan | 2022-02-01 00:59:07 +0300 |
commit | ec2ce4342265dd6d576caed19bdb1088ff302406 (patch) | |
tree | 565414a21413a390bedd3f0d7e9a6b49b1111bfd | |
parent | ea4bff288140c05eca526d744109893a09160e3a (diff) | |
download | aur-ec2ce4342265dd6d576caed19bdb1088ff302406.tar.gz |
upgpkg: gojq 0.12.6-2
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 51 |
2 files changed, 29 insertions, 26 deletions
@@ -1,13 +1,13 @@ pkgbase = gojq pkgdesc = Pure go implementation of jq pkgver = 0.12.6 - pkgrel = 1 + pkgrel = 2 url = https://github.com/itchyny/gojq arch = x86_64 license = MIT makedepends = go depends = glibc - source = gojq-0.12.6.tar.gz::https://github.com/itchyny/gojq/archive/v0.12.6.tar.gz + source = https://github.com/itchyny/gojq/archive/v0.12.6/gojq-0.12.6.tar.gz sha256sums = 46f66af22e1701dd6f3605012c6e3ccc5bf4dc2ad1a8a7f5be248cb7c6bf316c pkgname = gojq @@ -1,42 +1,45 @@ -# Maintainer: Terin Stock <terinjokes@gmail.com> +# Maintainer: Caleb Maclennan <caleb@alerque.com> +# Contributor: Terin Stock <terinjokes@gmail.com> pkgname=gojq pkgver=0.12.6 _pkgrev=886515f -pkgrel=1 +pkgrel=2 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") +url="https://github.com/itchyny/$pkgname" +arch=(x86_64) +license=(MIT) +makedepends=(go) +depends=(glibc) +_archive="$pkgname-$pkgver" +source=("$url/archive/v$pkgver/$_archive.tar.gz") sha256sums=('46f66af22e1701dd6f3605012c6e3ccc5bf4dc2ad1a8a7f5be248cb7c6bf316c') prepare(){ - cd "${pkgname}-${pkgver}" - mkdir -p build/ + cd "$_archive" + 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 -ldflags=-linkmode=external -mod=readonly -modcacherw" - go build -o build -ldflags="-X github.com/itchyny/gojq/cli.revision=${_pkgrev}" ./cmd/gojq + cd "$_archive" + export CGO_LDFLAGS="$LDFLAGS" + export CGO_CFLAGS="$CFLAGS" + export CGO_CPPFLAGS="$CPPFLAGS" + export CGO_CXXFLAGS="$CXXFLAGS" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" + go build -o build \ + -ldflags="-X ${url#*//}/cli.revision=$_pkgrev" \ + "./cmd/$pkgname" } check() { - cd "${pkgname}-${pkgver}" - go test ./... + cd "$_archive" + 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}" + cd "$_archive" + install -Dm0755 -t "$pkgdir/usr/bin/" "build/$pkgname" + install -Dm0755 -t "$pkgdir/usr/share/zsh/site-functions/" _gojq + install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE } |