-%define kdeplasmaver 5.23.1
-%define qtver 5.9.0
+#
+# Conditional build:
+%bcond_with tests # build with tests
+%define kdeplasmaver 5.26.0
+%define qtver 5.15.2
%define kf5ver 5.19.0
%define kpname kscreenlocker
Summary: kscreenlocker
Name: kp5-%{kpname}
-Version: 5.23.1
+Version: 5.26.0
Release: 1
License: LGPL v2.1+
Group: X11/Libraries
-Source0: http://download.kde.org/stable/plasma/%{kdeplasmaver}/%{kpname}-%{version}.tar.xz
-# Source0-md5: f7ef5f0c644a22e4605651756a836468
+Source0: https://download.kde.org/stable/plasma/%{kdeplasmaver}/%{kpname}-%{version}.tar.xz
+# Source0-md5: b205cbdb6e4be1b33622f52e54cbab2a
URL: http://www.kde.org/
BuildRequires: Qt5Core-devel >= %{qtver}
BuildRequires: Qt5Gui-devel >= %{qtver}
BuildRequires: kf5-plasma-framework-devel >= %{kf5ver}
BuildRequires: kp5-layer-shell-qt-devel >= %{kdeplasmaver}
BuildRequires: ninja
+BuildRequires: pam-devel
BuildRequires: rpmbuild(macros) >= 1.164
+BuildRequires: xcb-util-keysyms-devel
BuildRequires: xorg-lib-libX11-devel
BuildRequires: xz
BuildRequires: zlib-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
%files -f %{kpname}5.lang
%defattr(644,root,root,755)
-%{_datadir}/kservices5/screenlocker.desktop
-%attr(755,root,root) %{_prefix}/libexec/kcheckpass
%attr(755,root,root) %{_prefix}/libexec/kscreenlocker_greet
%ghost %{_libdir}/libKScreenLocker.so.5
%attr(755,root,root) %{_libdir}/libKScreenLocker.so.*.*
%dir %{_datadir}/ksmserver/screenlocker
%dir %{_datadir}/ksmserver/screenlocker/org.kde.passworddialog
%{_datadir}/ksmserver/screenlocker/org.kde.passworddialog/metadata.desktop
-%attr(755,root,root) %{_libdir}/qt5/plugins/kcms/kcm_screenlocker.so
%dir %{_datadir}/kpackage/kcms/kcm_screenlocker
%dir %{_datadir}/kpackage/kcms/kcm_screenlocker/contents
%dir %{_datadir}/kpackage/kcms/kcm_screenlocker/contents/ui
%{_datadir}/kpackage/kcms/kcm_screenlocker/contents/ui/LnfConfig.qml
%{_datadir}/kpackage/kcms/kcm_screenlocker/contents/ui/WallpaperConfig.qml
%{_datadir}/kpackage/kcms/kcm_screenlocker/contents/ui/main.qml
-%{_datadir}/kpackage/kcms/kcm_screenlocker/metadata.desktop
-%{_datadir}/kpackage/kcms/kcm_screenlocker/metadata.json
+%{_libdir}/qt5/plugins/plasma/kcms/systemsettings/kcm_screenlocker.so
+%{_desktopdir}/kcm_screenlocker.desktop
%files devel
%defattr(644,root,root,755)