summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2e18146338158078541028c20ccaaf602d156fbe (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
pkgname=wlc-git
pkgver=v0.0.1.r25.g1102ef9
pkgrel=1

pkgdesc='wayland compositor library'
url='https://github.com/Cloudef/wlc'
arch=('i686' 'x86_64')
license=('MIT')

options=('debug' '!strip')

depends=('wayland' 'pixman' 'libxkbcommon' 'libinput' 'libx11' 'libxcb' 'libgl'
         'libdrm' 'mesa' 'xcb-util-image' 'xcb-util-wm')
makedepends=('git' 'cmake')

provides=('wlc')
conflicts=('wlc')

source=('git+https://github.com/Cloudef/wlc'
        'git+https://github.com/Cloudef/chck'
        'git+https://anongit.freedesktop.org/git/wayland/wayland-protocols')

sha1sums=('SKIP' 'SKIP' 'SKIP')

pkgver() {
    cd wlc
    git describe | sed 's/-/.r/; s/-/./'
}

prepare() {
    cd wlc
    git submodule init
    git config submodule.lib/chck.url "$srcdir"/chck
    git config submodule.protos/wayland-protocols.url "$srcdir"/wayland-protocols
    git submodule update lib/chck protos/wayland-protocols
}

build() {
    cd wlc
    cmake -DCMAKE_BUILD_TYPE=Upstream \
        -DCMAKE_INSTALL_LIBDIR=/usr/lib \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DSOURCE_WLPROTO=ON
    make
}

check() {
    cd wlc
    make test
}

package() {
    cd wlc
    make DESTDIR="$pkgdir" install
    install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
}