# Contributor: David Florness <david@florness.com>
# Maintainer: David Florness <david@florness.com>
pkgname=gopls
pkgver=0.16.2
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="
cdd712a4e316b3f629ceff1a3742da2cf30b94acc45af484addb6ae7cbf0b9272dbbee8ebc252744dd4df38852760ec3fce4b48fecee1a7a751c37d7edcb0424  gopls-0.16.2.tar.gz
"
