Date: Thursday, September 1, 2022 @ 07:24:55 Author: felixonmars Revision: 1289809
archrelease: copy trunk to community-any Added: golang-github-sergi-go-diff/repos/community-any/ golang-github-sergi-go-diff/repos/community-any/PKGBUILD (from rev 1289808, golang-github-sergi-go-diff/trunk/PKGBUILD) ----------+ PKGBUILD | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) Copied: golang-github-sergi-go-diff/repos/community-any/PKGBUILD (from rev 1289808, golang-github-sergi-go-diff/trunk/PKGBUILD) =================================================================== --- community-any/PKGBUILD (rev 0) +++ community-any/PKGBUILD 2022-09-01 07:24:55 UTC (rev 1289809) @@ -0,0 +1,29 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +pkgname=golang-github-sergi-go-diff +pkgver=1.2.0 +pkgrel=1 +pkgdesc="Diff, match and patch text in Go" +arch=('any') +url="https://github.com/sergi/go-diff" +license=('Apache' 'MIT') +depends=('go') +checkdepends=('golang-github-stretchr-testify') +source=("$pkgname-$pkgver.tar.gz::https://github.com/sergi/go-diff/archive/v$pkgver.tar.gz") +sha512sums=('b59255315396c872bd7606034955a748ebec00f8a585975ee165b8ef43b5dcef7e1fe9634d0e09b06b98cf19b1b635cc7ca252e5bf5b92f94c31f46c1fba5bee') + +check() { + export GO111MODULE=off + export GOPATH="$srcdir/build:/usr/share/gocode" + mkdir -p "$srcdir"/build/src/github.com/sergi + cp -a "$srcdir"/go-diff-$pkgver "$srcdir"/build/src/github.com/sergi/go-diff + cd "$srcdir"/build/src/github.com/sergi/go-diff + go test -v $(go list ./...) +} + +package() { + mkdir -p "$pkgdir"/usr/share/gocode/src/github.com/sergi + cp -a "$srcdir"/go-diff-$pkgver "$pkgdir"/usr/share/gocode/src/github.com/sergi/go-diff + + install -Dm644 go-diff-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/ +}