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:        0
Release:        0
Summary:        XR Runtime (XRT)
License:        GPL-3.0-or-later
Url:            https://monado.freedesktop.org
Source:         %{name}-%{version}.tar.bz2
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(wayland-protocols)
BuildRequires:  glslang-devel
BuildRequires:  doxygen
BuildRequires:  graphviz

%description
Monado is an open source XR runtime delivering immersive experiences such as VR
and AR on 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 currently is being developed for GNU/Linux and aims to support other operating
systems in the near future.
"Monado" has no specific meaning and is just a name.

%package devel
Summary: Development files for Monado

%description devel
Devel information for Monado.

%prep
%setup -qn %{name}-%{version}

%build
export CFLAGS="$CFLAGS -I/usr/include/wayland"
export CXXFLAGS="$CXXFLAGS -I/usr/include/wayland"
%cmake \
    -DBUILD_DOC:BOOL=OFF \
    -DDRIVER_HANDTRACKING:BOOL=ON \
    -DXRT_OPENXR_INSTALL_ACTIVE_RUNTIME=ON \

%cmake_build

%install
%cmake_install

%fdupes -s %{buildroot}

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

%files
%dir %{_sysconfdir}/xdg/openxr
%dir %{_datadir}/openxr
%dir %{_datadir}/steamvr-monado

%{_sysconfdir}/xdg/openxr/*
%{_userunitdir}/monado.service
%{_userunitdir}/monado.socket

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

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


%files devel
%dir %{_includedir}/monado
%{_includedir}/monado/monado.h

%changelog
openSUSE Build Service is sponsored by