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