diff options
author | Mario Finelli | 2020-09-25 10:49:50 -0400 |
---|---|---|
committer | Mario Finelli | 2020-09-25 10:49:50 -0400 |
commit | 86ccc3cba2d0b38cfd3e0293284af66b46fbaaa3 (patch) | |
tree | bb272a6105cdfbeccb93f483181863fae8ee0563 /PKGBUILD | |
download | aur-86ccc3cba2d0b38cfd3e0293284af66b46fbaaa3.tar.gz |
Initial commit -- version 3.4.0
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..adbe106e9f22 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Mario Finelli <mario at finel dot li> + +pkgname=go-yq +pkgver=3.4.0 +pkgrel=1 +pkgdesc='portable command-line YAML processor' +arch=(x86_64) +url=https://github.com/mikefarah/yq +license=(MIT) +makedepends=(go) +conflicts=(yq) +source=(https://github.com/mikefarah/yq/archive/${pkgver}.tar.gz) +sha256sums=('76b96cd2ba503eef396d8773d874b4fdc56fc3aff3c61b0808afadff2a6daae7') + +prepare() { + cd yq-$pkgver + go mod vendor +} + +check() { + cd yq-$pkgver + go test ./... +} + +build() { + cd yq-$pkgver + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" + go build -o yq +} + +package() { + cd yq-$pkgver + install -Dm755 yq "$pkgdir/usr/bin/yq" + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} |