%define pkgname OpenXR-SDK-Source %define openxrname openxr %define libmajor 1 %define libname %mklibname %{openxrname} %{libmajor} %define develname %mklibname -d %{openxrname} %define staticdevname %mklibname -d -s %{openxrname} %global vpath_builddir _build Name: openxr Version: 1.0.11 Release: %mkrel 1 Summary: An API for writing VR and AR software Group: Graphics/3D License: ASL 2.0 URL: https://github.com/KhronosGroup/OpenXR-SDK-Source Source: https://github.com/KhronosGroup/%{pkgname}/archive/%{pkgname}-release-%{version}.tar.gz # from deb Patch100: 0009-On-Linux-make-the-API-layer-manifest-have-an-absolut.patch Patch101: 0010-Mangle-API-layer-manifest-filename.patch Patch102: 0009-loader_test-Add-to-CMake-as-a-test.patch BuildRequires: cmake BuildRequires: glslang BuildRequires: glslang-devel BuildRequires: ninja BuildRequires: vulkan-devel BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(glu) BuildRequires: pkgconfig(jsoncpp) BuildRequires: pkgconfig(xxf86vm) BuildRequires: pkgconfig(xxf86misc) BuildRequires: pkgconfig(xcb-icccm) BuildRequires: pkgconfig(xcb-keysyms) BuildRequires: pkgconfig(xcb) BuildRequires: pkgconfig(xcb-glx) BuildRequires: pkgconfig(xcb-randr) BuildRequires: pkgconfig(xcb-dri2) BuildRequires: pkgconfig(xrandr) BuildRequires: python-jinja2 %description OpenXR is an API specification for writing portable, cross-platform, virtual reality (VR) and augmented reality (AR) software. %package -n %{libname} Summary: Libraries for writing VR and AR software Group: System/Libraries %description -n %{libname} This package contains the library needed to run programs dynamically linked with OpenXR. %package -n %{develname} Summary: Headers and development files of the OpenXR library Group: Development/C Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} %description -n %{develname} Development files for the USD library. Install this package if you want to compile applications using the OpenXR library. %prep %setup -q -n %{pkgname}-release-%{version} %patch100 -p1 %patch101 -p1 %patch102 -p1 %build %cmake \ %if %{mgaversion} >= 8 -G Ninja \ %endif -DBUILD_ALL_EXTENSIONS:BOOL=ON \ -DBUILD_LOADER:BOOL=ON \ -DBUILD_TESTS:BOOL=ON \ -DPRESENTATION_BACKEND:STRING=xlib \ -DDYNAMIC_LOADER:BOOL=ON \ -DOPENGL_glx_LIBRARY:STRING=GL %if %{mgaversion} >= 8 %ninja_build all -C %{_vpath_builddir} %else %make_build cd .. %endif # cleanup rm -f %{buildroot}%{_datadir}/doc/openxr/LICENSE %install %if %{mgaversion} >= 8 %ninja_install -C %{_vpath_builddir} %else %make_install -C build %endif %files %doc BUILDING.md CHANGELOG.SDK.md LICENSE README.md %{_bindir}/* %{_datadir}/openxr %{_mandir}/man1/*.1* %files -n %{libname} %{_libdir}/*.so.%{libmajor}{,.*} # plugins like? %dir %{_libdir}/openxr/1/api_layers %{_libdir}/openxr/1/api_layers/*.so %files -n %{develname} %{_libdir}/lib*.so %{_includedir}/* %{_libdir}/cmake/openxr/*.cmake %{_libdir}/pkgconfig/*.pc %changelog * Sat Sep 19 2020 ghibo 1.0.11-1.mga8 - initial release.