aboutsummaryrefslogtreecommitdiffstats
path: root/community/gomplate/APKBUILD
blob: 2794183c47c9451c15d2957b1a4673f65a1d9f64 (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
# Maintainer: Dave Henderson <dhenderson@gmail.com>
pkgname=gomplate
_goname="github.com/hairyhenderson/$pkgname"
pkgver=1.6.0
pkgrel=1
pkgdesc="A versatile Go template processor"
url="https://github.com/hairyhenderson/gomplate"
arch="all"
license="MIT"
depends="ca-certificates"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
builddir="$srcdir/src/$_goname"

prepare() {
	mkdir -p "${builddir%/*}"
	mv "$srcdir"/$pkgname-$pkgver "$builddir"/ || return 1

	default_prepare
}

build() {
	cd "$builddir"
	make build \
		GOPATH="$srcdir" \
		VERSION="$pkgver" \
		COMMIT="unknown"
}

check() {
	cd "$builddir"

	# Note: make test (that runs go test -race) doesn't work.
	GOPATH="$srcdir" go test -v || return 1

	./bin/gomplate --help >/dev/null
}

package() {
	cd "$builddir"
	install -D -m 755 bin/gomplate "$pkgdir"/usr/bin/gomplate || return 1
}

sha512sums="deb512ddb2b61b25ef716621c05723c2b02bff506860ccb15575474cd6167cf582a59eb531dc23077419cc287368194946b29810437582a194d2c67569eb62a8  gomplate-1.6.0.tar.gz"