| 1 | # Contributor: Dmitry Zakharchenko <[email protected]> |
| 2 | # Maintainer: Robert Mongold <[email protected]> |
| 3 | pkgname=exercism |
| 4 | pkgver=3.5.8 |
| 5 | pkgrel=1 |
| 6 | pkgdesc="Command-line client for exercism.io" |
| 7 | url="https://github.com/exercism/cli" |
| 8 | arch="all" |
| 9 | license="MIT" |
| 10 | makedepends="go" |
| 11 | options="net" # go |
| 12 | subpackages=" |
| 13 | $pkgname-bash-completion |
| 14 | $pkgname-fish-completion |
| 15 | $pkgname-zsh-completion |
| 16 | " |
| 17 | source="$pkgname-$pkgver.tar.gz::https://github.com/exercism/cli/archive/v$pkgver.tar.gz" |
| 18 | builddir="$srcdir"/cli-$pkgver |
| 19 | |
| 20 | export GOFLAGS="$GOFLAGS -modcacherw" |
| 21 | |
| 22 | build() { |
| 23 | go build -o bin/exercism exercism/main.go |
| 24 | } |
| 25 | |
| 26 | check() { |
| 27 | # tests use runtime Caller to find fixtures |
| 28 | GOFLAGS="${GOFLAGS/-trimpath/}" go test ./... |
| 29 | } |
| 30 | |
| 31 | package() { |
| 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 | |
| 42 | sha512sums=" |
| 43 | 9dc6ca99aacf5eea39c7aa8a9195f7478a20e02fb71231903fd5ebf96ec5713903347a75abd1bb84bc3db58c25a5a68ecdcfc8f330d55a588b95c24c0797390b exercism-3.5.8.tar.gz |
| 44 | " |