Passing conditional parameters into a rpm build
Keith G. Robertson-Turner
redhat-forums at genesis-x.nildram.co.uk
Sun Jan 25 06:37:25 UTC 2004
Just hit a small snag building a package:
%install
.... snip ....
# FIXME: how to combine [!?_without_gtk OR ?_with_qt] into a single test?
%{!?_without_gtk:install -D -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/pixmaps/nvclock.xpm}
%{?_with_qt:install -D -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/pixmaps/nvclock.xpm}
and also:
%files
.... snip ....
# FIXME: how to combine [!?_without_gtk OR ?_with_qt] into a single test?
%{!?_without_gtk:%{_datadir}/pixmaps/nvclock.xpm}
%{?_with_qt:%{_datadir}/pixmaps/nvclock.xpm}
I've read the "conditionalbuilds" rpm doc, which gives the example:
# Read: If neither macro exists, then add the default definition.
%{!?_with_ldap: %{!?_without_ldap: %define _without_ldap --without-ldap}}
But that's the equivalent of an [X AND Y], whereas I need a [X OR Y].
Specifically, [IF either X OR Y are TRUE, THEN install the file nvclock.xpm]
How?
TIA.
-
K.
More information about the devel
mailing list