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

Matthias Saou thias at spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net
Mon Aug 1 22:37:30 UTC 2005


Jeff Spaleta wrote :

> On 7/20/05, Rex Dieter <rdieter at math.unl.edu> wrote:
> > Yes, the Fedora Extras buildsystem defines this macro.  You expected
> > otherwise?
> 
> actually.. i sort of do. I'd very much expect my workstation running
> fc4 to have access to a package with the fedora specific macro
> definitions set to values the fedora-whatever build system uses for
> building packages for fc4. [...]

Just to point this out : When Dag and I were searching for agreements on
many diverging points in our ways of building packages, one we easily got
to was to have the default (i.e. "without any manual defines") rebuild for
the latest release of the distribution available.

In this case, this means that if someone checks for %{fedora}'s value, but
it isn't defined, the behavior should default to the proper one for FC4
(since it's the latest ATM). For me, this is a sane default, and I'd like
to see Extras use it as much as possible too ;-)

So "if %fedora >= 4 then foo else bar" should be replaced by something
else that works as expected (like what Ignacio wrote).

Matthias

-- 
Clean custom Red Hat Linux rpm packages : http://freshrpms.net/
Fedora Core release 4 (Stentz) - Linux kernel 2.6.12-1.1398_FC4
Load : 0.06 0.16 0.44




More information about the Fedora-packaging mailing list