summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 555984b70a9e373ac06ee3a27fc5fa009f2e4fc1 (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
35
36
37
38
39
40
41
42
43
# Maintainer: Vic Luo <vicluo96 at gmail.com>

pkgname=cquery-git
_pkgname=cquery
pkgver=1177.2533f13
pkgrel=1
pkgdesc='Low-latency vscode language server for large C++ code-bases, powered by libclang.'
arch=('any')
url='https://github.com/jacobdufault/cquery/'
license=('MIT')
depends=('clang')
makedepends=("git" "python" "llvm")
source=('git+https://github.com/jacobdufault/cquery.git#branch=master')
md5sums=(
    'SKIP'
)

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

prepare() {
    cd $_pkgname
    git submodule update --init
    sed -e "s/, '-Werror'//g" -i ./wscript
}

build() {
    cd $_pkgname
    python waf configure --prefix="$pkgdir/usr" --use-system-clang
    python waf build
}

check() {
    cd $_pkgname
    yes | build/release/bin/cquery --test-unit --test-index --clang-sanity-check
}

package() {
    cd $_pkgname
    python waf install
}