File monado.spec of Package monado

#
# spec file for package monado
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           monado
Version:        25.0.0
Release:        0
Summary:        XR Runtime (XRT)
License:        GPL-3.0-or-later
Url:            https://gitlab.freedesktop.org/monado/monado
Source0:        %{url}/-/archive/v%{version}/%{name}-v%{version}.tar.bz2#/%{name}-v%{version}.tar.bz2
Source1:        monado.rpmlintrc
Patch0:         0001-mr-2464-fix-compilation-on-latest-vulkan-headers.patch
BuildRequires:  fdupes
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig(eigen3)
BuildRequires:  pkgconfig(vulkan)
BuildRequires:  pkgconfig(opencv)
BuildRequires:  pkgconfig(udev)
BuildRequires:  OpenHMD-devel
BuildRequires:  pkgconfig(libjpeg)
BuildRequires:  pkgconfig(gstreamer-1.0)
BuildRequires:  pkgconfig(wayland-client)
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(libbsd)
BuildRequires:  pkgconfig(systemd)
BuildRequires:  pkgconfig(sdl2)
BuildRequires:  pkgconfig(hidapi-libusb)
# https://bugzilla.opensuse.org/show_bug.cgi?id=1200372
BuildRequires:  pkgconfig(realsense2)
BuildRequires:  pkgconfig(libcjson)
BuildRequires:  pkgconfig(libuvc)
BuildRequires:  pkgconfig(survive)
BuildRequires:  Mesa-libGLESv2-devel
BuildRequires:  Mesa-libGLESv1_CM-devel
BuildRequires:  Mesa-libGLESv3-devel
BuildRequires:  pkgconfig(libdrm)
BuildRequires:  pkgconfig(wayland-client)
BuildRequires:  pkgconfig(wayland-protocols)
BuildRequires:  pkgconfig(wayland-scanner)
BuildRequires:  pkgconfig(openvr)
BuildRequires:  glslang-devel
BuildRequires:  doxygen
BuildRequires:  graphviz

%description
Monado is an open source XR runtime delivering immersive experiences such as VR
and AR on mobile, PC/desktop, and any other device
(because gosh darn people come up with a lot of weird hardware).
Monado aims to be a complete and conforming implementation of the OpenXR API made by Khronos.
The project is primarily developed on GNU/Linux, but also runs on Android and Windows.
"Monado" has no specific meaning and is just a name.

%package devel
Summary :       Header files for monado
Requires:       monado = %{version}

%description devel
Development files for the Monado OpenXR runtime.

%prep
%autosetup -p1 -n %{name}-v%{version}

%build
%cmake \
    -DBUILD_DOC:BOOL=OFF \
    -DXRT_BUILD_DRIVER_STEAMVR_LIGHTHOUSE=ON \
    -DXRT_HAVE_WAYLAND:BOOL=ON \
    -DXRT_HAVE_WAYLAND_DIRECT:BOOL=ON \
    -DXRT_HAVE_VULKAN:BOOL=ON \
    -DDRIVER_HANDTRACKING:BOOL=ON \

%cmake_build

%install
%cmake_install

%fdupes -s %{buildroot}

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%license LICENSE

%dir %{_datadir}/openxr
%dir %{_datadir}/steamvr-monado

%{_userunitdir}/monado.service
%{_userunitdir}/monado.socket

%{_bindir}/monado-cli
%{_bindir}/monado-ctl
%{_bindir}/monado-service
%{_bindir}/monado-gui

%{_libdir}/libmonado.so.25
%{_libdir}/libmonado.so.25.0.0
%{_libdir}/libopenxr_monado.so
%{_datadir}/openxr/*
%{_datadir}/steamvr-monado/*

%files devel
%license LICENSE
%doc README.md
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/
%{_libdir}/libmonado.so

%changelog
openSUSE Build Service is sponsored by