summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0d63e07e6ed625f7600fefcbe0e7aec0d837ece5 (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: Mikhail Rudenko <mike.rudenko@gmail.com>
_pkgname=bingo
pkgname=$_pkgname-git
pkgver=r885.43cf020
pkgrel=2
pkgdesc='A Go language server that speaks Language Server Protocol, largely inspired by go-langserver (git version).'
arch=('x86_64')
url="https://github.com/saibing/bingo"
license=('MIT')
makedepends=('go' 'git')
source=(git+https://github.com/saibing/bingo)
md5sums=('SKIP')

provides=($_pkgname)
conflicts=($_pkgname)

pkgver() {
  cd $_pkgname
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd $_pkgname
  go build \
    -gcflags "all=-trimpath=$PWD" \
    -asmflags "all=-trimpath=$PWD" \
    -ldflags "-extldflags $LDFLAGS" \
    -o $_pkgname .
}

package() {
  cd $_pkgname
  install -Dm755 $_pkgname "$pkgdir"/usr/bin/$_pkgname
}