On Monday 23 Apr 2012 17:23:54 Robert Schweikert wrote:
Hi,
Dealing with a source tree that has distribution dependence backed right into the build setup. It looks for /etc/*-release.
Is there a way for me to have a requires that install the appropriate release package?
When I add:
%if %sles_version >= 11 BuildRequires: sles-release %endif %if 0%{?suse_version} BuildRequires: openSUSE-release %endif
It obviously fails as SLE also returns true for suse_version and then of course the openSUSE-release package cannot be found.
What's the best way to deal with this?
Thanks, Robert
Try this while dealing with sles/opensuse (at the begin of your .spec): # This define a opensuse_version tag to differentiate # between suse and suse enterprise linux %if 0%{?suse_version} && ! 0%{?sles_version} %define opensuse_version %suse_version %endif Then later you can check as: %if 0%{?opensuse_version} == 1120 Buildrequires: freetype2 %endif Regards, Antonio -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org