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

John Dennis jdennis at redhat.com
Fri Jul 15 21:14:06 UTC 2005


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.


-- 
John Dennis <jdennis at redhat.com>




More information about the fedora-extras-list mailing list