File splinter.spec of Package splinter

%define soname  %{nil}

Name:           splinter
Version:        3.0
Release:        1
Summary:        Library for multivariate function approximation with splines
Group:          Development/Libraries/C and C++
License:        MPL-2.0
URL:            https://github.com/bgrimstad/splinter
Source0:        splinter-%{version}.tar.gz
Patch0:         patch-splinter-mlpyinstall.diff
Patch1:         patch-splinter-eigen3.diff
Patch2:         patch-splinter-cmake.diff

BuildRequires:  eigen3-devel
BuildRequires:  gcc-c++
BuildRequires:  cmake
BuildRequires:  doxygen

%description

%package -n     lib%{name}%{soname}
Summary:        Library for multivariate function approximation with splines

%description -n lib%{name}%{soname}
SPLINTER (SPLine INTERpolation) is a library for multivariate
function approximation with splines. The library can be used for
function approximation, regression, data smoothing, data reduction,
and much more. Spline approximations are represented by a speedy C++
implementation of the tensor product B-spline.

%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries/C and C++
Requires:       lib%{name}%{soname} = %{version}-%{release}
Requires:       eigen3-devel

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%package        matlab-devel
Group:          Development/Libraries/C and C++
Summary:        Matlab development files for %{name}
Requires:       lib%{name}%{soname} = %{version}-%{release}

%description    matlab-devel
The %{name}-matlab package contains files for
developing matlab applications that use %{name}.

%package        python-devel
Group:          Development/Libraries/C and C++
Summary:        Python development files for %{name}
Requires:       lib%{name}%{soname} = %{version}-%{release}

%description    python-devel
The %{name}-python package contains files for
developing python applications that use %{name}.



%prep
%setup
%patch 0 -p1
%patch 1 -p1
%patch 2 -p1

%build
%cmake -DEIGEN_DIRECTORY=%{_includedir}/eigen3 \
       -DLIBRARY_INSTALL_DIRECTORY=%{_lib} \
       -DARCH=%{_arch}
%cmake_build

%install
%cmake_install

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files -n lib%{name}%{soname}
%defattr(-,root,root)
%doc README.md version CREDITS.md CHANGELOG.md LICENSE
%dir %{_datadir}/SPLINTER
%dir %{_libdir}/SPLINTER
%{_libdir}/*.so

%files devel
%defattr(-,root,root)
%doc docs
%{_includedir}/*
%{_libdir}/*.a

%files matlab-devel
%defattr(-,root,root)
%{_datadir}/SPLINTER/splinter-matlab
%{_libdir}/SPLINTER/splinter-matlab

%files python-devel
%defattr(-,root,root)
%{_datadir}/SPLINTER/splinter-python
%{_libdir}/SPLINTER/splinter-python

%changelog
* Sun Sep 10 2017 Rene van Paassen <Rene.vanPaassen@gmail.com>
- 
openSUSE Build Service is sponsored by