File openvr.spec of Package openvr

#
# spec file for package openvr
#
# 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/
#

%global _lto_cflags %{_lto_cflags} -ffat-lto-objects

Name:           openvr
Version:        1632235897.82e18d7
Release:        12.13
Summary:	OpenVR SDK
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
License:        MIT
# FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
Group:          System/X11/Utilities
Url:           https://github.com/ValveSoftware/openvr 
Source:         %{name}-%{version}.tar.bz2
BuildRequires:  cmake
BuildRequires:  gcc-c++

%description
OpenVR is an API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting. This repository is an SDK that contains the API and samples. The runtime is under SteamVR in Tools on Steam.

%prep
%setup -q

%build
export CFLAGS="-flto -Wl,-flto"
export SUSE_ASNEEDED=0
%cmake -DBUILD_SHARED:BOOL=ON
%cmake_build

%install
export SUSE_ASNEEDED=0
%cmake_install
mv %{buildroot}/usr/lib lib.tmp
mv lib.tmp %{buildroot}/%{_libdir}

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

%files
%dir %{_includedir}/openvr
%{_includedir}/openvr/openvr.h
%{_includedir}/openvr/openvr_capi.h
%{_includedir}/openvr/openvr_driver.h
%{_libdir}/libopenvr_api.so
%{_datadir}/pkgconfig/openvr.pc

%changelog

openSUSE Build Service is sponsored by