summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 824fef30ab6a6e02433220561254ac09bdc5d13f (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
# Maintainer: Daniel Bermond <dbermond@archlinux.org>

pkgbase=monado
pkgname=('monado' 'monado-doc')
pkgver=24.0.0
pkgrel=1
pkgdesc='An open source OpenXR runtime'
arch=('x86_64')
url='https://monado.dev/'
license=('BSL-1.0')
makedepends=('git' 'cmake' 'doxygen' 'graphviz' 'cnmatrix' 'eigen' 'glslang' 'qt6-base'
             'python-setuptools' 'v4l-utils' 'vulkan-headers'
             'dbus' 'bluez-libs' 'cjson' 'glib2' 'gstreamer' 'gst-plugins-base-libs' 'hidapi'
             'libdrm' 'libgl' 'libjpeg-turbo' 'librealsense' 'libsurvive' 'libusb' 'libuvc'
             'libx11' 'libxcb' 'opencv' 'openhmd' 'sdl2' 'systemd-libs' 'vulkan-icd-loader'
             'wayland' 'wayland-protocols' 'zlib')
source=("https://gitlab.freedesktop.org/monado/monado/-/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.bz2")
sha256sums=('a1097c2168bb546f9da8983d7326828c08b0bf57116ef6211e3ab3561187d86e')

build() {
    cmake -B build -S "${pkgname}-v${pkgver}" \
        -G 'Unix Makefiles' \
        -DCMAKE_BUILD_TYPE:STRING='None' \
        -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
        -DBUILD_DOC:BOOL='ON' \
        -Wno-dev
    cmake --build build
}

check() {
    ctest --test-dir build --output-on-failure
}

package_monado() {
    depends=('dbus' 'bluez-libs' 'cjson' 'glib2' 'gstreamer' 'gst-plugins-base-libs' 'hidapi'
             'libdrm' 'libgl' 'libjpeg-turbo' 'librealsense' 'libsurvive' 'libusb' 'libuvc'
             'libx11' 'libxcb' 'opencv' 'openhmd' 'sdl2' 'systemd-libs' 'vulkan-icd-loader'
             'wayland' 'zlib')
    install=monado.install
    provides=('openxr-runtime')
    
    DESTDIR="$pkgdir" cmake --install build
}

package_monado-doc() {
    pkgdesc+=' (documentation)'
    arch=('any')
    
    install -d -m755 "${pkgdir}/usr/share/doc/monado"
    cp -dr --no-preserve='ownership' build/doc/html "${pkgdir}/usr/share/doc/monado"
}