Date: Friday, February 22, 2019 @ 20:08:27 Author: felixonmars Revision: 435321
addpkg: golang-github-alecthomas-template 0.0.20160405-1 Added: golang-github-alecthomas-template/ golang-github-alecthomas-template/repos/ golang-github-alecthomas-template/trunk/ golang-github-alecthomas-template/trunk/PKGBUILD ----------+ PKGBUILD | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) Added: golang-github-alecthomas-template/trunk/PKGBUILD =================================================================== --- golang-github-alecthomas-template/trunk/PKGBUILD (rev 0) +++ golang-github-alecthomas-template/trunk/PKGBUILD 2019-02-22 20:08:27 UTC (rev 435321) @@ -0,0 +1,28 @@ +# Maintainer: Felix Yan <[email protected]> + +pkgname=golang-github-alecthomas-template +pkgver=0.0.20160405 +_commit=a0175ee3bccc567396460bf5acd36800cb10c49c +pkgrel=1 +pkgdesc="Fork of Go's text/template adding newline elision" +arch=('any') +url="https://github.com/alecthomas/template" +license=('BSD') +depends=('go-pie') +source=("$pkgname-$_commit.tar.gz::https://github.com/alecthomas/template/archive/$_commit.tar.gz") +sha512sums=('5ca546170725c3bdd4d9b27ca3976d6dc6376be8db685e6e26cfaef4a51560f78702b7babbe5ed0b2d934d0c32867bc69b11ae757071dc143a4453e6e7ffabdf') + +check() { + export GOPATH="$srcdir/build:/usr/share/gocode" + mkdir -p "$srcdir"/build/src/github.com/alecthomas + cp -a "$srcdir"/template-$_commit "$srcdir"/build/src/github.com/alecthomas/template + cd "$srcdir"/build/src/github.com/alecthomas/template + go test -v $(go list ./... | grep -v vendor) +} + +package() { + mkdir -p "$pkgdir"/usr/share/gocode/src/github.com/alecthomas + cp -a "$srcdir"/template-$_commit "$pkgdir"/usr/share/gocode/src/github.com/alecthomas/template + + install -Dm644 template-$_commit/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +}
