File sleef.spec of Package sleef

# spec file for package sleef
#
# Copyright (c) 2023 Fabio Pesari
#
# 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/

%define v_major 3
%define v_minor 7
%define v_patch 1

Name:          sleef
Version:       %{v_major}.%{v_minor}
#.%%{v_patch}
Release:       0
Summary:       SIMD Library for Evaluating Elementary Functions, vectorized libm and DFT
License:       BSL-1.0
Group:         Productivity/Scientific/Math
URL:           https://sleef.org/
Source0:       %{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM gh#shibatch/sleef#459
# Source1:       sleefdft.pc
BuildRequires: gcc gcc-c++
BuildRequires: cmake
BuildRequires: fftw3-devel
BuildRequires: gmp-devel
# Disabled, see gh#shibatch/sleef#458
# BuildRequires: mpfr-devel

%description
SLEEF is a library that implements vectorized versions of C standard math
functions. This library also includes DFT subroutines.

%package -n libsleef%{v_major}
Summary:       SIMD Library for Evaluating Elementary Functions, vectorized libm and DFT
License:       BSL-1.0
Group:         System/Libraries

%description -n libsleef%{v_major}
SLEEF is a library that implements vectorized versions of C standard math
functions. This library also includes DFT subroutines.

%package devel
Summary:       Development files for SLEEF
License:       BSL-1.0
Group:         Development/Languages/C and C++
Requires:      libsleef%{v_major} = %{version}

%description devel
SLEEF is a library that implements vectorized versions of C standard math
functions. This library also includes DFT subroutines.

These are the development files for SLEEF.

%prep
%autosetup

%build
%cmake -DCMAKE_BUILD_TYPE=Release
%cmake_build

%install
%cmake_install
# cp %%{SOURCE1} %%{buildroot}%%{_libdir}/pkgconfig/

%post -n libsleef%{v_major} -p /sbin/ldconfig
%postun -n libsleef%{v_major} -p /sbin/ldconfig

%files -n libsleef%{v_major}
%license LICENSE.txt
%{_libdir}/libsleef*.so.*

%files devel
%doc README.md
%{_libdir}/libsleef*.so
%{_libdir}/libsleef*.so.%{v_major}
%{_includedir}/*
%dir %{_libdir}/cmake/sleef
%{_libdir}/cmake/sleef/*
%{_libdir}/pkgconfig/*

%changelog
openSUSE Build Service is sponsored by