something like %if %{undefined _rpmmacrodir} %define where_to_put_rpm_macros /etc/rpm %else %define where_to_put_rpm_macros %_rpmmacrodir that way we can extend the condition even for some cases when it *is* defined if there are complaints about the file moving.