File dune-functions.spec of Package dune-functions
#
# spec file for package dune-functions
#
# Copyright (c) 2024 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: dune-functions
Version: 2.10.0
Release: 0
Summary: An interface and implementation for shape functions defined on the DUNE
License: GPL-2.0
Group: Development/Libraries/C and C++
Url: https://www.dune-project.org/
Source0: https://www.dune-project.org/download/%{version}/%{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: dune-common-devel = %{version}
BuildRequires: dune-localfunctions-devel = %{version}
BuildRequires: dune-typetree-devel = %{version}
BuildRequires: dune-uggrid-devel = %{version}
BuildRequires: dune-grid-devel = %{version}
BuildRequires: dune-istl-devel = %{version}
BuildRequires: gcc-c++
BuildRequires: pkg-config
BuildRequires: tbb-devel
Requires: dune-common = %{version}
Requires: dune-localfunctions = %{version}
Requires: dune-typetree = %{version}
Requires: dune-uggrid = %{version}
Requires: dune-grid = %{version}
Requires: dune-istl = %{version}
%description
dune-functions provides interface and implementation for shape functions
defined on the DUNE reference elements. In addition to the shape function,
interpolation operators and special keys are provided which can be used to
assemble global function spaces on finite-element functions.
%package devel
Summary: Development and header files for %{name}
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: dune-common-devel = %{version}
Requires: dune-localfunctions-devel = %{version}
Requires: dune-typetree-devel = %{version}
Requires: dune-uggrid-devel = %{version}
Requires: dune-grid-devel = %{version}
Requires: dune-istl-devel = %{version}
%description devel
This package contains the development and header files for %{name}.
%package openmpi
Summary: A discretisation module based on DUNE
Group: Development/Libraries/C and C++
BuildRequires: dune-common-openmpi-devel
BuildRequires: dune-localfunctions-openmpi-devel
BuildRequires: dune-typetree-openmpi-devel
BuildRequires: dune-uggrid-openmpi-devel
BuildRequires: dune-grid-openmpi-devel
BuildRequires: dune-istl-openmpi-devel
%description openmpi
dune-functions provides interface and implementation for shape functions
defined on the DUNE reference elements. In addition to the shape function,
interpolation operators and special keys are provided which can be used to
assemble global function spaces on finite-element functions.
%package openmpi-devel
Summary: Development and header files for %{name}
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: %{name}-openmpi = %{version}
Requires: dune-common-openmpi-devel = %{version}
Requires: dune-localfunctions-openmpi-devel
Requires: dune-typetree-openmpi-devel
Requires: dune-uggrid-openmpi-devel
Requires: dune-grid-openmpi-devel
Requires: dune-istl-openmpi-devel
Requires: openmpi4-devel
%description openmpi-devel
This package contains the development and header files for %{name}.
%prep
%setup -q
mkdir serial openmpi
%build
cd serial
cmake \
-DCMAKE_DISABLE_FIND_PACKAGE_MPI=TRUE \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
..
%make_build
cd ..
cd openmpi
cmake \
-DBUILD_SHARED_LIBS=ON \
-DMPI_C_COMPILER=%{_libdir}/mpi/gcc/openmpi4/bin/mpicc \
-DCMAKE_INSTALL_PREFIX=%{_libdir}/mpi/gcc/openmpi4 \
..
%make_build
cd ..
%install
for build_dir in serial openmpi; do
cd $build_dir
make DESTDIR=%{buildroot} install
cd ..
done
find %{buildroot} -name '*.la' -exec rm {} \;
%files
%doc README.md
%license COPYING
%{_prefix}/lib/dunecontrol/%{name}
%files devel
%{_includedir}/dune-functions-config.hh
%{_includedir}/dune/functions
%{_datadir}/%{name}/
%{_libdir}/cmake/
%{_libdir}/pkgconfig/*.pc
%files openmpi
%doc README.md
%license COPYING
%dir %{_libdir}/mpi/gcc/openmpi4/lib/dunecontrol/%{name}
%{_libdir}/mpi/gcc/openmpi4/lib/dunecontrol/%{name}/dune.module
%files openmpi-devel
%{_libdir}/mpi/gcc/openmpi4/include/*
%{_libdir}/mpi/gcc/openmpi4/share/%{name}/
%{_libdir}/mpi/gcc/openmpi4/%{_lib}/cmake
%dir %{_libdir}/mpi/gcc/openmpi4/%{_lib}/pkgconfig
%{_libdir}/mpi/gcc/openmpi4/%{_lib}/pkgconfig/*.pc
%changelog