# Contributor: Hoang Nguyen # Contributor: Tuan Hoang # Maintainer: Tuan Hoang pkgname=yq pkgver=4.34.2 pkgrel=2 pkgdesc="Portable command-line YAML processor written in Go" url="https://github.com/mikefarah/yq" arch="all" license="MIT" makedepends="go" checkdepends="bash tzdata" subpackages=" $pkgname-bash-completion $pkgname-zsh-completion $pkgname-fish-completion " source="$pkgname-$pkgver.tar.gz::https://github.com/mikefarah/yq/archive/v$pkgver.tar.gz" export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}" export GOTMPDIR="${GOTMPDIR:-"$srcdir"}" export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}" build() { go build -v -o yq ./yq shell-completion bash > yq.bash ./yq shell-completion zsh > yq.zsh ./yq shell-completion fish > yq.fish } check() { go test ./... # Yanked from scripts/acceptance.sh for test in acceptance_tests/*.sh; do echo "--------------------------------------------------------------" echo "$test" echo "--------------------------------------------------------------" bash "$test" done } package() { install -Dm755 yq "$pkgdir"/usr/bin/yq install -Dm644 yq.bash \ "$pkgdir"/usr/share/bash-completion/completions/yq install -Dm644 yq.zsh \ "$pkgdir"/usr/share/zsh/site-functions/_yq install -Dm644 yq.fish \ "$pkgdir"/usr/share/fish/vendor_completions.d/yq.fish } sha512sums=" 235bece12983be74458e31b64ae3e38c1958c0e3d09e09c418d7698ec045abb16da75a7ebf0d9e8bb715c90656341f459f38a303392f9d52a38c9c146def2987 yq-4.34.2.tar.gz "