Detecting version in a SPEC file
Roland McGrath
roland at redhat.com
Mon Feb 19 03:11:17 UTC 2007
Your Buildrequires are your declaration of what is required for the build
the spec wants to do. You don't want it to depend on what happens to be
around.
I think what you want to do is:
%define gnupg_version 1.2
%if "%fedora" >= "6"
%define gnupg_version 1.4
%endif
%if "%rhel" >= "5"
%define gnupg_version 1.4
%endif
...
BuildRequires: gnupg = %{gnupg_version}
...
%check
%if "%gnupg_version" = "1.2"
this data
%else
that data
%endif
More information about the fedora-devel-list
mailing list