Mailinglist Archive: opensuse-packaging (99 mails)

< Previous Next >
Re: [opensuse-packaging] How to detect package's version in specfile?
On Tue, Oct 30, 2012 at 4:38 PM, Guido Berhoerster <gber@xxxxxxxxxxxx> wrote:
%define xulrunner_version %(rpm -q --queryformat '%%{VERSION}'

should work. "%()" is expanded together with the macros before building so you
can use the %xulrunner_version for %if blocks, two "%" escape the version
macro. Needless to say that this isn't really pretty.

Hi, Guido

It didn't work...

%if %{xulrunner_version} >= 16 <== line 237
%patch -p1

error: parse error in expression
error: /home/abuild/rpmbuild/SOURCES/gpac.spec:237:
parseExpressionBoolean returns -1

seems "%define xulrunner_version %(rpm -q --queryformat '%%{VERSION}'
xulrunner-devel)" returns 0 or the return is not a number but a
warning string.

To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-packaging+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups