On Fri, 26 Jan 2007, Daniel Bornkessel wrote:
There is a mandriva variable: %if %{?!mandriva_release:1}0 ... so it should contain some version number. AFAIK there is no such variable for redhat/fedora ... so finding out whether we have fedora/redhat looks like this:
You're sure? I took these from the OpenSUSE wiki.
if %{?!suse_version:1}0 %if %{?!mandriva_release:1}0 BuildRequires: blub %endif %endif
I like it. The RPM documentation is the biggest mess I can think of. Lots of low level docs and nothing covering the deeper problems. I want to do (at least I think so) following (in C syntax): #if defined(DEBIAN) || defined(XUBUNTU) BuildRequires: autoconf automake gcc netcdf3 #elif defined(FEDORA) BuildRequires: autoconf automake gcc netcdf-dev #else BuildRequires: autoconf automake gcc netcdf #endif After looking in the net again and again I found, that || seems not to be supported for RPM, but only "&&". Also I'm not sure, if a "%else if", "%elif", "%elsif" or "%elseif" exists. So is the result (BTW it's a really strange syntax, have the RedHat guys been crazy?): %if 0%{?suse_version:1} %else --- %if .. %else %if .. ........ lots of %endif's coming Any better way? What's the content of variable opensuse_bs? A version number? Is there be BuildSystem variable containing the destination distribution name? For debugging: Is there something like "Print all variables" for RPM. This would be helpful in case of doubt (something like "make -p"). Ciao -- http://www.dstoecker.eu/ (PGP key available) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org