summaryrefslogtreecommitdiff
path: root/testing/exercism/APKBUILD
blob: bf7b1f3e54058fd5cc79f24da493d17a6b779b14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Contributor: Dmitry Zakharchenko <dmitz@disroot.org>
# Maintainer: Dmitry Zakharchenko <dmitz@disroot.org>
pkgname=exercism
pkgver=3.2.0
pkgrel=3
pkgdesc="Command-line client for exercism.io"
url="https://github.com/exercism/cli"
arch="all"
license="MIT"
makedepends="go"
options="!check"
subpackages="
	$pkgname-bash-completion
	$pkgname-fish-completion
	$pkgname-zsh-completion
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/exercism/cli/archive/v$pkgver.tar.gz"
builddir="$srcdir"/cli-$pkgver

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
export GOFLAGS="$GOFLAGS -modcacherw"

prepare() {
	default_prepare

	go mod edit -replace=github.com/fsnotify/fsnotify=github.com/fsnotify/fsnotify@v1.5.1
	go get -d github.com/fsnotify/fsnotify@v1.5.1
}

build() {
	go build -o bin/exercism exercism/main.go
}

package() {
	install -Dm755 bin/exercism "$pkgdir"/usr/bin/exercism

	install -Dm644 shell/exercism_completion.bash \
		"$pkgdir"/usr/share/bash-completion/completions/$pkgname
	install -Dm644 shell/exercism.fish \
		"$pkgdir"/usr/share/fish/vendor_completions.d/$pkgname.fish
	install -Dm644 shell/exercism_completion.zsh \
		"$pkgdir"/usr/share/zsh/site-functions/_$pkgname
}

sha512sums="
1d874652caf9845ab2f2e9da96083b29e903f4ba3de3c9dd16185a291d3cb5e224fe2264129fd47ed3eed2918f366b7d96e6aeaafb2db8a94cc7e39556756b46  exercism-3.2.0.tar.gz
"