File gsl.spec of Package gsl

#
# spec file for package gsl
#
# Copyright (c) 2017 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/
#


%define lname   libgsl23
%define lcblasname libgslcblas0
Name:           gsl
Version:        2.4
Release:        0
Summary:        GNU Scientific Library
License:        GPL-3.0+
Group:          Productivity/Scientific/Math
Url:            https://www.gnu.org/software/gsl/
Source0:        https://ftp.gnu.org/pub/gnu/gsl/gsl-%{version}.tar.gz
Source1:        https://ftp.gnu.org/pub/gnu/gsl/gsl-%{version}.tar.gz.sig
Source2:        https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=gsl&download=1#/%{name}.keyring
Patch0:         gsl-1.6-initvars.diff
Patch1:         rstat_test.patch
Patch5:         gsl-wrap.diff
Patch6:         gsl-qawc-test-x86-precision.diff
Patch7:         gsl-disable-fma.patch
Patch8:         gsl-fsf_address.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  blas-devel
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The GNU Scientific Library (GSL) is a collection of routines for
numerical computing. The routines are written from scratch by the GSL
team in ANSI C and present a modern Applications Programming Interface
(API) for C programmers, while allowing wrappers to be written for very
high level languages.

%package     -n %{lname}
Summary:        GNU Scientific Library
License:        GPL-3.0+
Group:          System/Libraries

%description -n %{lname}
The GNU Scientific Library (GSL) is a collection of routines for
numerical computing. The routines are written from scratch by the GSL
team in ANSI C and present a modern Applications Programming Interface
(API) for C programmers, while allowing wrappers to be written for very
high level languages.

The library covers the following areas:

Complex Numbers - Roots of Polynomials - Special Functions -
Vectors and Matrices - Permutations - Sorting - BLAS Support -
Linear Algebra - Eigensystems - Fast Fourier Transforms - Quadrature -
Random Numbers - Quasi-Random Sequences - Random Distributions -
Statistics - Histograms - N-Tuples - Monte Carlo Integration -
Simulated Annealing - Differential Equations - Interpolation -
Numerical Differentiation - Chebyshev Approximation - Series Acceleration -
Discrete Hankel Transforms - Root-Finding - Minimization -
Least-Squares Fitting - Physical Constants - IEEE Floating-Point

%package     -n %{lcblasname}
Summary:        A standard C language APIs for BLAS from GNU Scientific Library
# file conflict, see boo#991155
License:        GPL-3.0+
Group:          System/Libraries
Obsoletes:      libgsl0

%description -n %{lcblasname}
This library provides a native C interface to BLAS routines. This is part of
GNU Scientific Library.

%package        devel
Summary:        GNU Scientific Library - development files
License:        GPL-2.0+
Group:          Development/Libraries/C and C++
Requires:       %{lname} = %{version}, %{lcblasname} = %{version}
Requires(pre):  %{install_info_prereq}

%description devel
This package contains the headers, static libraries and some
documentation for GSL.

The GNU Scientific Library (GSL) is a collection of routines for
numerical computing. The routines are written from scratch by the GSL
team in ANSI C, and present a modern Applications Programming Interface
(API) for C programmers, while allowing wrappers to be written for very
high level languages.

The library covers the following areas,

Complex Numbers - Roots of Polynomials - Special Functions -
Vectors and Matrices - Permutations - Sorting - BLAS Support -
Linear Algebra - Eigensystems - Fast Fourier Transforms - Quadrature -
Random Numbers - Quasi-Random Sequences - Random Distributions -
Statistics - Histograms - N-Tuples - Monte Carlo Integration -
Simulated Annealing - Differential Equations - Interpolation -
Numerical Differentiation - Chebyshev Approximation - Series Acceleration -
Discrete Hankel Transforms - Root-Finding - Minimization -
Least-Squares Fitting - Physical Constants - IEEE Floating-Point

%package	doc
Summary:        GNU Scientific Library - development files
License:        GPL-2.0+
Group:          Documentation/Other
Requires(preun):  %{install_info_prereq}
Requires(post):  %{install_info_prereq}

%description	doc
This package contains documentation for GSL

The GNU Scientific Library (GSL) is a collection of routines for
numerical computing. The routines are written from scratch by the GSL
team in ANSI C, and present a modern Applications Programming Interface
(API) for C programmers, while allowing wrappers to be written for very
high level languages.

The library covers the following areas,

Complex Numbers - Roots of Polynomials - Special Functions -
Vectors and Matrices - Permutations - Sorting - BLAS Support -
Linear Algebra - Eigensystems - Fast Fourier Transforms - Quadrature -
Random Numbers - Quasi-Random Sequences - Random Distributions -
Statistics - Histograms - N-Tuples - Monte Carlo Integration -
Simulated Annealing - Differential Equations - Interpolation -
Numerical Differentiation - Chebyshev Approximation - Series Acceleration -
Discrete Hankel Transforms - Root-Finding - Minimization -
Least-Squares Fitting - Physical Constants - IEEE Floating-Point

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch5 -p1
%patch6
%patch7 -p1
%patch8

%build
autoreconf -fiv
export CFLAGS="%{optflags}"
%configure \
	--disable-static \
	--with-pic \
	--enable-shared \
	--with-gnu-ld
make %{?_smp_mflags}

%check
make %{?_smp_mflags} check || ( find -name \*.log -print -exec cat {} \; ; exit 1 )

%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
rm -f %{buildroot}%{_infodir}/dir

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

%files
%defattr(-,root,root)
%{_bindir}/gsl-histogram
%{_bindir}/gsl-randist
%{_mandir}/man1/gsl-histogram.1%{ext_man}
%{_mandir}/man1/gsl-randist.1%{ext_man}
%doc COPYING

%files -n %{lname}
%defattr(-,root,root)
%{_libdir}/libgsl.so.*

%files -n %{lcblasname}
%defattr(-,root,root)
%{_libdir}/libgslcblas.so.*

%files devel
%defattr(-,root,root)
%doc COPYING
%{_includedir}/gsl
%{_libdir}/libgsl*.so
%{_libdir}/pkgconfig/gsl.pc
%{_bindir}/gsl-config
%{_datadir}/aclocal/gsl.m4
%{_mandir}/man1/gsl-config.1%{ext_man}
%{_mandir}/man3/gsl.3%{ext_man}

%files doc
%defattr(-,root,root)
%doc AUTHORS BUGS COPYING ChangeLog NEWS README THANKS TODO
%{_infodir}/gsl-ref*

%post doc
%install_info --info-dir=%{_infodir} %{_infodir}/gsl-ref.info%{ext_info}

%preun doc
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gsl-ref.info%{ext_info}

%changelog
openSUSE Build Service is sponsored by