# Contributor: Dmitry Zakharchenko # Maintainer: Dmitry Zakharchenko pkgname=exercism pkgver=3.1.0 pkgrel=1 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/completions/$pkgname.fish install -Dm644 shell/exercism_completion.zsh \ "$pkgdir"/usr/share/zsh/site-functions/_$pkgname } sha512sums=" b0cb312304453b6843f722c88ceb08e749e83e9165926b3e427052a2e7f6305f90a4f9714dd2a28058948aa4e535baf90d58a97973397055ee0a82b7d75d0fe9 exercism-3.1.0.tar.gz "