Re: patch only if dependent version < x? (rpm spec)

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

 



On 06/07/2011 11:52 AM, Mattias Ellert wrote:

> You can do it on the version of the software. If it has a pkg-config
> file you can do something like this (taken from an existing specfile in
> Fedora):
> 
> %prep
> %setup -q
> %if %(pkg-config --max-version 2.1.2 ftgl 2>/dev/null && echo 1 || echo 0)
> %patch0 -p1
> %endif

BTW there's no need to use rpm macros for stuff like that in %prep,
simply use the shell:

%prep
%setup -q
if pkg-config --max-version 2.1.2 ftgl; then
%patch0 -p1
fi
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel


[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