archrelease: copy trunk to community-any
[ArchLinux/community.git] / golang-github-kr-pretty / trunk / PKGBUILD
blob47a5c3bf7ca088ebc441373f01b7fe74d43e5fba
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=golang-github-kr-pretty
4 pkgver=0.2.1
5 pkgrel=1
6 pkgdesc='Pretty printing for Go values'
7 arch=('any')
8 url="https://github.com/kr/pretty"
9 license=('MIT')
10 depends=('go' 'golang-github-kr-text')
11 source=("$pkgname-$pkgver.tar.gz::https://github.com/kr/pretty/archive/v$pkgver.tar.gz")
12 sha512sums=('8f4a02171056d983bd67e964818fbfe705a0a549d2db43e9b3add2383c9191cc218449daaeba4b77228fb0cbdf6badcb0e75600e8b7c8dc3cddae1e0c4de83f0')
14 check() {
15   export GOPATH="$srcdir/build:/usr/share/gocode"
16   mkdir -p "$srcdir"/build/src/github.com/kr
17   cp -a "$srcdir"/pretty-$pkgver "$srcdir"/build/src/github.com/kr/pretty
18   cd "$srcdir"/build/src/github.com/kr/pretty
19   go test -v $(go list ./...)
22 package() {
23   mkdir -p "$pkgdir"/usr/share/gocode/src/github.com/kr
24   cp -a "$srcdir"/pretty-$pkgver "$pkgdir"/usr/share/gocode/src/github.com/kr/pretty
26   install -Dm644 pretty-$pkgver/License "$pkgdir"/usr/share/licenses/$pkgname/License