-%define kdeplasmaver 5.24.1
+#
+# Conditional build:
+%bcond_with tests # build with tests
+%define kdeplasmaver 5.24.5
%define qtver 5.9.0
%define kpname powerdevil
Summary: Manages the power consumption settings of a Plasma Shell
Name: kp5-%{kpname}
-Version: 5.24.1
+Version: 5.24.5
Release: 1
License: LGPL v2.1+
Group: X11/Libraries
Source0: https://download.kde.org/stable/plasma/%{kdeplasmaver}/%{kpname}-%{version}.tar.xz
-# Source0-md5: 6a787520d1288993bbeb84d4d3870a33
+# Source0-md5: ac1e83397316954fb587c86d00f04591
URL: https://www.kde.org/
BuildRequires: Qt5Core-devel >= %{qtver}
BuildRequires: cmake >= 2.8.12
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