Name:           khotkeys
Version:        5.25.5
Release:        1
Summary:        Application to configure hotkeys in KDE
License:        GPLv2+
URL:            https://invent.kde.org/plasma/%{name}

%global revision %(echo %{version} | cut -d. -f3)
%if %{revision} >= 50
%global stable unstable
%else
%global stable stable
%endif
Source0:        http://download.kde.org/%{stable}/plasma/%{version}/%{name}-%{version}.tar.xz

Patch100:       khotkeys-5.21.90-qdbusviewer-qt5.patch
Patch101:       khotkeys-5.21.90-qdbus-qt5.patch

BuildRequires:  extra-cmake-modules
BuildRequires:  kf5-kcmutils-devel
BuildRequires:  kf5-kdbusaddons-devel
BuildRequires:  kf5-kdelibs4support-devel
BuildRequires:  kf5-kdoctools-devel
BuildRequires:  kf5-kglobalaccel-devel
BuildRequires:  kf5-ki18n-devel
BuildRequires:  kf5-kio-devel
BuildRequires:  kf5-kxmlgui-devel
BuildRequires:  kf5-plasma-devel
BuildRequires:  kf5-rpm-macros
BuildRequires:  libX11-devel
BuildRequires:  libXtst-devel
BuildRequires:  plasma-workspace-devel
BuildRequires:  qt5-qtbase-devel
BuildRequires:  qt5-qtx11extras-devel
Requires:       qt5-qttools
Recommends:     qt5-qdbusviewer
Conflicts:      kde-workspace < 4.11.15-3
Obsoletes:      khotkeys-libs < 5.0.0

%description
An advanced editor component which is used in numerous KDE applications
requiring a text editing component.

%package        devel
Summary:        Development files for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%prep
%autosetup -p1


%build
mkdir %{_target_platform}
pushd %{_target_platform}
%{cmake_kf5} ..
popd
%make_build  -C %{_target_platform}


%install
make install/fast DESTDIR=%{buildroot}  -C %{_target_platform}

%find_lang khotkeys --with-html


%ldconfig_scriptlets

%files -f khotkeys.lang
%license LICENSES/*
%{_kf5_libdir}/libkhotkeysprivate.so.*
%{_kf5_qtplugindir}/kcm_hotkeys.so
%{_kf5_plugindir}/kded/khotkeys.so
%{_kf5_datadir}/kservices5/khotkeys.desktop
%{_datadir}/khotkeys/

%files devel
%{_datadir}/dbus-1/interfaces/org.kde.khotkeys.xml
%{_libdir}/cmake/KHotKeysDBusInterface/


%changelog
* Wed Jul 20 2022 misaka00251 <misaka00251@misakanet.cn> - 5.25.5-1
- Init package
