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/frameworkintegration?expand=0&rev=142
This commit is contained in:
Luca Beltrame 2017-04-17 16:13:07 +00:00 committed by Git OBS Bridge
parent 11d5a910cd
commit 0622ab56f3

View File

@ -17,23 +17,26 @@
%define lname libKF5Style5
%define _tar_path 5.33
Name: frameworkintegration
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: kconfig-devel >= %{_tar_path}
BuildRequires: kconfigwidgets-devel >= %{_tar_path}
BuildRequires: kconfig-devel >= %{_kf5_bugfix_version}
BuildRequires: kconfigwidgets-devel >= %{_kf5_bugfix_version}
BuildRequires: kf5-filesystem
BuildRequires: ki18n-devel >= %{_tar_path}
BuildRequires: kiconthemes-devel >= %{_tar_path}
BuildRequires: kio-devel >= %{_tar_path}
BuildRequires: knotifications-devel >= %{_tar_path}
BuildRequires: kpackage-devel >= %{_tar_path}
BuildRequires: kwidgetsaddons-devel >= %{_tar_path}
BuildRequires: ki18n-devel >= %{_kf5_bugfix_version}
BuildRequires: kiconthemes-devel >= %{_kf5_bugfix_version}
BuildRequires: kio-devel >= %{_kf5_bugfix_version}
BuildRequires: knotifications-devel >= %{_kf5_bugfix_version}
BuildRequires: kpackage-devel >= %{_kf5_bugfix_version}
BuildRequires: kwidgetsaddons-devel >= %{_kf5_bugfix_version}
%if 0%{?suse_version} >= 1330 || (0%{?sle_version} >= 120200 && 0%{?is_opensuse})
BuildRequires: cmake(AppStreamQt) >= 0.10.4
%endif
@ -49,7 +52,7 @@ Summary: Plugins responsible for better integration of Qt applications in
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
@ -91,8 +94,8 @@ Summary: Plugins responsible for better integration of Qt applications in
Group: Development/Libraries/KDE
Requires: %lname = %{version}
Requires: extra-cmake-modules
Requires: kconfigwidgets-devel >= %{_tar_path}
Requires: kiconthemes-devel >= %{_tar_path}
Requires: kconfigwidgets-devel >= %{_kf5_bugfix_version}
Requires: kiconthemes-devel >= %{_kf5_bugfix_version}
%description devel
Framework Integration is a set of plugins responsible for better