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

Rex Dieter rdieter at math.unl.edu
Wed Jul 20 16:49:04 UTC 2005


Orion Poplawski wrote:
> Andreas Thienemann wrote:
>> On Fri, 15 Jul 2005, Orion Poplawski wrote:

>> %if "%fedora" >= "4"
>> BuildRequires: gcc-gfortran
>> %else
>> BuildRequires: gcc-g77
>> %endif
>>
>> This should work.

> On my FC4 box I get:
> 
> $ rpmbuild -ba *spec
> error: Failed build dependencies:
>         gcc-g77 is needed by hdf-4.2r1-2.i386
> 
> So looks like %fedora is not defined on user machins, only in the build 
> system?  

Yes, the Fedora Extras buildsystem defines this macro.  You expected
otherwise?

-- Rex





More information about the Fedora-packaging mailing list