aboutsummaryrefslogtreecommitdiffstats
path: root/community/go-task/APKBUILD
blob: 951662f46f988dc9935350997b910f4e5732d88d (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
50
51
52
53
54
55
56
57
58
59
60
# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=go-task
pkgver=3.9.0
pkgrel=3
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 GOPATH="$srcdir/go"
export GOCACHE="$srcdir/go-build"
export GOTMPDIR="$srcdir"

export GOFLAGS="$GOFLAGS -modcacherw"

build() {
	go build -v -ldflags="-X main.version=$pkgver" github.com/go-task/task/v3/cmd/task
}

check() {
	go test -v ./...
}

package() {
	install -Dm0755 task "$pkgdir"/usr/bin/go-task
	install -Dm0644 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() {
	description="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="
ab5432c3f158f8e564a76292689a385e5805b121c599774f4b651caf1b11dc07b39e3e2ed24b4d3813da35ec7c1593668bd1ae20da6a20e4dbf5a3ed2b0bd45d  go-task-3.9.0.tar.gz
84054b4a895ef3f5860e3e151d375d28cb278e1315c8d77876ba1523a745442c4ca5f27cead5655aeeb04013c9a35423e5ea36ccc7f45cb8bf2bb079857d71d1  completion-rename-to-go-task.patch
"