From 841b3e4a70b37065877e5731f33d3f46032ed70ef9e5932ca4b80090ab049844 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Mon, 17 Apr 2017 16:13:21 +0000 Subject: [PATCH] Put _kf5_bugfix_version to ease maintenance instead of relying on _tar_path (port from KUF) OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kbookmarks?expand=0&rev=114 --- kbookmarks.spec | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/kbookmarks.spec b/kbookmarks.spec index ca68e33..954ad4a 100644 --- a/kbookmarks.spec +++ b/kbookmarks.spec @@ -18,22 +18,25 @@ %bcond_without lang %define lname libKF5Bookmarks5 -%define _tar_path 5.33 Name: kbookmarks Version: 5.33.0 Release: 0 +# Full KF5 version (e.g. 5.33.0) +%{!?_kf5_version: %global _kf5_version %{version}} +# Last major and minor KF5 version (e.g. 5.33) +%{!?_kf5_bugfix_version: %global _kf5_bugfix_version %(echo %{_kf5_version} | awk -F. '{print $1"."$2}')} %define kf5_version %{version} BuildRequires: cmake >= 3.0 -BuildRequires: extra-cmake-modules >= %{_tar_path} +BuildRequires: extra-cmake-modules >= %{_kf5_bugfix_version} BuildRequires: fdupes -BuildRequires: kcodecs-devel >= %{_tar_path} -BuildRequires: kconfig-devel >= %{_tar_path} -BuildRequires: kconfigwidgets-devel >= %{_tar_path} -BuildRequires: kcoreaddons-devel >= %{_tar_path} +BuildRequires: kcodecs-devel >= %{_kf5_bugfix_version} +BuildRequires: kconfig-devel >= %{_kf5_bugfix_version} +BuildRequires: kconfigwidgets-devel >= %{_kf5_bugfix_version} +BuildRequires: kcoreaddons-devel >= %{_kf5_bugfix_version} BuildRequires: kf5-filesystem -BuildRequires: kiconthemes-devel >= %{_tar_path} -BuildRequires: kwidgetsaddons-devel >= %{_tar_path} -BuildRequires: kxmlgui-devel >= %{_tar_path} +BuildRequires: kiconthemes-devel >= %{_kf5_bugfix_version} +BuildRequires: kwidgetsaddons-devel >= %{_kf5_bugfix_version} +BuildRequires: kxmlgui-devel >= %{_kf5_bugfix_version} %if %{with lang} BuildRequires: cmake(Qt5LinguistTools) >= 5.6.0 %endif @@ -44,7 +47,7 @@ Summary: Lets you access and manipulate bookmarks stored using XBEL forma License: LGPL-2.1+ Group: System/GUI/KDE Url: http://www.kde.org -Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz +Source: http://download.kde.org/stable/frameworks/%{_kf5_bugfix_version}/%{name}-%{version}.tar.xz Source1: baselibs.conf BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -66,7 +69,7 @@ Summary: Lets you access and manipulate bookmarks stored using XBEL forma Group: Development/Libraries/KDE Requires: %lname = %{version} Requires: extra-cmake-modules -Requires: kwidgetsaddons-devel >= %{_tar_path} +Requires: kwidgetsaddons-devel >= %{_kf5_bugfix_version} Requires: cmake(Qt5Widgets) >= 5.6.0 Requires: cmake(Qt5Xml) >= 5.6.0