mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-31 06:12:14 +01:00
55 lines
1.5 KiB
Plaintext
55 lines
1.5 KiB
Plaintext
# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
|
|
pkgname=cue-cli
|
|
pkgver=0.5.0
|
|
pkgrel=5
|
|
pkgdesc="CLI for CUE configuration and validation language"
|
|
url="https://cuelang.org/"
|
|
# 32-bit: value out of int range
|
|
arch="all !x86 !armhf !armv7"
|
|
license="Apache-2.0"
|
|
makedepends="go"
|
|
subpackages="
|
|
$pkgname-bash-completion
|
|
$pkgname-fish-completion
|
|
$pkgname-zsh-completion
|
|
"
|
|
options="net"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/cue-lang/cue/archive/refs/tags/v$pkgver.tar.gz"
|
|
builddir="$srcdir/cue-$pkgver"
|
|
|
|
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
|
|
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
|
|
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
|
|
|
|
build() {
|
|
go build -v -o bin/cue \
|
|
-ldflags "-X cuelang.org/go/cmd/cue/cmd.version=v$pkgver" \
|
|
./cmd/cue/
|
|
|
|
for shell in bash fish zsh; do
|
|
./bin/cue completion $shell > cue.$shell
|
|
done
|
|
}
|
|
|
|
check() {
|
|
# Skip the TestGenerate test case. This test case compares generated
|
|
# code for equality. The test case ends up failing when the checked-in
|
|
# generated file was created using a different Go version.
|
|
go test -run='!(^TestGenerate$)' ./...
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 bin/cue -t "$pkgdir"/usr/bin/
|
|
|
|
install -Dm644 cue.bash \
|
|
"$pkgdir"/usr/share/bash-completion/completions/cue
|
|
install -Dm644 cue.fish \
|
|
"$pkgdir"/usr/share/fish/vendor_completions.d/cue.fish
|
|
install -Dm644 cue.zsh \
|
|
"$pkgdir"/usr/share/zsh/site-functions/_cue
|
|
}
|
|
|
|
sha512sums="
|
|
3b02cf41ddd020529158186b13414b8582abfeedbd85907bb1285329cd2d973f0aee0fd7710ceae4d6c7548ed11a083f6c646aeba077ed7fac1e3ffb67a4dbf6 cue-cli-0.5.0.tar.gz
|
|
"
|