summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6fffcb61d193fe60c76c3fc835de27d1524c5d22 (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
45
# Maintainer: Laurenz <lldb-mi-git@laure.nz>
pkgname=lldb-mi-git
pkgver=r83.2388bd7
pkgrel=1
pkgdesc="LLDB's machine interface driver"
arch=('any')
url="https://github.com/lldb-tools/lldb-mi"
license=('Apache')
depends=('lldb' 'llvm')
makedepends=('git' 'cmake')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/lldb-tools/lldb-mi.git')
md5sums=('SKIP')

pkgver() {
    cd "$srcdir/${pkgname%-git}"
    (
        set -o pipefail
        git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
            printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
    )
}

build() {
    export CFLAGS+=" ${CPPFLAGS}"
    export CXXFLAGS+=" ${CPPFLAGS}"
    cmake \
        -B build \
        -S "$srcdir/${pkgname%-git}" \
        -DCMAKE_BUILD_TYPE='None' \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -Wno-dev \
        ..
    make \
        -j \
        -C build
}

package() {
    make \
        -C build \
        DESTDIR="$pkgdir" \
        install
}