File libeigen3-devel.spec of Package libeigen3-devel

# spec file for package libeigen3-devel
# 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

Name:           libeigen3-devel
Version:        3.2.0
Release:        0
Summary:        C++ Template Library for Linear Algebra
License:        MPL-2.0 and LGPL-2.1+ and BSD-3-Clause
Group:          Development/Libraries/C and C++
Source0:        eigen-%{version}.tar.bz2
BuildRequires:  adolc-devel
BuildRequires:  cmake
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  fftw3-devel
BuildRequires:  gcc-c++
BuildRequires:  gcc-fortran
BuildRequires:  gmp-devel
%if 0%{?suse_version} > 1210
BuildRequires:  gnu-free-fonts
BuildRequires:  freefont
BuildRequires:  freeglut-devel
BuildRequires:  glew-devel
BuildRequires:  graphviz
BuildRequires:  graphviz-gd
BuildRequires:  gsl-devel
BuildRequires:  libqt4-devel
BuildRequires:  mpfr-devel
BuildRequires:  pkg-config
BuildRequires:  pkgconfig(gl)
%if 0%{?suse_version} > 1220
BuildRequires:  sparsehash-devel
%if 0%{?suse_version} > 1210
BuildRequires:  suitesparse-devel
BuildRequires:  superlu
%if 0%{?suse_version} > 1220
BuildRequires:  texlive-amsfonts
BuildRequires:  texlive-latex
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Eigen is a C++ template library for linear algebra: matrices, vectors,
numerical solvers, and related algorithms.

%setup -q -n eigen-eigen-ffa86ffb5570

# Fix rpmlint warning "wrong-file-end-of-line-encoding"
sed -i 's/\r$//' COPYING.MINPACK

# Remove build time references so build-compare can do its work
echo "HTML_TIMESTAMP = NO" >> doc/

mkdir build
cd build
cmake \
  -DCMAKE_INSTALL_PREFIX=%{_prefix} ..
make %{?_smp_mflags} VERBOSE=1
%if 0%{?suse_version} > 1140
make doc %{?_smp_mflags} VERBOSE=1
cd ..

%make_install -C build

# Manually install documentation in order to fix rpmlint error "files-duplicated-waste" and warning "files-duplicate" with fdupes macro
mkdir -p %{buildroot}%{_docdir}/%{name}
%if 0%{?suse_version} > 1140
cp -a build/doc/html/ %{buildroot}%{_docdir}/%{name}/
cp -a COPYING.* %{buildroot}%{_docdir}/%{name}/

%fdupes -s %{buildroot}

%doc %{_docdir}/%{name}/