%global commit f13a00136fede9344b169c8b9972a3239d8d3cf6 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global snapdate 20260224 %global febiolibdir %{_libdir}/febio Name: febio-warp # 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: Image-based registration (warping) 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/FEBioWarp Source0: %{url}/archive/%{commit}/FEBioWarp-%{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 FEBioWarp adds image-driven loads to FEBio for deformable image registration: a hyperelastic body is warped so that a template image matches a target image, giving a physically regularised deformation map. FEBio loads the plugin automatically from %{febiolibdir}/plugins. %prep %autosetup -n FEBioWarp-%{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/libFEBioWarp.so %{buildroot}%{febiolibdir}/plugins/libFEBioWarp.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/libFEBioWarp.so EOF # Shipped 16^3 template/target example. cp -p Example/test1_v4.feb Example/template.raw Example/target.raw check/ (cd check && OMP_NUM_THREADS=1 febio4 -config febio.xml -i test1_v4.feb -silent) grep -q 'N O R M A L T E R M I N A T I O N' check/test1_v4.log grep -E 'Number of time steps completed' check/test1_v4.log %files %{febiolibdir}/plugins/libFEBioWarp.so %changelog * Fri Oct 09 2026 Morgan Hough - 1.0.0^20260224gitf13a001-1 - Initial package, FEBioWarp at upstream commit f13a001 (2026-02-24), for FEBio 4.12. - License: MIT assumed; upstream ships no licence (asked).