%global commit 864cba8367ea511c59ad35cfd805812268cccb68 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global snapdate 20260224 %global febiolibdir %{_libdir}/febio Name: febio-heat # 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: 2.0.0^%{snapdate}git%{shortcommit} Release: 2%{?dist} Summary: Heat transfer 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/FEBioHeat Source0: %{url}/archive/%{commit}/FEBioHeat-%{commit}.tar.gz # %%check models: the shipped Examples/ are febio_spec 2.5, which FEBio 4.12 does # not read for plugin modules; upstream added these 4.0-format ones in Verify/ # two months after our pin (same repository, same files as the TestSuite's ht01/02). %global verify_commit 9675467a779f24e4ec50a5d2d9f5e62d61243752 Source1: https://raw.githubusercontent.com/febiosoftware/FEBioHeat/%{verify_commit}/Verify/ht01.feb Source2: https://raw.githubusercontent.com/febiosoftware/FEBioHeat/%{verify_commit}/Verify/ht02.feb 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 FEBioHeat adds the heat module to FEBio: transient heat conduction with isotropic Fourier materials, heat flux, convective and gap heat flux boundary conditions, heat sources and initial temperatures. FEBio loads the plugin automatically from %{febiolibdir}/plugins. %prep %autosetup -n FEBioHeat-%{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/libFEBioHeat.so %{buildroot}%{febiolibdir}/plugins/libFEBioHeat.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/libFEBioHeat.so EOF # Upstream's gold standard for both: 10 time steps, 10 equilibrium iterations. cp -p %{SOURCE1} %{SOURCE2} check/ for m in ht01 ht02; do (cd check && OMP_NUM_THREADS=1 febio4 -config febio.xml -i $m.feb -silent) || { tail -n 40 check/$m.log; exit 1; } grep -q 'N O R M A L T E R M I N A T I O N' check/$m.log steps=$(awk -F: '/Number of time steps completed/ {print $2+0}' check/$m.log) iters=$(awk -F: '/Total number of equilibrium iterations/ {print $2+0}' check/$m.log) echo "$m: $steps time steps, $iters iterations (expected 10, 10)"; test "$steps/$iters" = 10/10 done %files %doc README.md %{febiolibdir}/plugins/libFEBioHeat.so %changelog * Fri Nov 06 2026 Morgan Hough - 2.0.0^20260224git864cba8-2 - Rebuild in mhough/scientific: math and computational-physics packages move out of mhough/neurofedora * Fri Oct 09 2026 Morgan Hough - 2.0.0^20260224git864cba8-1 - Initial package, FEBioHeat at upstream commit 864cba8 (2026-02-24), for FEBio 4.12. - License: MIT assumed; upstream ships no licence (asked).