# Maintainer: Dave Henderson pkgname=gomplate _goname="github.com/hairyhenderson/$pkgname" pkgver=2.6.0 pkgrel=0 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="974d4a3c64fe9413c637b855f42d10660c13c5f455f873b3ecdd87d294fc93705f5c37b0509f18f10cbfcbc974442bebd972897d6ab8fdbe339ac05f9f1cdf2a gomplate-2.6.0.tar.gz"