[arch-commits] Commit in (go-yq go-yq/repos go-yq/trunk go-yq/trunk/PKGBUILD)

Daniel M. Capella polyzen at gemini.archlinux.org
Wed Oct 6 05:57:45 UTC 2021


    Date: Wednesday, October 6, 2021 @ 05:57:44
  Author: polyzen
Revision: 1027832

Add go-yq to repos

Added:
  go-yq/
  go-yq/repos/
  go-yq/trunk/
  go-yq/trunk/PKGBUILD

----------+
 PKGBUILD |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

Added: go-yq/trunk/PKGBUILD
===================================================================
--- go-yq/trunk/PKGBUILD	                        (rev 0)
+++ go-yq/trunk/PKGBUILD	2021-10-06 05:57:44 UTC (rev 1027832)
@@ -0,0 +1,51 @@
+# Maintainer: Daniel M. Capella <polyzen at archlinux.org>
+# Contributor: Mario Finelli <mario at finel dot li>
+
+pkgname=go-yq
+pkgver=4.13.3
+pkgrel=2
+pkgdesc='Portable command-line YAML processor'
+arch=('x86_64')
+url=https://github.com/mikefarah/yq
+license=('MIT')
+depends=('glibc')
+makedepends=('go')
+conflicts=('yq')
+source=("$url/archive/v$pkgver/yq-$pkgver.tar.gz")
+b2sums=('159fc2840eaa71835a7de09b200f94526d2749834594fed77756e3c60c60bfaddb5fa8759f60736bad881939adf1461b6c9fa6aeb86c233ac58b4685f9d0fc52')
+
+prepare() {
+  cd yq-$pkgver
+  go mod vendor
+}
+
+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 -modcacherw"
+  go build .
+}
+
+check() {
+  cd yq-$pkgver
+  go test ./...
+}
+
+package() {
+  cd yq-$pkgver
+  install -Dt "$pkgdir"/usr/bin yq
+  install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE
+  install -Dm644 -t "$pkgdir"/usr/share/doc/$pkgname README.md
+
+  ./yq shell-completion bash | install -Dm644 /dev/stdin \
+    "$pkgdir"/usr/share/bash-completion/completions/yq
+  ./yq shell-completion zsh | install -Dm644 /dev/stdin \
+    "$pkgdir"/usr/share/zsh/site-functions/_yq
+  ./yq shell-completion fish | install -Dm644 /dev/stdin \
+    "$pkgdir"/usr/share/fish/vendor_completions.d/yq.fish
+}
+
+# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list