A yet more aggressive proposal would be...
| %{!?releasefunc:%define releasefunc() 0.fdr.%1} | Release: %releasefunc XYZ
Drawbacks of this variant are the additional '%{!...}' line, and that is
does not work on RH <=8.0. But RH 8.0 is dead and packages in legacy are
limited so that manual specfile editing should not be a problem.