projects/aports·blob master · refs

50 lines · 1.5 KiB

1maintainer="Hoang Nguyen <[email protected]>"
2pkgname=cue-cli
3pkgver=0.17.1
4pkgrel=0
5pkgdesc="CLI for CUE configuration and validation language"
6url="https://cuelang.org/"
7arch="all"
8license="Apache-2.0"
9makedepends="go"
10subpackages="
11 $pkgname-bash-completion
12 $pkgname-fish-completion
13 $pkgname-zsh-completion
14 "
15options="net" # download Go modules
16source="$pkgname-$pkgver.tar.gz::https://github.com/cue-lang/cue/archive/refs/tags/v$pkgver.tar.gz
17 fix-test-ppc64le.patch"
18builddir="$srcdir/cue-$pkgver"
19
20build() {
21 go build -v -o bin/cue ./cmd/cue/
22
23 for shell in bash fish zsh; do
24 ./bin/cue completion $shell > cue.$shell
25 done
26}
27
28check() {
29 # Use a directory outside aports repository for test artifacts to pass TestScript test case.
30 # (the test expects `git VCS not found in any parents of ".+"` message in stderr)
31 unset GOTMPDIR
32
33 go test -timeout 30m ./...
34}
35
36package() {
37 install -Dm755 bin/cue -t "$pkgdir"/usr/bin/
38
39 install -Dm644 cue.bash \
40 "$pkgdir"/usr/share/bash-completion/completions/cue
41 install -Dm644 cue.fish \
42 "$pkgdir"/usr/share/fish/vendor_completions.d/cue.fish
43 install -Dm644 cue.zsh \
44 "$pkgdir"/usr/share/zsh/site-functions/_cue
45}
46
47sha512sums="
485d0970a8729839a28269ef8bc8948f4992c0c3ebe8e11a431f5b2a7a785cc7496b35b1f46f42aa5158c7ee6fac23480a87a4b609602c32440ac00dbc2789576c cue-cli-0.17.1.tar.gz
49add64a27eeb446a67a8f8604205e340c6973ab59ece7c9f46af4fd273dc8b8cc63d9ecf1590ab946fdf2de62d0935ad15cd03d269babb8adc7707ae5ccd05350 fix-test-ppc64le.patch
50"