File rkcommon.spec of Package rkcommon

#
# spec file for package rkcommon
#
# Copyright (c) 2021 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


%define  soname 1
%define  lname  lib%{name}%{soname}
Name:           rkcommon
Version:        @SERVICE@
Release:        0
Summary:        Intel RenderKit common C++/CMake infrastructure
License:        Apache-2.0
Group:          Development/Tools/Building
URL:            https://github.com/ospray/rkcommon
Source:         %{name}-%{version}.tar.xz
BuildRequires:  cmake
BuildRequires:  cmake(TBB)
BuildRequires:  gcc-c++

%description
This project represents a common set of C++ infrastructure and CMake
utilities used by various components of Intel oneAPI Rendering Toolkit.

%package -n %{lname}
Summary:        Libraries for %{name}
Group:          System/Libraries

%description -n %{lname}
Development libraries for %{name}

%package devel
Summary:        Development files for %{name}
Group:          Development/Libraries/C and C++
Requires:       %{lname} = %{version}

%description devel
Development files for %{name} including headers and libraries.

%prep
%autosetup

%build
%cmake
%cmake_build

%check
%ctest

%install
%cmake_install

%post -n %{lname} -p /sbin/ldconfig
%postun -n %{lname} -p /sbin/ldconfig

%files
%doc README.md
%{_bindir}/%{name}_test_suite
%license LICENSE.txt

%files -n %{lname}
%{_libdir}/lib%{name}.so.*

%files devel
%{_includedir}/%{name}
%dir %{_libdir}/cmake
%{_libdir}/cmake/%{name}-*
%{_libdir}/lib%{name}.so

%changelog
openSUSE Build Service is sponsored by