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

Orion Poplawski orion at cora.nwra.com
Wed Jul 20 19:28:28 UTC 2005


Ignacio Vazquez-Abrams wrote:
> On Wed, 2005-07-20 at 10:41 -0600, 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?  This won't work.
> 
> 
> Put this in /etc/rpm:
> 
> http://fedora.ivazquez.net/files/macros.disttag
> 

Yeah, but that's not the point.  The src.rpm should build fine out of 
the box on anyone's machine.  Thanks though!

-- 
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-extras-list mailing list