Re: or condition at BuildRequires

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > if your ORs are based on some kind of comparable metric you could wrap
> > them.  ie:
> >
> > %if %{BuildArch} == 'x86_64'
> > BuildRequires: libx
> > %else
> > %if %{BuildArch} == 'i386'
> > BuildRequires: liby
> > %endif
> > %endif
>
> this looks good in general. How can I differentiate between RHEL 4 and 5?
>

A fairly standard way from what I've seen would be like this:

%if 0%{?rhel} == 5
BuildRequires: libx
%else
%if 0%{?rhel} == 5
BuildRequires: liby
%endif
%endif


But when you build the rpm you will need to provide the %rhel macro.  I
mention how this can be done in these 2 threads:

http://lists.rpm.org/pipermail/rpm-list/2009-March/000182.html
http://lists.rpm.org/pipermail/rpm-list/2009-March/000184.html

-greg

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux