-%define kdeplasmaver 5.24.1
-%define qtver 5.9.0
+#
+# Conditional build:
+%bcond_with tests # build with tests
+%define kdeplasmaver 5.27.2
+%define qtver 5.15.2
%define kpname xdg-desktop-portal-kde
Summary: KDE XDG Desktop Portal
Name: kp5-%{kpname}
-Version: 5.24.1
+Version: 5.27.2
Release: 1
License: LGPL v2.1+
Group: X11/Libraries
-Source0: http://download.kde.org/stable/plasma/%{kdeplasmaver}/%{kpname}-%{version}.tar.xz
-# Source0-md5: f47bad2254d6f53e2f0afe766e828aa9
+Source0: https://download.kde.org/stable/plasma/%{kdeplasmaver}/%{kpname}-%{version}.tar.xz
+# Source0-md5: 44ed284e7ae8d8d3dfbc727a0612cd16
URL: http://www.kde.org/
BuildRequires: Qt5Core-devel >= %{qtver}
BuildRequires: cmake >= 2.8.12
+BuildRequires: cups-devel
BuildRequires: fontconfig-devel
BuildRequires: kf5-attica-devel
BuildRequires: kf5-kactivities-stats-devel
install -d build
cd build
%cmake -G Ninja \
+ %{!?with_tests:-DBUILD_TESTING=OFF} \
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-DHTML_INSTALL_DIR=%{_kdedocdir} \
../
%ninja_build
+%if %{with tests}
+ctest
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
%ninja_install -C build
%{_desktopdir}/org.freedesktop.impl.portal.desktop.kde.desktop
%{_datadir}/knotifications5/xdg-desktop-portal-kde.notifyrc
%{systemduserunitdir}/plasma-xdg-desktop-portal-kde.service
+%{_datadir}/qlogging-categories5/xdp-kde.categories