summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 19b8cc1aef94d2062e35554682d80c5258cc7c43 (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
51
52
53
54
55
56
57
58
59
# Maintainer: Christoph Haag <christoph.haag@collabora.com>
# Author: Matthias Blaicher <matthias at blaicher dot com>

pkgname=disman-git
pkgver=0.519.0.beta.0.r6.g231fc34
pkgrel=1
pkgdesc='Qt/C++ display management library by KWinFT project ~ forked from KDE libkscreen'
arch=(
    i686
    x86_64
)
url='https://gitlab.com/kwinft/disman'
license=(LGPL)
depends=(
    qt5-x11extras
    libxrandr
    kwayland
    wrapland
)
makedepends=(
    extra-cmake-modules
    git
)
provides=(disman)
conflicts=(disman)
source=('git+https://gitlab.com/kwinft/disman.git')
sha512sums=('SKIP')

pkgver() {
    cd "$srcdir/disman"
    
    git describe --long --tags | sed "s/^disman\@//;s/\([^-]*-g\)/r\1/;s/-/./g"
}

prepare() {
    mkdir -p "$srcdir/build"
}

build() {
    cd "$srcdir/build"
    
    cmake \
        "$srcdir/disman" \
        -G Ninja \
        -D CMAKE_BUILD_TYPE="Release" \
        -D CMAKE_INSTALL_PREFIX="/usr" \
        -D KDE_INSTALL_LIBDIR="lib" \
        -D KDE_INSTALL_LIBEXECDIR="lib" \
        -D KDE_INSTALL_USE_QT_SYS_PATHS="ON" \
        -D BUILD_TESTING="OFF"
    
    ninja
}

package() {
    cd "$srcdir/build"
    
    DESTDIR="$pkgdir" ninja install
}