summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3179cf5cbe002ff6e8f02e212215277ad1a7f61f (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
46
47
48
49
50
# Maintainer: Aetf <aetf@unlimitedcodeworks.xyz>

pkgname=kdevelop-clang-tidy-git
pkgver=r62.e36fbf4
pkgrel=1
pkgdesc="A plugin for KDevelop to support clang-tidy static analysis - Git build"
arch=('x86_64')
url="http://www.kdevelop.org/"
license=('GPL')
groups=('kde' 'kdevelop-plugins')
depends=('kdevplatform-git' 'kdevelop-git' 'clang-tools-extra')
makedepends=('cmake' 'git')
source=(
    'git+git://anongit.kde.org/kdev-clang-tidy'
    'disable-tests.patch'
)
provides=('kdevelop-clang-tidy')
conflicts=('kdevelop-clang-tidy')
sha256sums=('SKIP' 'ad7fc6fd5348174ba6f144c01d786cb65de745614925a813948ef26d1fd4c58a')

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

prepare() {
    cd "$srcdir/kdev-clang-tidy"
    patch -i ../disable-tests.patch
}

build() {
    cd "$srcdir/kdev-clang-tidy"

    mkdir -p "$srcdir/build" && cd "$srcdir/build"

    cmake ../kdev-clang-tidy \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DLIB_INSTALL_DIR=lib \
        -DKDE_INSTALL_USE_QT_SYS_PATHS=ON

    make
}

package() {
    cd "$srcdir/build"

    make DESTDIR="$pkgdir/" install
}