unifying of spec files for different Fedora releases

Paul Howarth paul at city-fan.org
Fri May 19 20:21:04 UTC 2006


On Fri, 2006-05-19 at 14:59 -0500, Rex Dieter wrote:
> Michael A. Peters wrote:
> > On Fri, 2006-05-19 at 12:03 +0200, Dan Horák wrote:
> > 
> >> Should I check the value of "%fedora" so it would look like
> >>
> >> %if "%fedora" < 5
> >> BuildRequires: xorg-x11-Xvfb
> >> %else
> >> BuildRequires: xorg-x11-server-Xvfb, xorg-x11-fonts-base
> >> %endif
> >>
> >> or should I use "%dist" for the checks? I was probably already mentioned
> >> on this list, but I not able to find it.
> > 
> > Problem with both:
> > 
> > [mpeters at atlantis ~]$ rpm -E %dist
> > %dist
> > [mpeters at atlantis ~]$ rpm -E %fedora
> > %fedora
> > [mpeters at atlantis ~]$
> > 
> > It would make the spec file unbuildable on a lot of systems.
> 
> FYI, we're speaking here only in the context of Fedora Extras and it's
> buildsystem.

If you care about being able to build elsewhere, one possibility would
be to use a construct like:

%if 0%{?fedora} < 5
BuildRequires: xorg-x11-Xvfb
%else
BuildRequires: xorg-x11-server-Xvfb, xorg-x11-fonts-base
%endif

Paul.




More information about the fedora-extras-list mailing list