-%define kdeappsver 21.12.1
-%define kframever 5.56.0
-%define qtver 5.9.0
+#
+# Conditional build:
+%bcond_with tests # build with tests
+%define kdeappsver 22.08.1
+%define kframever 5.94.0
+%define qtver 5.15.2
%define kaname pimcommon
Summary: Common PIM libraries
Name: ka5-%{kaname}
-Version: 21.12.1
-Release: 1
+Version: 22.08.1
+Release: 2
License: GPL v2+/LGPL v2.1+
Group: X11/Libraries
-Source0: http://download.kde.org/stable/release-service/%{kdeappsver}/src/%{kaname}-%{version}.tar.xz
-# Source0-md5: 485229544532b1ca10fb42458e785afe
+Source0: https://download.kde.org/stable/release-service/%{kdeappsver}/src/%{kaname}-%{version}.tar.xz
+# Source0-md5: 25864646e1876b3e8ae34b807b30a0ef
URL: http://www.kde.org/
BuildRequires: Qt5Core-devel >= %{qtver}
BuildRequires: Qt5DBus-devel
install -d build
cd build
%cmake -G Ninja \
+ %{!?with_tests:-DBUILD_TESTING=OFF} \
-DHTML_INSTALL_DIR=%{_kdedocdir} \
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
..
%ninja_build
+%if %{with tests}
+ctest
+%endif
+
+
%install
rm -rf $RPM_BUILD_ROOT
%ninja_install -C build
%defattr(644,root,root,755)
%{_includedir}/KF5/PimCommon
%{_includedir}/KF5/PimCommonAkonadi
-%{_includedir}/KF5/pimcommon
-%{_includedir}/KF5/pimcommon_version.h
-%{_includedir}/KF5/pimcommonakonadi
-%{_includedir}/KF5/pimcommonakonadi_version.h
%{_libdir}/cmake/KF5PimCommon
%{_libdir}/cmake/KF5PimCommonAkonadi
%{_libdir}/libKF5PimCommon.so