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

Quentin Spencer qspencer at ieee.org
Fri Jul 15 21:20:15 UTC 2005


John Dennis wrote:

>On Fri, 2005-07-15 at 17:01 -0400, Ignacio Vazquez-Abrams wrote:
>  
>
>>On Fri, 2005-07-15 at 14:48 -0600, Orion Poplawski wrote:
>>    
>>
>>>Is it kosher to use the %{dist} tag for conditional compilation?  The 
>>>shift from g77 to gfortran in FC3->FC4 has led to the need to compile 
>>>packages differently for the two distributions.
>>>      
>>>
>>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.
>>    
>>
>
>If the package uses the GNU autotools (e.g. configure) it is better to
>put the logic for picking a compiler and its parameters into the
>configure script. This makes it entirely independent of the packaging
>and distribution.
>  
>

Yes, but shouldn't that be done in the upstream sources? Sure, an 
ambitious packager can hack the configure script and send the fixes 
upstream, but I don't know enough about autotools to do that properly, 
so if it were me hacking the spec file sounds easier. In this particular 
case, you know exactly what you're looking for anyway--it's not like an 
FC3 package needs to be able to compile on cygwin, OSX, *BSD, or 
something like that.

-Quentin




More information about the fedora-extras-list mailing list