Citações de link :
Keep in mind that if you are checking for a specific family of distributions, that you need to use:
%if 0%{?rhel}
and NOT
%if %{?rhel}
Without the extra 0, if %{rhel} is undefined, the %if conditional will cease to exist, and the rpm will fail to build.
E, similarmente, você precisa usar 0% {? fedora} na primeira condição.