On 14/01/11 18:01, Matthias Fehring wrote:
Am Freitag, 14. Januar 2011, 17:27:26 schrieb Stephan Kulow:
Am Freitag, 14. Januar 2011 schrieb Matthias Fehring:
Hello list,
I am searching for a way to determine the KDE SC version of the build system inside a SPEC file.
In the past I used this way: http://bit.ly/eABmJb
But this does not work anymore in recent openSUSE releases or with recent versions of KDE SC - I do not know the real reason.
Is there a better way to check for the used version?
Good would be a macro like suse_version, that can be used in conditionals.
How about %_kde_platform_version ?
Greetings, Stephan
In my last attempts (one year or so ago) that has not worked - maybe because of the dots?
But I will try it again. :)
Best Greetings Matthias
The original macro failed just because the output from kde4-config changed format slightly with the KDE rebranding. I've been using this one in my spec files for a while %define kde4_version %(/usr/bin/kde4-config --version | sed -r '/KDE.*:/! { d }; { s/KDE.*: (([0-9]+)\\.([0-9]+)\\.([0-9]+)) .*/\\2\\3\\4/g }') Works on all KDE versions I've seen. Regards, Tejas -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org