Re: Is it possible to dynamize "requires" at RPM build time?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kai Engert wrote:
> A "Requires:" entry in a SPEC file may define the smallest library
> version acceptable for the resulting RPM package.
> 
> Is it possible by some SPEC logic, to make a "Requires:" entry dynamic?
> 
> In other words, is it possible, at RPM build time, to query the
> installed library release in the build environment, and have the
> produced RPM be dependent on >= that library version?

Yes, use something like:
BuildRequires: foo-devel
%global foo_ver %(foo_bin --version)
%if "%{?foo_ver}" > "0"
Requires: foo >= %{foo_ver}
%endif

-- Rex

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux