Mailinglist Archive: opensuse-packaging (206 mails)
| < Previous | Next > |
Re: [opensuse-packaging] Check for KDE SC version inside SPEC files
- From: Dave Plater <davejplater@xxxxxxxxx>
- Date: Sat, 15 Jan 2011 17:58:06 +0200
- Message-id: <4D31C40E.5040100@gmail.com>
On 01/15/2011 05:35 PM, Matthias Fehring wrote:
instance, kpltfrmvers=%{_kde_platform_version}, you can also try using
"cut" using the periods "." as field delimiters, see man cut.
Dave P
--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx
Am Samstag, 15. Januar 2011, 16:04:06 schrieb Dave Plater:Try quotes or if that fails use normal bash scripting starting with, for
On 01/15/2011 04:11 PM, Matthias Fehring wrote:Yes, I know. What I need is to check the KDE version of the build system to
When I try this in terminal I get the following:%_kde_platform_version is automatically set to the installed systems
KDE: 4.9.95 (4.6 RC2)
I would expect something like
4995
I am only a novice in sed... ;-)
Best Greetings
Matthias
version, if you are building locally with plain rpmbuild it will reflect
your systems version.
I placed the following line in the %prep section of a spec file : "echo
"kde platform version = %{_kde_platform_version}"" and it produces this :
+ echo 'kde platform version = 4.5.95'
kde platform version = 4.5.95
+ exit 0
If you wish to see all of the macros available on your system place this
macro at the top of the spec file : %dump and then execute rpmbuild
yourspec.spec and all of the macros and definitions will be dumped to
the console (don't forget to remove %dump afterwards). All of these
macros may not exist in the build service build system but if you search
for the macro in the files in /etc/rpm and then use rpm -q
--whatprovides /etc/rpm/"the macro file it's in" you can then add the
macro by adding the package to your BuildRequires:.
Regards
Dave P
use the appropriate
patch.
For example something like
%if kde4_version >= 4560
%patch1
%endif
The same is possible with the suse_version macro, that is 1130 for openSUSE
11.3.
When I try
%if %{_kde_platform_version} >= 4.5.60
%patch1
%endif
I get a parse error in expression.
Might be that my description was not clear enough - sorry for that. :)
Best Greetings
Matthias
instance, kpltfrmvers=%{_kde_platform_version}, you can also try using
"cut" using the periods "." as field delimiters, see man cut.
Dave P
--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx
| < Previous | Next > |