summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b28db61b3a53425432af2da7a7c30ea9da313887 (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
# Maintainer: Kuan-Yen Chou <kuanyenchou (at) gmail (dot) com>
# Contributor: gilbus <aur(AT)tinkershell.eu>

_wlr_version=0.18
pkgname=cage-git
pkgver=0.1.5.r53.g34de3f7
pkgrel=1
pkgdesc="Kiosk compositor for Wayland"
depends=(glibc wayland "libwlroots-${_wlr_version}.so" libxkbcommon)
makedepends=(git meson scdoc wayland-protocols xorg-server-xwayland)
optdepends=(
    'polkit: System privilege control. Required if not using seatd service'
    'xorg-server-xwayland: X11 support'
)
arch=(x86_64)
url="https://www.hjdskes.nl/projects/cage/"
license=(MIT)
provides=(cage)
conflicts=(cage)
source=("${pkgname}::git+https://github.com/cage-kiosk/cage.git")
sha512sums=('SKIP')

pkgver() {
    cd "$srcdir/$pkgname"
    if git describe --long --tags >/dev/null 2>&1; then
        git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
    else
        printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git describe --always)"
    fi
}

build() {
    cd "$srcdir/$pkgname"
    # export PKG_CONFIG_PATH="/usr/lib/wlroots0.17/pkgconfig/"
    meson setup --buildtype=release --prefix /usr "$srcdir/build"
    ninja -C "$srcdir/build"
}

check() {
    ninja -C "$srcdir/build" test
}

package() {
    cd "$srcdir/$pkgname"
    DESTDIR="$pkgdir" meson install -C "$srcdir/build"
    install -vDm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
    install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}