Date: Friday, February 22, 2019 @ 20:02:08 Author: felixonmars Revision: 435319
addpkg: golang-github-alecthomas-units 0.0.20151022-1 Added: golang-github-alecthomas-units/ golang-github-alecthomas-units/repos/ golang-github-alecthomas-units/trunk/ golang-github-alecthomas-units/trunk/PKGBUILD ----------+ PKGBUILD | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) Added: golang-github-alecthomas-units/trunk/PKGBUILD =================================================================== --- golang-github-alecthomas-units/trunk/PKGBUILD (rev 0) +++ golang-github-alecthomas-units/trunk/PKGBUILD 2019-02-22 20:02:08 UTC (rev 435319) @@ -0,0 +1,28 @@ +# Maintainer: Felix Yan <[email protected]> + +pkgname=golang-github-alecthomas-units +pkgver=0.0.20151022 +_commit=2efee857e7cfd4f3d0138cc3cbb1b4966962b93a +pkgrel=1 +pkgdesc='Helpful unit multipliers and functions for Go' +arch=('any') +url="https://github.com/alecthomas/units" +license=('MIT') +depends=('go-pie' 'golang-github-stretchr-testify') +source=("$pkgname-$_commit.tar.gz::https://github.com/alecthomas/units/archive/$_commit.tar.gz") +sha512sums=('855f15eeb83bdc16981694f522aa1e200a3857ed11ae87fca9b0cc70734eac76f5082bc3ed92f843b818da14b58dc921dbb1aed4ea35de056c087a64b7e25fe4') + +check() { + export GOPATH="$srcdir/build:/usr/share/gocode" + mkdir -p "$srcdir"/build/src/github.com/alecthomas + cp -a "$srcdir"/units-$_commit "$srcdir"/build/src/github.com/alecthomas/units + cd "$srcdir"/build/src/github.com/alecthomas/units + go test -v $(go list ./... | grep -v vendor) +} + +package() { + mkdir -p "$pkgdir"/usr/share/gocode/src/github.com/alecthomas + cp -a "$srcdir"/units-$_commit "$pkgdir"/usr/share/gocode/src/github.com/alecthomas/units + + install -Dm644 units-$_commit/COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING +}
