projects/aports·blob master · refs

47 lines · 1.2 KiB

1# Contributor: tetsumaki <[email protected]>
2# Maintainer: omni <[email protected]>
3maintainer="omni <[email protected]>"
4pkgname=fx
5pkgver=40.0.0
6pkgrel=0
7pkgdesc="Command-line tool and terminal JSON viewer"
8url="https://github.com/antonmedv/fx"
9arch="all"
10license="MIT"
11makedepends="go"
12subpackages="$pkgname-doc
13 $pkgname-bash-completion
14 $pkgname-fish-completion
15 $pkgname-zsh-completion
16 "
17options="net" # go
18source="$pkgname-$pkgver.tar.gz::https://github.com/antonmedv/fx/archive/refs/tags/$pkgver.tar.gz"
19
20build() {
21 go build -v .
22
23 for shellcomp in bash fish zsh; do
24 ./"$pkgname" --comp "$shellcomp" > "$pkgname"."$shellcomp"
25 done
26}
27
28check() {
29 go test ./...
30}
31
32package() {
33 install -Dvm0755 fx -t "$pkgdir"/usr/bin/
34
35 install -Dvm0644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
36
37 install -Dm0644 "$pkgname".bash \
38 "$pkgdir"/usr/share/bash-completion/completions/"$pkgname"
39 install -Dm0644 "$pkgname".fish \
40 "$pkgdir"/usr/share/fish/vendor_completions.d/"$pkgname".fish
41 install -Dm0644 "$pkgname".zsh \
42 "$pkgdir"/usr/share/zsh/site-functions/_"$pkgname"
43}
44
45sha512sums="
46831ea5bfe2c6333c154fa549354769d1e10e637025cb9afa24c499c44298f560ccc8d5cec8f00c1419439207a09e2f4cbbef3ab2e9682b9ae568e58b9842440c fx-40.0.0.tar.gz
47"