Re: unifying of spec files for different Fedora releases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@atlantis ~]$ rpm -E %dist
%dist
[mpeters@atlantis ~]$ rpm -E %fedora
%fedora
[mpeters@atlantis ~]$

It would make the spec file unbuildable on a lot of systems.
What you could do - something like

%define mod_x %(eval "if [ -f /some/file ]; then echo 1; else echo 0;
fi")

where /some/file is the xorg-x11-server-Xvfb path to a file that is
different from the <fc5 xorg-x11-Xvfb path to the file.

Then -

%if mod_x
BuildRequires: xorg-x11-server-Xvfb, xorg-x11-fonts-base
%else
BuildRequires: xorg-x11-Xvfb
%endif

-=-
I personally would just keep the spec files different.

-- 
fedora-extras-list mailing list
fedora-extras-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-extras-list

[Index of Archives]     [Fedora General Discussion]     [Fedora Art]     [Fedora Docs]     [Fedora Package Review]     [Fedora Desktop]     [Big List of Linux Books]     [Yosemite Backpacking]     [KDE Users]

  Powered by Linux