summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3c354f851a1863f68aa6be3e557505aa42242505 (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
pkgname=wlc-git
pkgver=r802.a30a674
pkgrel=1

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

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

optdepends=('libx11: Running the compositor as an Xorg client'
            'libxcb: Running the compositor as an Xorg client'
            'mesa: For optional platform support (GLESv2, EGL, DRM)'
            'nvidia: For optional platform support (GLESv2, EGL)'
            'xcb-util-image: Needed for xwayland support.')

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

source=('git://github.com/Cloudef/wlc'
        'git://github.com/Cloudef/chck')

md5sums=('SKIP' 'SKIP')

options=('!debug' '!strip')

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

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

build() {
    cd wlc
    cmake -DCMAKE-BUILD_TYPE=Upstream -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib
    make
}

check() {
    cd wlc
    make test
}

package() {
    cd wlc
    make DESTDIR="$pkgdir" install
}