archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / golang-github-jba-printsrc / trunk / PKGBUILD
blobdf41d7603bcd04c51517e7052f26a2d8407312c1
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=golang-github-jba-printsrc
4 pkgver=0.2.2
5 pkgrel=1
6 pkgdesc="Printing Go Values as Source"
7 arch=('any')
8 url="https://github.com/jba/printsrc"
9 license=('MIT')
10 depends=('go')
11 source=("$pkgname-$pkgver.tar.gz::https://github.com/jba/printsrc/archive/v$pkgver.tar.gz")
12 sha512sums=('a0e42ea2e0649d43fe5d45f798900872cbe0b75c985ce9d0690c023108d832f5931226698bb8edce7bcbdd0d8855846fc84263feb07d694728a18c0d18e41669')
14 check() {
15   export GO111MODULE=off
16   export GOPATH="$srcdir/build:/usr/share/gocode"
17   mkdir -p "$srcdir"/build/src/github.com/jba
18   cp -a "$srcdir"/printsrc-$pkgver "$srcdir"/build/src/github.com/jba/printsrc
19   cd "$srcdir"/build/src/github.com/jba/printsrc
20   go test -v $(go list ./...)
23 package() {
24   mkdir -p "$pkgdir"/usr/share/gocode/src/github.com/jba
25   cp -a "$srcdir"/printsrc-$pkgver "$pkgdir"/usr/share/gocode/src/github.com/jba/printsrc
27   install -Dm644 printsrc-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/