File kactivitymanagerd.spec of Package kactivitymanagerd

# spec file for package kactivitymanagerd
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%global kf5_version 5.54.0
%global qt5_version 5.11.0

%bcond_without lang
Name:           kactivitymanagerd
Version:        5.15.0
Release:        0
Summary:        KDE Plasma Activities support
License:        GPL-2.0+
Group:          System/GUI/KDE
Source:         kactivitymanagerd-%{version}.tar.xz
%if %{with lang}
Source1:        kactivitymanagerd-%{version}.tar.xz.sig
Source2:        plasma.keyring
Patch1000:      kamd-rename.patch
%if 0%{?suse_version} > 1325
BuildRequires:  libboost_headers-devel
BuildRequires:  boost-devel >= 1.49.0
BuildRequires:  cmake >= 2.8.12
BuildRequires:  extra-cmake-modules >= %{kf5_version}
BuildRequires:  fdupes
BuildRequires:  kcmutils-devel >= %{kf5_version}
BuildRequires:  kconfig-devel >= %{kf5_version}
BuildRequires:  kcoreaddons-devel >= %{kf5_version}
BuildRequires:  kdbusaddons-devel >= %{kf5_version}
BuildRequires:  kdeclarative-devel >= %{kf5_version}
BuildRequires:  kcrash-devel >= %{kf5_version}
BuildRequires:  kf5-filesystem
BuildRequires:  kglobalaccel-devel >= %{kf5_version}
BuildRequires:  ki18n-devel >= %{kf5_version}
BuildRequires:  kio-devel >= %{kf5_version}
BuildRequires:  kservice-devel >= %{kf5_version}
BuildRequires:  kwindowsystem-devel >= %{kf5_version}
BuildRequires:  kxmlgui-devel >= %{kf5_version}
BuildRequires:  xz
BuildRequires:  cmake(Qt5Core) >= %{qt5_version}
BuildRequires:  cmake(Qt5DBus) >= %{qt5_version}
BuildRequires:  cmake(Qt5Gui) >= %{qt5_version}
BuildRequires:  cmake(Qt5Qml) >= %{qt5_version}
BuildRequires:  cmake(Qt5Quick) >= %{qt5_version}
BuildRequires:  cmake(Qt5Sql) >= %{qt5_version}
BuildRequires:  cmake(Qt5Test) >= %{qt5_version}
BuildRequires:  cmake(Qt5Widgets) >= %{qt5_version}
Recommends:     %{name}-lang
# for
Requires:       libQt5Sql5-sqlite
Provides:       kactivities5 = 5.20.0
Obsoletes:      kactivities5 < 5.20.0

Kactivities provides an API for using and interacting with the Plasma Activities Manager.

%package lang
Summary:        KDE Plasma Activities support
Group:          System/GUI/KDE
Requires:       %{name} = %{version}
Provides:       libKF5Activities5-lang = 5.20.0
Obsoletes:      libKF5Activities5-lang < 5.20.0

%description lang
Provides translations to the package %{name}.

%setup -q -n kactivitymanagerd-%{version}
%patch1000 -p1

  %cmake_kf5 -d build

  %kf5_makeinstall -C build
  %fdupes %{buildroot}

# move dbus service file to /usr/, apparently it's not found in /opt/kf5/ for some reason, breaking the start of plasmashell
  mkdir -p %{buildroot}%{_datadir}
  mv %{buildroot}%{_kf5_sharedir}/dbus-1 %{buildroot}%{_datadir}

%if %{with lang}
%find_lang kactivities5

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%if %{with lang}
%files -n %name-lang -f kactivities5.lang
%dir %{_kf5_sharedir}/locale/*
%dir %{_kf5_sharedir}/locale/*/LC_MESSAGES

%license COPYING*