projects/aports·blob master · refs

44 lines · 1.2 KiB

1# Contributor: Dmitry Zakharchenko <[email protected]>
2# Maintainer: Robert Mongold <[email protected]>
3pkgname=exercism
4pkgver=3.5.8
5pkgrel=1
6pkgdesc="Command-line client for exercism.io"
7url="https://github.com/exercism/cli"
8arch="all"
9license="MIT"
10makedepends="go"
11options="net" # go
12subpackages="
13 $pkgname-bash-completion
14 $pkgname-fish-completion
15 $pkgname-zsh-completion
16 "
17source="$pkgname-$pkgver.tar.gz::https://github.com/exercism/cli/archive/v$pkgver.tar.gz"
18builddir="$srcdir"/cli-$pkgver
19
20export GOFLAGS="$GOFLAGS -modcacherw"
21
22build() {
23 go build -o bin/exercism exercism/main.go
24}
25
26check() {
27 # tests use runtime Caller to find fixtures
28 GOFLAGS="${GOFLAGS/-trimpath/}" go test ./...
29}
30
31package() {
32 install -Dm755 bin/exercism "$pkgdir"/usr/bin/exercism
33
34 install -Dm644 shell/exercism_completion.bash \
35 "$pkgdir"/usr/share/bash-completion/completions/$pkgname
36 install -Dm644 shell/exercism.fish \
37 "$pkgdir"/usr/share/fish/vendor_completions.d/$pkgname.fish
38 install -Dm644 shell/exercism_completion.zsh \
39 "$pkgdir"/usr/share/zsh/site-functions/_$pkgname
40}
41
42sha512sums="
439dc6ca99aacf5eea39c7aa8a9195f7478a20e02fb71231903fd5ebf96ec5713903347a75abd1bb84bc3db58c25a5a68ecdcfc8f330d55a588b95c24c0797390b exercism-3.5.8.tar.gz
44"