# # spec file for package dune-istl # # Copyright (c) 2012 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/ # %define debug_package %{nil} Name: dune-istl Version: 2.5.1 Release: 0 Summary: An iterative solver template library for DUNE License: GPL-2.0 Group: Development/Libraries/C and C++ Url: http://www.dune-project.org/ Source0: http://www.dune-project.org/download/%{version}/%{name}-%{version}.tar.gz BuildRequires: dune-common-devel BuildRequires: gmp-devel BuildRequires: metis-devel suitesparse-devel BuildRequires: pkgconfig %if 0%{?rhel} BuildRequires: devtoolset-6-toolchain %{?el6:BuildRequires: cmake3 boost148-devel} %{?!el6:BuildRequires: cmake boost-devel} %else BuildRequires: cmake boost-devel %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: dune-common = %{version} # Since it is a pure template library.. Requires: dune-istl-devel = %{version} # Workaround broken boost cmake macros %description dune-istl is the iterative solver template library which provides generic sparse matrix/vector classes and a variety of solvers based on these classes. A special feature is the use of templates to exploit the recursive block structure of finite element matrices at compile time. Available solvers include Krylov methods, (block-) incomplete decompositions and aggregation-based algebraic multigrid. %package devel Summary: Development and header files for DUNE Group: Development/Libraries/C and C++ Requires: dune-common-devel = %{version} Requires: gmp-devel Requires: metis-devel suitesparse-devel BuildArch: noarch %description devel This package contains the development and header files for DUNE. %prep %setup -q %build mkdir %{_target_platform} pushd %{_target_platform} %if 0%{?rhel} scl enable devtoolset-6 bash CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" %{?el6:cmake3} %{?!el6:cmake} .. -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-6/root/usr/bin/g++ -DCMAKE_C_COMPILER=/opt/rh/devtoolset-6/root/usr/bin/gcc -DCMAKE_Fortran_COMPILER=/opt/rh/devtoolset-6/root/usr/bin/gfortran %{?el6:-DBOOST_LIBRARYDIR=%{_libdir}/boost148 -DBOOST_INCLUDEDIR=%{_includedir}/boost148} -DCMAKE_BUILD_TYPE=Relase -DBUILD_SHARED_LIBS=1 %else CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 %endif popd make -C %{_target_platform} %{?_smp_mflags} %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} -C %{_target_platform} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc COPYING README.md %{_datadir}/doc/dune-istl %files devel %defattr(-,root,root,-) %{_includedir}/* %{_datadir}/%{name} %{_datadir}/dune %{_prefix}/lib/* %{_prefix}/lib/cmake/* %{_prefix}/lib/pkgconfig/*.pc %{_prefix}/lib/dunecontrol/%{name} %changelog