Best (cleanest?) conditional formation in a spec file for distro version and arch
Richard Shaw
hobbes1069 at gmail.com
Wed Jun 18 12:56:30 UTC 2014
My package freecad has a missing optional dependency on RHEL 6, ppc64 ONLY
so for that build I need to drop a "Requires:"
The dependency doesn't build on ppc64 w/ older gcc and is not easily
fixable so I decided just to drop the optional dependency for that build
and arch, but how to accomplish this?
I started building the NOT conditional version but realized it won't work
as intended even if it worked at all since both NOT conditions would have
to be true:
%if ! 0%{?rhel} <= 6 && ! %{_arch} ppc64
Requires: python-pivy
%endif
I guess I could layer it but it get's ugly and repetitive:
%if ! 0%{?rhel} <= 6
Requires: python-pivy
%else
%ifnarch ppc64
Requires: python-pivy
%endif
%endif
Ideas?
Thanks,
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/devel/attachments/20140618/370c32a3/attachment.html>
More information about the devel
mailing list