From 5670b324a91b006ddf0d1046430d931b2461994a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=80=AA=E5=BC=82=E8=BD=AF=E7=B3=96?= <219617512+WeirdGumi@users.noreply.github.com> Date: Tue, 28 Jul 2026 05:53:44 +0800 Subject: [PATCH] [yq] 4.53.3-1: init package --- PKGBUILD | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 PKGBUILD diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000..a466ff36e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: Weird Gumi + +pkgname=yq +pkgver=4.53.3 +pkgrel=1 +pkgdesc='A portable command-line YAML, JSON, XML, CSV, TOML, HCL and properties processor' +arch=(x86_64 aarch64 riscv64 loongarch64) +url=https://mikefarah.gitbook.io/yq +license=(MIT) +depends=(musl) +makedepends=(go) +source=($pkgname-$pkgver.tar.gz::https://github.com/mikefarah/$pkgname/archive/refs/tags/v$pkgver.tar.gz) +sha256sums=(fadf86d0ae3988bb40fa8aad424d0c71658493f6377285e711c7e7e313b3b238) + +prepare() { + cd $pkgname-$pkgver + go mod download +} + +build() { + cd $pkgname-$pkgver + go build +} + +check() { + cd $pkgname-$pkgver + go test +} + +package() { + cd $pkgname-$pkgver + install -Dt "$pkgdir"/usr/bin yq + install -Dm644 -t "$pkgdir"/usr/share/doc/$pkgname README.md + _install_license_ LICENSE + ./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 +}