# Contributor: David Florness <david@florness.com>
# Maintainer: David Florness <david@florness.com>
pkgname=gopls
pkgver=0.16.1
pkgrel=1
pkgdesc="Language server for Go programming language"
url="https://github.com/golang/tools/blob/master/gopls"
license="BSD-3-Clause"
arch="all"
options="!check chmod-clean"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/golang/tools/archive/gopls/v$pkgver.tar.gz"
builddir="$srcdir/tools-$pkgname-v$pkgver/$pkgname"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -trimpath -o dist/gopls
}

package() {
	install -Dm755 dist/gopls "$pkgdir"/usr/bin/gopls
}

sha512sums="
3a6f43a44c7135cacbb8827edd01064b660169761e78c6f4dbbfa6c430e31c45d976b6aa2cb19c5ab3a69137ef461459cea959262ab76b6eed5ce4575edba6fc  gopls-0.16.1.tar.gz
"
