I would like to have an rpm require different rpms based on some shell commands.
I know you can do this based on distro versions.
if 0%{?fedora} >= 4
Requires: foo
%endif
But, when I try to define my own macro it sets it at build time and not install time.
%define test %(test -e /tmp/test.txt && echo 1 || echo 0)
%if 0%{?test} == 1
Requires: foo
%endif
Is there a way to evaluate the macro later or is it always evaluated when you create the rpm?
I know you can do this based on distro versions.
if 0%{?fedora} >= 4
Requires: foo
%endif
But, when I try to define my own macro it sets it at build time and not install time.
%define test %(test -e /tmp/test.txt && echo 1 || echo 0)
%if 0%{?test} == 1
Requires: foo
%endif
Is there a way to evaluate the macro later or is it always evaluated when you create the rpm?