-%define kdeappsver 21.12.2
-%define kframever 5.56.0
-%define qtver 5.9.0
+#
+# Conditional build:
+%bcond_with tests # build with tests
+%define kdeappsver 23.08.5
+%define kframever 5.94.0
+%define qtver 5.15.2
%define kaname akonadi-notes
Summary: Akonadi Notes
Name: ka5-%{kaname}
-Version: 21.12.2
+Version: 23.08.5
Release: 1
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: 8db79743afb39c1e358292f8ff630add
+Source0: https://download.kde.org/stable/release-service/%{kdeappsver}/src/%{kaname}-%{version}.tar.xz
+# Source0-md5: e22307bd0d49d152e11da58e1baf7394
URL: http://www.kde.org/
BuildRequires: Qt5Core-devel >= %{qtver}
BuildRequires: Qt5Gui-devel >= 5.11.1
BuildRequires: Qt5Test-devel >= 5.9.0
BuildRequires: Qt5Xml-devel >= 5.9.0
-BuildRequires: cmake >= 2.8.12
+BuildRequires: cmake >= 3.20
BuildRequires: gettext-devel
BuildRequires: ka5-akonadi-devel >= %{kdeappsver}
BuildRequires: ka5-kmime-devel >= %{kdeappsver}
%setup -q -n %{kaname}-%{version}
%build
-install -d build
-cd build
%cmake \
+ -B build \
-G Ninja \
+ %{!?with_tests:-DBUILD_TESTING=OFF} \
-DHTML_INSTALL_DIR=%{_kdedocdir} \
- -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
- ..
-%ninja_build
+ -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
+%ninja_build -C build
+
+%if %{with tests}
+ctest --test-dir build
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
%files -f %{kaname}.lang
%defattr(644,root,root,755)
-%ghost %{_libdir}/libKF5AkonadiNotes.so.5
-%attr(755,root,root) %{_libdir}/libKF5AkonadiNotes.so.*.*.*
+%ghost %{_libdir}/libKPim5AkonadiNotes.so.5
+%attr(755,root,root) %{_libdir}/libKPim5AkonadiNotes.so.*.*.*
%files devel
%defattr(644,root,root,755)
-%{_includedir}/KF5/Akonadi/Notes
-%{_includedir}/KF5/akonadi-notes_version.h
-%{_includedir}/KF5/akonadi/notes
-%{_libdir}/cmake/KF5AkonadiNotes
-%{_libdir}/libKF5AkonadiNotes.so
%{_libdir}/qt5/mkspecs/modules/qt_AkonadiNotes.pri
+%{_includedir}/KPim5/AkonadiNotes
+%{_libdir}/cmake/KF5AkonadiNotes
+%{_libdir}/cmake/KPim5AkonadiNotes
+%{_libdir}/libKPim5AkonadiNotes.so