summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ed67b36bda9f205103e88b980c14c9582a6d3d01 (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
44
# Maintainer: inhzus <inhzus@gmail.com>
pkgname=cppinsights-git
pkgver=r4.524cc07
pkgrel=1
pkgdesc="C++ Insights - See your source code with the eyes of a compiler"
arch=('x86_64')
url="https://cppinsights.io"
license=('MIT')
groups=()
depends=(llvm-libs clang llvm)
makedepends=('git' 'sed' 'ninja')
provides=("cppinsights")
conflicts=("cppinsights")
replaces=()
backup=()
options=()
# install=
source=("$pkgname::git+https://github.com/andreasfertig/cppinsights.git")
noextract=()
md5sums=('SKIP')

# Please refer to the 'USING VCS SOURCES' section of the PKGBUILD man page for
# a description of each element in the source array.

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

build() {
	cd "$srcdir/${pkgname}"
    test -d build || mkdir build
    cd build
    cmake -G"Ninja" ..
    sed -i "s/-isystem/-I/g" build.ninja
    sed -i "s|LINK_LIBRARIES.*|LINK_LIBRARIES=-L/usr/lib -lclang-cpp -lLLVM|" build.ninja
    ninja
}

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