summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: faf79664156faa8bb5e482013641452851a9c1f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Maintainer: Timofey TItovets <nefelim4ag@gmail.com>

_pkgname=go-langserver
pkgname=$_pkgname-git
pkgver=v2.0.0.r49.gf9fdcbb3
pkgrel=1
pkgdesc="go-langserver is a Go language server that speaks Language Server Protocol. It supports editor features such as go-to-definition, hover, and find-references for Go projects."
arch=('any')
url="https://github.com/sourcegraph/go-langserver"
license=('MIT')
makedepends=('git' 'go')
provides=($_pkgname)
conflicts=($_pkgname)
options=('!strip' '!emptydirs')
source=($pkgname::git://github.com/sourcegraph/go-langserver.git)
md5sums=('SKIP')

_gourl=github.com/sourcegraph/go-langserver

pkgver() {
        cd $pkgname
        git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
        mkdir -p "$srcdir/build/src/github.com/sourcegraph/"
        cp -a ./${pkgname} "$srcdir/build/src/github.com/sourcegraph/${pkgname}"
        GOPATH="$srcdir/build" go get -v -u $_gourl
}

package() {
  cd build
  install -Dm755 bin/go-langserver "$pkgdir/usr/bin/go-langserver"
}