[Fedora-packaging] Using %{dist} for conditional compilation

Ignacio Vazquez-Abrams ivazquez at ivazquez.net
Fri Jul 15 22:52:10 UTC 2005


On Fri, 2005-07-15 at 16:35 -0600, Orion Poplawski wrote:
> Ignacio Vazquez-Abrams wrote:
> > 
> > No. Use %{fedora}. It will have an integer value the same as the version
> > of Fedora the package is built for. Even better, since there are
> > separate branches per version it's easy enough to just have the
> > differences in the spec files directly.
> > 
> 
> Could you give an example?  I can't find docs on how to use %if in a 
> spec file to compare values.

%if 0%{?fedora} > 03
  foo
%else
  bar
%endif

-- 
Ignacio Vazquez-Abrams <ivazquez at ivazquez.net>
http://fedora.ivazquez.net/

gpg --keyserver hkp://subkeys.pgp.net --recv-key 38028b72
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.fedoraproject.org/pipermail/packaging/attachments/20050715/83a97299/attachment.bin 


More information about the packaging mailing list