Mailinglist Archive: opensuse-buildservice (113 mails)

< Previous Next >
Re: [opensuse-buildservice] BuildRequires SuSE <-> RedHat...
  • From: "Dr. Peter Poeml" <poeml@xxxxxxx>
  • Date: Tue, 9 May 2006 15:09:33 +0200
  • Message-id: <20060509130933.GD9871@xxxxxxx>
On Tue, Apr 25, 2006 at 08:08:14PM +0200, Pascal Bleser wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Dr. Peter Poeml wrote:
> [...]
> > %if %{?suse_version:1}%{?!suse_version:0}
> > BuildRequires: ghostscript-fonts-std
> > %else
> > BuildRequires: xorg-x11-server-sdk
> > %endif
>
> Or, just for the record, even shorter ;)
>
> %if %{?suse_version:1}0
> BuildRequires: ghostscript-fonts-std
> %else
> BuildRequires: xorg-x11-server-sdk
> %endif

It would be even nicer, if the %defined/%undefined macros would work.
They exist on SUSE, Fedora, Mandrake.

It would be possible to use
%if %{defined suse_version}
or
%if %{undefined suse_version}
which is much better to read, especially as soon as it gets more
complicated.

During build, they actually work, but the build system can't handle them
at the moment. The resolving of Buildrequires doesn't work with that.
Even though the macros simply expand to the
%{?suse_version:1}%{?!suse_version:0} stuff.

Regards,
Peter

--
SUSE LINUX Products GmbH Thought is limitation.
Research & Development Free your mind.
< Previous Next >
Follow Ups