<div class="gmail_quote">On Thu, Mar 5, 2009 at 8:36 PM,  <span dir="ltr">&lt;<a href="mailto:Greg_Swift@aotx.uscourts.gov">Greg_Swift@aotx.uscourts.gov</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">&gt; &gt; if your ORs are based on some kind of comparable metric you could wrap<br>
&gt; &gt; them.  ie:<br>
&gt; &gt;<br>
&gt; &gt; %if %{BuildArch} == &#39;x86_64&#39;<br>
&gt; &gt; BuildRequires: libx<br>
&gt; &gt; %else<br>
&gt; &gt; %if %{BuildArch} == &#39;i386&#39;<br>
&gt; &gt; BuildRequires: liby<br>
&gt; &gt; %endif<br>
&gt; &gt; %endif<br>
&gt;<br>
&gt; this looks good in general. How can I differentiate between RHEL 4 and 5?<br>
&gt;<br>
<br>
</div>A fairly standard way from what I&#39;ve seen would be like this:<br>
<br>
%if 0%{?rhel} == 5<br>
BuildRequires: libx<br>
%else<br>
%if 0%{?rhel} == 5<br>
BuildRequires: liby<br>
%endif<br>
%endif<br>
<br>
<br>
But when you build the rpm you will need to provide the %rhel macro.  I<br>
mention how this can be done in these 2 threads:<br>
<br>
<a href="http://lists.rpm.org/pipermail/rpm-list/2009-March/000182.html" target="_blank">http://lists.rpm.org/pipermail/rpm-list/2009-March/000182.html</a><br>
<a href="http://lists.rpm.org/pipermail/rpm-list/2009-March/000184.html" target="_blank">http://lists.rpm.org/pipermail/rpm-list/2009-March/000184.html</a><br>
<br>
-greg<br>
<div><div></div><div class="h5"></div></div></blockquote><div><br>Perhaps also this could be of interest <br><a href="http://lists.rpm.org/pipermail/rpm-list/2009-March/000183.html">http://lists.rpm.org/pipermail/rpm-list/2009-March/000183.html</a><br>
 <br>Regards<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div class="h5"><br>
_______________________________________________<br>
Rpm-list mailing list<br>
<a href="mailto:Rpm-list@lists.rpm.org">Rpm-list@lists.rpm.org</a><br>
<a href="http://lists.rpm.org/mailman/listinfo/rpm-list" target="_blank">http://lists.rpm.org/mailman/listinfo/rpm-list</a><br>
</div></div></blockquote></div><br>