mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-24 03:35:38 +03:00
68 lines
1.9 KiB
Text
68 lines
1.9 KiB
Text
# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
|
|
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
|
|
pkgname=go-task
|
|
pkgver=3.21.0
|
|
pkgrel=0
|
|
pkgdesc="Task runner written in Go, installed as go-task"
|
|
url="https://taskfile.dev/"
|
|
arch="all"
|
|
license="MIT"
|
|
makedepends="go"
|
|
subpackages="
|
|
$pkgname-doc
|
|
$pkgname-task::noarch
|
|
$pkgname-bashcomp::noarch
|
|
$pkgname-fishcomp::noarch
|
|
$pkgname-zshcomp::noarch
|
|
"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/go-task/task/archive/refs/tags/v$pkgver.tar.gz
|
|
completion-rename-to-go-task.patch
|
|
"
|
|
builddir="$srcdir/task-$pkgver"
|
|
|
|
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
|
|
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
|
|
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
|
|
|
|
export GOFLAGS="$GOFLAGS -modcacherw"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
sed -i 's/complete -F _task task/complete -F _task go-task/' \
|
|
completion/bash/task.bash
|
|
}
|
|
|
|
build() {
|
|
go build -v -ldflags="-X main.version=$pkgver" github.com/go-task/task/v3/cmd/task
|
|
}
|
|
|
|
check() {
|
|
go build -o bin/ ./cmd/sleepit
|
|
go test -v ./...
|
|
}
|
|
|
|
package() {
|
|
install -Dm0755 task "$pkgdir"/usr/bin/go-task
|
|
install -Dm0644 docs/docs/usage.md "$pkgdir"/usr/share/doc/go-task/usage.md
|
|
|
|
install -Dm0644 completion/bash/task.bash \
|
|
"$pkgdir"/usr/share/bash-completion/completions/go-task.bash
|
|
install -Dm0644 completion/fish/task.fish \
|
|
"$pkgdir"/usr/share/fish/completions/go-task.fish
|
|
install -Dm0644 completion/zsh/_task \
|
|
"$pkgdir"/usr/share/zsh/site-functions/_go_task
|
|
}
|
|
|
|
task() {
|
|
pkgdesc="Task runner, written in Go, installed as task"
|
|
depends="!task"
|
|
|
|
mkdir -p "$subpkgdir/usr/bin"
|
|
ln -s /usr/bin/go-task "$subpkgdir/usr/bin/task"
|
|
}
|
|
|
|
sha512sums="
|
|
12fba75cb324f6a69eb0a70ce5fc1c7e2ecd5c8395d99072dcc227fd8500711587a0367242a1f55805b4187c9880f095da559ce20b56aad04a28ba09b959bb0f go-task-3.21.0.tar.gz
|
|
270fdb68bae58a46e75f22a58c590e1c453b897d1a6e67ab4404bd93fb950a19787abf1a064cc4f12ea47eeb227eed744d1b84a23a2d48c8057126f78b987f59 completion-rename-to-go-task.patch
|
|
"
|