File dune-typetree.spec of Package dune-typetree
#
# spec file for package dune-typetree
#
# 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-typetree
Version: 2.10.0
Release: 0
Summary: DUNE Module for typed tree objects
License: GPL-2.0
Group: Development/Libraries/C and C++
Url: https://www.dune-project.org/
Source0: https://www.dune-project.org/download/staging/%{version}/%{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: dune-common-devel >= %{version}
BuildRequires: dune-common-openmpi-devel >= %{version}
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: tbb-devel
Requires: dune-common >= %{version}
%description
dune-typetree is a template library for constructing and operating on statically
typed trees of objects. It is based around the idea of defining loosely coupled,
componentized algorithms.
%package devel
Summary: Development and header files for %{name}
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: dune-common-devel >= %{version}
%description devel
This package contains the development and header files for %{name}
%package openmpi
Summary: DUNE Module for typed tree objects
Group: Development/Libraries/C and C++
Requires: dune-common-openmpi >= %{version}
%description openmpi
dune-typetree is a template library for constructing and operating on statically
typed trees of objects. It is based around the idea of defining loosely coupled,
componentized algorithms.
%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: 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_install
cd ..
done
find %{buildroot} -name '*.la' -exec rm {} \;
%files
%doc README.md
%license COPYING
%{_prefix}/lib/dunecontrol/%{name}
%files devel
%{_includedir}/dune-typetree-config.hh
%{_includedir}/dune/*
%{_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