%global commit cdfd828d0ef273541704126273f68649f3e84134 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global snapdate 20260224 %global febiolibdir %{_libdir}/febio Name: febio-erd # Upstream's commit of 2026-02-24, the one built for FEBio 4.12 (tagged the next # day); later commits follow FEBio's develop branch. Version: 1.0.0^%{snapdate}git%{shortcommit} Release: 1%{?dist} Summary: Elastic reaction-diffusion plugin for the FEBio finite element solver # The repository has no licence file and no licence notice in any source file. # Packaged as MIT, the licence of FEBio itself, on Morgan's decision until upstream # answers (asked in docs/upstream/febio-questions.md). Revisit before any wider use. License: MIT URL: https://github.com/febiosoftware/FEBioERD Source0: %{url}/archive/%{commit}/FEBioERD-%{commit}.tar.gz BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: ninja-build # 4.12-5 ships the plugin folder and the febio.xml that imports it. BuildRequires: febio-devel >= 4.12-5 # Built against the FEBio 4.12 SDK headers; the plugin ABI is not stable across releases. Requires: (febio%{?_isa} >= 4.12-5 with febio%{?_isa} < 4.13) %description FEBioERD adds the elastic-reaction-diffusion module to FEBio, coupling large-deformation solid mechanics with reacting, diffusing species, for example kinematic growth and remodelling (LaBelle et al. 2024). FEBio loads the plugin automatically from %{febiolibdir}/plugins. %prep %autosetup -n FEBioERD-%{commit} # Fedora: no static libstdc++/libgcc, keep warnings (-w hid them), C++17 to match # the FEBio 4.12 headers, and an RPATH to febio's private library directory. sed -i -e 's|add_compile_options(-static-libstdc++ -static-libgcc -w -Wall)|add_compile_options(-Wall)|' \ -e 's|set(CMAKE_BUILD_RPATH $ORIGIN/../lib/)|set(CMAKE_BUILD_RPATH %{febiolibdir})|' \ -e 's|set(CMAKE_CXX_STANDARD 11)|set(CMAKE_CXX_STANDARD 17)|' CMakeLists.txt grep -q 'add_compile_options(-Wall)' CMakeLists.txt grep -q 'CMAKE_BUILD_RPATH %{febiolibdir}' CMakeLists.txt %build %cmake -GNinja %cmake_build %install # No install rules upstream. install -D -m 0755 %{_vpath_builddir}/lib/libFEBioERD.so %{buildroot}%{febiolibdir}/plugins/libFEBioERD.so %check # Load the built plugin into the installed febio4 and solve shipped example models. mkdir -p check cat > check/febio.xml < %{buildroot}%{febiolibdir}/plugins/libFEBioERD.so EOF # LaBelle 2024 kinematic-growth cube, cut from 200 to 5 time steps to keep the build short. cp -p Example/KinematicGrowth_LaBelle2024/Cube/CubeTet10_Mesh.feb check/ sed 's|200<|5<|' Example/KinematicGrowth_LaBelle2024/Cube/cube_case1.feb > check/cube.feb grep -q '5<' check/cube.feb (cd check && OMP_NUM_THREADS=1 febio4 -config febio.xml -i cube.feb -silent) grep -q 'N O R M A L T E R M I N A T I O N' check/cube.log got=$(awk -F: '/Number of time steps completed/ {print $2+0}' check/cube.log) echo "cube: $got time steps"; test "$got" = 5 %files %doc Documentation/README.md %{febiolibdir}/plugins/libFEBioERD.so %changelog * Fri Oct 09 2026 Morgan Hough - 1.0.0^20260224gitcdfd828-1 - Initial package, FEBioERD at upstream commit cdfd828 (2026-02-24), for FEBio 4.12. - License: MIT assumed; upstream ships no licence (asked).