summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0835698487fd38007898691e21fd3ef36ad9a49a (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
# Contributor: fcying <fcyingmk2@gmail.com>
# Maintainer: JohanChane <johanchanex@gmail.com>
pkgname=compiledb-go-git
pkgver=1.3.0
pkgrel=1
pkgdesc="A Go tool to generate compile_commands.json from Go build commands"
arch=('any')
url="https://github.com/fcying/compiledb-go"
license=('GPL3')
depends=('go')
makedepends=('git')
conflicts=('compiledb')
provides=('compiledb-go')
source=("$pkgname::git+https://github.com/fcying/compiledb-go.git")
sha256sums=('SKIP')

pkgver() {
    cd "$srcdir/$pkgname"
    git describe --tags | sed 's/^v//;s/-/./g'
}

build() {
    cd "$srcdir/$pkgname/cmd/compiledb"
    go build -o compiledb
}

package() {
    cd "$srcdir/$pkgname/cmd/compiledb"
    install -Dm755 compiledb "$pkgdir/usr/bin/compiledb"
}