Date: Saturday, May 9, 2020 @ 17:32:53 Author: foxboron Revision: 626044
upgpkg: staticcheck 2020.1.3-1 Added: staticcheck/trunk/PKGBUILD ----------+ PKGBUILD | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) Added: PKGBUILD =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2020-05-09 17:32:53 UTC (rev 626044) @@ -0,0 +1,38 @@ +# Maintainer: Morten Linderud <[email protected]> + +pkgname=staticcheck +pkgver=2020.1.3 +pkgrel=1 +pkgdesc="Staticcheck - The advanced Go linter" +arch=('x86_64') +url="https://staticcheck.io" +license=("MIT") +depends=('glibc') +makedepends=('go' 'git') +source=("$pkgname-$pkgver.tar.gz::https://github.com/dominikh/go-tools/archive/$pkgver.tar.gz") +md5sums=('0032e437aa43b5dfe0c84f3e1bb9a266') + +prepare(){ + cd "go-tools-$pkgver" + mkdir -p bin +} + +build(){ + cd "go-tools-$pkgver" + export GOFLAGS="-buildmode=pie -trimpath" + export CGO_CFLAGS="$CFLAGS" + export CGO_LDFLAGS="$LDFLAGS" + go build -o bin/staticcheck ./cmd/staticcheck +} + +check(){ + cd "go-tools-$pkgver" + GOROOT="/usr/lib/go" go test -v ./... +} + +package(){ + cd "go-tools-$pkgver" + install -p -Dm755 bin/staticcheck "${pkgdir}/usr/bin/staticcheck" + install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENCE" + install -Dm644 "LICENSE-THIRD-PARTY" "${pkgdir}/usr/share/licenses/${pkgname}/LICENCE-THIRD-PARTY" +}
