archrelease: copy trunk to community-any
[ArchLinux/community.git] / golang-github-neelance-astrewrite / trunk / PKGBUILD
blob75244aba1751acce44e0f9c20dbf51a64b57a41f
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=golang-github-neelance-astrewrite
4 pkgver=0.0.20160511
5 _commit=99348263ae862cc230986ce88deaddbf7edcc034
6 pkgrel=1
7 pkgdesc="astrewrite module for Go"
8 arch=('any')
9 url="https://github.com/neelance/astrewrite"
10 license=('BSD')
11 depends=('go')
12 source=("$pkgname-$_commit.tar.gz::https://github.com/neelance/astrewrite/archive/$_commit.tar.gz")
13 sha512sums=('769665373a1a4168ab5672ddba56dfb0069c04c1868c384e92aed96e66b70708cd6ef1d3fffadc4e07b8c742b49f62f1ea0812c7fe405c9d857ef2af21cff099')
15 check() {
16   export GO111MODULE=off
17   export GOPATH="$srcdir/build:/usr/share/gocode"
18   mkdir -p "$srcdir"/build/src/github.com/neelance
19   cp -a "$srcdir"/astrewrite-$_commit "$srcdir"/build/src/github.com/neelance/astrewrite
20   cd "$srcdir"/build/src/github.com/neelance/astrewrite
21   go test -v $(go list ./...)
24 package() {
25   mkdir -p "$pkgdir"/usr/share/gocode/src/github.com/neelance
26   cp -a "$srcdir"/astrewrite-$_commit "$pkgdir"/usr/share/gocode/src/github.com/neelance/astrewrite
28   install -Dm644 astrewrite-$_commit/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/