Mailinglist Archive: opensuse-buildservice (193 mails)

< Previous Next >
Re: [opensuse-buildservice] Conditional %include?
  • From: Richard Bos <ml@xxxxxxxxxx>
  • Date: Fri, 13 Apr 2007 18:38:07 +0200
  • Message-id: <200704131838.07985.ml@xxxxxxxxxx>
Op Friday 13 April 2007 02:32:27 schreef Troy Telford:
> Is it possible to do a conditional spec file include?
>
> ie.
> %if "%_vendor" == "suse"
> %include %SOURCE1
> %else
> %include %SOURCE2
> %endif
>
> I ask because it doesn't seem to care whether it's inside a conditional or
> not...

You could just include both and install the right one based on the version:

%if "%_vendor" == "suse"
cp %{SOURCE1}  destination
%else
cp  %{SOURCE2} destination
%endif

-- 
Richard Bos
Without a home the journey is endless
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References