[Fedora-packaging] Using %{dist} for conditional compilation

Orion Poplawski orion at cora.nwra.com
Fri Jul 15 22:35:03 UTC 2005


Ignacio Vazquez-Abrams wrote:
> 
> No. Use %{fedora}. It will have an integer value the same as the version
> of Fedora the package is built for. Even better, since there are
> separate branches per version it's easy enough to just have the
> differences in the spec files directly.
> 

Could you give an example?  I can't find docs on how to use %if in a 
spec file to compare values.  Trying to do something like:

%if %{fedora} >= 4
BuildRequires: gcc-gfortran
%else
BuildRequires: gcc-g77
%endif


-- 
Orion Poplawski
System Administrator                   303-415-9701 x222
Colorado Research Associates/NWRA      FAX: 303-415-9702
3380 Mitchell Lane, Boulder CO 80301   http://www.co-ra.com




More information about the Fedora-packaging mailing list