Mailinglist Archive: opensuse-buildservice (42 mails)

< Previous Next >
Re: [opensuse-buildservice] expansion error on multiple BuildRequires
  • From: Dries Verachtert <dries@xxxxxxxxxxx>
  • Date: Wed, 12 Apr 2006 20:50:31 +0200
  • Message-id: <200604122050.31737.dries@xxxxxxxxxxx>
On Wednesday 12 April 2006 19:16, Michael Schroeder wrote:

> Suse already defines a "suse_version" macro which you can use (even
> in the build service), but it is a bit different from the one
> you use: it contains an extra digit for "beta" versions.
> We can define some macros for fedora and the other distributions
> if they don't have macros like this.

Maybe interesting: the buildsystems dar and pydar2 always use a macro 'dist'.
This macro can have a variable like 'rh7', 'el4' or 'fc5'.
An example: the buildsys uses a command like: rpmbuild -ba --define='dist fc5'
some.spec. A spec file can use this macro directly or it can contain a line
%{?dist: %{expand: %%define %dist 1}}
Then you can use stuff like:

%{?fc4:BuildRequires: gettext-devel}


%{?fc4:BuildRequires: gcc-gfortran}
%{!?fc4:BuildRequires: gcc-g77}


%{?el3:%define _without_gamin 1}
%{?fc2:%define _without_gamin 1}
%{?fc1:%define _without_gamin 1}
%{?_without_gamin:BuildRequires: fam-devel}
%{!?_without_gamin:BuildRequires: gamin-devel}
=> new version of distro automatically uses the gamin-devel buildreq.

It's just to give you an idea how it's done in other build systems.

kind regards,

Rpm packages for Red Hat Enterprise Linux, Fedora Core and Aurora at

< Previous Next >