%global commit eea410f055eb35529c3ca11c12547b552830c99b %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global snapdate 20260224 %global febiolibdir %{_libdir}/febio Name: febio-chem # 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: 2%{?dist} Summary: 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/FEBioChem Source0: %{url}/archive/%{commit}/FEBioChem-%{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 FEBioChem adds the reaction-diffusion and reaction-diffusion-convection modules to FEBio: diffusing solutes and solid-bound species coupled by mass-action, Michaelis-Menten, logistic-growth and negative-order reactions. FEBio loads the plugin automatically from %{febiolibdir}/plugins. %prep %autosetup -n FEBioChem-%{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/libFEBioChem.so %{buildroot}%{febiolibdir}/plugins/libFEBioChem.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/libFEBioChem.so EOF # Twelve shipped examples; febiochem_testdata_200114.txt (upstream's own) gives # each one's expected number of completed time steps. for n in 01 02 03 04 05 06 07 08 09 10 11 12; do cp -p Example/ex$n.feb check/ (cd check && OMP_NUM_THREADS=1 febio4 -config febio.xml -i ex$n.feb -silent) grep -q 'N O R M A L T E R M I N A T I O N' check/ex$n.log want=$(awk -v f=ex$n.feb '$1 == f {print $3}' Example/febiochem_testdata_200114.txt) got=$(awk -F: '/Number of time steps completed/ {print $2+0}' check/ex$n.log) echo "ex$n: $got time steps (expected $want)"; test "$got" = "$want" done %files %{febiolibdir}/plugins/libFEBioChem.so %changelog * Fri Nov 06 2026 Morgan Hough - 1.0.0^20260224giteea410f-2 - Rebuild in mhough/scientific: math and computational-physics packages move out of mhough/neurofedora * Fri Oct 09 2026 Morgan Hough - 1.0.0^20260224giteea410f-1 - Initial package, FEBioChem at upstream commit eea410f (2026-02-24), for FEBio 4.12. - License: MIT assumed; upstream ships no licence (asked).