Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gojq: init at 0.12.16 #21822

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions mingw-w64-gojq/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Maintainer: Wu, Zhenyu <[email protected]>

_realname=gojq
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=0.12.16
pkgrel=1
pkgdesc="Pure Go implementation of jq (mingw-w64)"
arch=(any)
mingw_arch=('mingw32' 'mingw64' 'ucrt32' 'ucrt64' 'clang32' 'clang64' 'clangarm64')
url="https://github.com/itchyny/gojq"
license=('MIT')
# LTO renders GO BUILDID unreproducible: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108534
options=(!lto)
source=("${url}/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz")
sha256sums=('80365ef7dd7935296d42b98c79b51723a01d3c332501098485bebb4b9a89eb13')

prepare() {
cd "${_realname}-${pkgver}"
mkdir -p build
}

build() {
cd "${_realname}-${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 \
"./cmd/$_realname"
}

package() {
cd "${_realname}-${pkgver}"
install -Dm 755 "build/$_realname.exe" -t "${pkgdir}/$MINGW_PREFIX/bin"
install -Dm 644 LICENSE -t "${pkgdir}/$MINGW_PREFIX/share/licenses/${_realname}"
}

# vim:set ts=2 sw=2 et:
Loading