summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 771823882395709ac8d16459d7b5d93f6009907c (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Maintainer    : Vincent Grande <shoober420@gmail.com>
# Contributor   : Antonin Décimo <antonin dot decimo at gmail dot com>
# Contributor   : Adrian Perez de Castro <aperez@igalia.com>
# Contributor   : Eric Vidal <eric@obarun.org>
# Contributor   : Jean-Michel T.Dydak <jean-michel@obarun.org>
# Contributor   : Brett Cornwall <ainola@archlinux.org>
# Contributor   : Omar Pakker

pkgname=wlroots-nosystemd-nox11-git
pkgver=0.13.0
pkgrel=1
pkgdesc='Modular Wayland compositor library'
url="https://github.com/swaywm/wlroots"
arch=('x86_64')
license=('MIT')
source=("git+https://github.com/swaywm/wlroots")
sha512sums=('SKIP')

depends=(
    'libinput'
    'libxcb'
    'libxkbcommon'
    'opengl-driver'
    'pixman'
    'wayland'
   'xcb-util-errors'
    'xcb-util-image'
    'xcb-util-wm'
    'xcb-util-renderutil'
#    'xorg-xwayland'
)
makedepends=(
    'git'
    'meson'
    'ninja'
    'wayland-protocols'
)
provides=('libwlroots.so' 'wlroots' 'wlroots-git' "wlroots=${pkgver%%.r*}")
conflicts=('wlroots' 'wlroots-git')

pkgver () {
	cd wlroots
	(
		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)"
	)
}

_path=(
    --prefix=/usr
)

_flags=(
    --buildtype=debug
    -Dlibseat=disabled
    -Dxcb-errors=enabled
    -Dxcb-icccm=enabled
    -Dxcb-xkb=enabled
    -Dxwayland=disabled
    -Dx11-backend=disabled
    -Dexamples=false
    -Dxdg-foreign=disabled
    -Db_ndebug=true
    -Dwerror=false
)

build() {
    meson wlroots build "${_path[@]}" "${_flags[@]}"
    ninja $NINJAFLAGS -C build
}

package() {
    DESTDIR="$pkgdir" ninja $NINJAFLAGS -C build install
    install -Dm644 "wlroots/LICENSE" -t "$pkgdir/usr/share/licenses/wlroots/"
}

post_upgrade() {
  echo "Make sure to upgrade wlroots-nosystemd-nox11-git and sway-nosystemd-git together."
  echo "Upgrading one but not the other is unsupported."
}