On Tue, Oct 30, 2012 at 7:20 PM, Guido Berhoerster
Numeric comparisons only work with integers, if you only need to compare the major version you can get away with: %define xulrunner_major_ver %(rpm -q --queryformat %'%%{VERSION}\\n' xulrunner-devel | sed 's|\\..*$||') [...] %if %xulrunner_major_ver >= 16 [...] %endif
If you need a full rpm version string comparison you need a lua macro: %{lua: if rpm.vercmp(rpm.expand("%(rpm -q --queryformat '%%{VERSION}' xulrunner-devel)"), "16.0.0") >= 0 then rpm.define("xulrunner_ge_16_0_0 1") else rpm.define("xulrunner_ge_16_0_0 0") end } %if %xulrunner_ge_16_0_0 [...] %endif
Thanks! That's it!
Not sure if so much black magic would pass a Factory review...
Don't worry...I used it to detect Tumbleweed in Packman... Marguerite -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org