Something like: %if 0%{?fedora} > 0 %define_cond docs 1 %define_cond tests 1 %endif %if 0%{?rhel} > 0 %define_cond docs 0 %define_cond tests 1 %endif