## START: Set by rpmautospec ## (rpmautospec version 0.6.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec Name: hermes-3 Version: 1.3.0 Release: %{autorelease} Summary: Hermes-3 : License: GPLv3 URL: https://github.com/bendudson/hermes-3 Source0: https://codeload.github.com/bendudson/hermes-3/tar.gz/refs/tags/v%{version}#./hermes-3-v%{version}.tar.gz Source1: build_requires.sh # Patch: install-lib.patch BuildRequires: zlib-devel BuildRequires: cmake BuildRequires: gettext-devel BuildRequires: environment-modules BuildRequires: netcdf-devel BuildRequires: netcdf-cxx%{?fedora:4}-devel BuildRequires: hdf5-devel BuildRequires: fftw-devel BuildRequires: flexiblas-devel BuildRequires: make BuildRequires: fmt-devel BuildRequires: cmake BuildRequires: g++ BuildRequires: mpark-variant-devel BuildRequires: chrpath BuildRequires: python3-sphinx ExcludeArch: %{ix86} %description Hermes-3 is a multifluid plasma simulation model for transport and turbulence in the edge of magnetically confined plasmas, such as tokamaks. It is built on the BOUT++ framework, and uses a system of reusable components to build models at runtime based on input configuration, in 1D, 2D or 3D curvlinear coordinates. %package mpich Summary: hermes-3 for mpich Requires: %{name}-common = %{version}-%{release} Recommends: python%{python3_pkgversion}-xhermes %package openmpi Summary: hermes-3 for openmpi Requires: %{name}-common = %{version}-%{release} Recommends: python%{python3_pkgversion}-xhermes %package common Summary: common files for hermes-3 Requires: %{name}-common = %{version}-%{release} Recommends: python%{python3_pkgversion}-xhermes %description mpich Hermes-3 is a multifluid plasma simulation model for transport and turbulence in the edge of magnetically confined plasmas, such as tokamaks. It is built on the BOUT++ framework, and uses a system of reusable components to build models at runtime based on input configuration, in 1D, 2D or 3D curvlinear coordinates. This version is build for mpich. %description openmpi Hermes-3 is a multifluid plasma simulation model for transport and turbulence in the edge of magnetically confined plasmas, such as tokamaks. It is built on the BOUT++ framework, and uses a system of reusable components to build models at runtime based on input configuration, in 1D, 2D or 3D curvlinear coordinates. This version is build for openmpi. %description common Hermes-3 is a multifluid plasma simulation model for transport and turbulence in the edge of magnetically confined plasmas, such as tokamaks. It is built on the BOUT++ framework, and uses a system of reusable components to build models at runtime based on input configuration, in 1D, 2D or 3D curvlinear coordinates. This version contains common files for hermes-3. %global mpi_list mpich openmpi %generate_buildrequires sh %{SOURCE1} %{mpi_list} %prep %autosetup -n hermes-3-%{version} -p 1 %build # Docs make -C docs man # MPI builds export CC=mpicc export CXX=mpicxx for mpi in %{mpi_list} do mkdir build_$mpi done for mpi in %{mpi_list} do %global _vpath_builddir build_$mpi if [ $mpi = mpich ] ; then %_mpich_load elif [ $mpi = openmpi ] ; then %_openmpi_load else echo "unknown mpi" &> /dev/stderr exit 1 fi find /usr/lib64/$mpi/lib/cmake/ %cmake \ -DCMAKE_INSTALL_PREFIX=/ \ -DCMAKE_INSTALL_LIBDIR=%{_libdir}/$mpi/lib \ -DCMAKE_INSTALL_BINDIR=%{_libdir}/$mpi/bin \ -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}/$mpi-%{_arch}/bout++/ \ -DCMAKE_INSTALL_DATAROOTDIR=%{_datadir} \ -DCMAKE_INSTALL_PYTHON_SITEARCH=${MPI_PYTHON3_SITEARCH} \ -DHERMES_BUILD_BOUT=OFF \ -DHERMES_UPDATE_GIT_SUBMODULE=OFF \ -DHERMES_UNIT_TESTS=OFF \ -DBUILD_SHARED_LIBS:BOOL=OFF %cmake_build if [ $mpi = mpich ] ; then %_mpich_unload elif [ $mpi = openmpi ] ; then %_openmpi_unload fi done %install mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1/ install docs/man/hermes3.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/ for mpi in %{mpi_list} do %global _vpath_builddir build_$mpi if [ $mpi = mpich ] ; then %_mpich_load elif [ $mpi = openmpi ] ; then %_openmpi_load else echo "unknown mpi" &> /dev/stderr exit 1 fi %cmake_install chrpath -r %{_libdir}/$mpi/lib ${RPM_BUILD_ROOT}%{_libdir}/$mpi/bin/hermes-3 if [ $mpi = mpich ] ; then %_mpich_unload elif [ $mpi = openmpi ] ; then %_openmpi_unload fi done %files common %license LICENSE %doc NOTICE %doc README.md %{_mandir}/man1/hermes3.1* %files mpich %{_libdir}/mpich/bin/hermes-3 %files openmpi %{_libdir}/openmpi/bin/hermes-3 %changelog ## START: Generated by rpmautospec * Wed Apr 17 2024 David Bold - 1.3.0-2 - Uncommitted changes * Wed Apr 17 2024 David Bold - 1.3.0-1 - Initial version ## END: Generated by rpmautospec