File blitz.spec of Package blitz

#
# spec file for package blitz
#
# Copyright (c) 2013 SUSE LINUX Products 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/
#


Name:           blitz
Version:        0.10
Release:        0
Summary:        C++ template class library providing array objects for scientific computing
License:        LGPL-3.0 or BSD-3-Clause or Artistic-2.0
Group:          Development/Libraries/C and C++
Url:            http://www.oonumerics.org/blitz/
Source:         http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM blitz-gcc47.patch dmitry_r@opensuse.org -- Fix compilation with gcc >= 4.7
Patch0:         blitz-gcc47.patch
BuildRequires:  doxygen
BuildRequires:  gcc-c++
BuildRequires:  gcc-fortran
BuildRequires:  graphviz
BuildRequires:  pkgconfig
BuildRequires:  texlive-latex
%if %suse_version > 1220
BuildRequires:  texinfo
BuildRequires:  texlive-dvips
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Blitz++ is a C++ class library for scientific computing which provides
performance on par with Fortran 77/90. It uses template techniques to achieve
high performance. Blitz++ provides dense arrays and vectors, random number
generators, and small vectors.

%package     -n libblitz0
Summary:        Shared libraries for blitz
Group:          Development/Libraries/C and C++

%description -n libblitz0
Blitz++ is a C++ class library for scientific computing which provides
performance on par with Fortran 77/90. It uses template techniques to achieve
high performance. Blitz++ provides dense arrays and vectors, random number
generators, and small vectors.

This package provides shared libraries with blitz.

%package        devel
Summary:        Libraries, includes, etc. used to develop an application with %{name}
Group:          Development/Libraries/C and C++
Requires:       libblitz0 = %{version}
Requires:       pkgconfig

%description    devel
Blitz++ is a C++ class library for scientific computing which provides
performance on par with Fortran 77/90. It uses template techniques to achieve
high performance. Blitz++ provides dense arrays and vectors, random number
generators, and small vectors.

This package provides the header files and libraries needed to develop a blitz
application.

%package        doc
Summary:        The Blitz html docs
Group:          Documentation/Other
BuildArch:      noarch

%description    doc
Blitz++ is a C++ class library for scientific computing which provides
performance on par with Fortran 77/90. It uses template techniques to achieve
high performance. Blitz++ provides dense arrays and vectors, random number
generators, and small vectors.

This package provides documentation files for the Blitz Library.

%prep
%setup -q
%patch0 -p1

%build
%configure \
  --enable-shared \
  --disable-static \
  --enable-fortran \
  --enable-64bit \
  --disable-cxx-flags-preset \
  --disable-fortran-flags-preset

make %{?_smp_mflags}
make info
make html
make pdf

%install
make DESTDIR=%{buildroot} install
make DESTDIR=%{buildroot} install-info

find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
#Remove empty dirs and example files from the documnetation
rm -rf doc/doxygen/html/installdox
rm -rf examples/.deps
rm -rf examples/Makefile*

%check
make %{?_smp_mflags} check-testsuite

%post -n libblitz0 -p /sbin/ldconfig

%postun -n libblitz0 -p /sbin/ldconfig

%post devel
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%postun devel
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

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

%files devel
%defattr(-,root,root)
%doc examples
%{_libdir}/*.so
%{_libdir}/pkgconfig/blitz.pc
%{_includedir}/blitz/
%{_includedir}/random/
%{_infodir}/blitz.info.gz
%exclude %{_infodir}/dir

%files doc
%defattr(-,root,root,-)
%doc AUTHORS LEGAL COPYING COPYRIGHT README LICENSE NEWS
%doc doc/blitz.pdf
%doc doc/blitz.html

%changelog
openSUSE Build Service is sponsored by