rpm spec: conditional require based of distro version

The Fedora wiki, as usual, provides the best guidelines about packaging. Take a look at the Packaging:DistTag page. You can use the %{el5} variable and a shorthand conditional to ensure that the relevent Require line is used when building packages for EL5.

%{?el5:Requires: kmod-coretemp}

You'll probably want to add the dist tag to the version field to avoid later confusion between packages:

Release: 1%{?dist}

See Purpose of the Dist Tag.


Dist tag packaging guidelines.