unifying of spec files for different Fedora releases
Nils Philippsen
nphilipp at redhat.com
Fri May 19 10:27:38 UTC 2006
On Fri, 2006-05-19 at 03:22 -0700, 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.
> 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.
Well, this depends on the package in question being installed. You could
instead use the %fedora macros and if they don't exist, use defaults.
Check out the current bzflag spec file to see what I mean.
Nils
--
Nils Philippsen / Red Hat / nphilipp at redhat.com
"Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety." -- B. Franklin, 1759
PGP fingerprint: C4A8 9474 5C4C ADE3 2B8F 656D 47D8 9B65 6951 3011
More information about the fedora-extras-list
mailing list