1

I've already read this thread RPM conditional Requires in spec file possible but I just want to make sure with a yes/no answer.

I have the following in my spec file: (from https://fedoraproject.org/wiki/Packaging:DistTag)

%if 0%{?rhel}  == 6 || 0%{?rhel} == 7
Requires: XXX
%else
Requires: YYY
%endif

Does it mean that when I build the rpm if I'm building on RHEL 6 or 7 then the rpm would require XXX or does it mean that the rpm I have built will require XXX or YYY based on the installation target?

Please be simple in your answer, there is no need of overkill.

Thanks

Community
  • 1
  • 1
Fran
  • 3,693
  • 4
  • 19
  • 19

1 Answers1

2

Build-time. You need to build two different RPMs for the two different distros.

Aaron D. Marasco
  • 6,506
  • 3
  • 26
  • 39