-%define kdeappsver 21.04.1
+#
+# Conditional build:
+%bcond_with tests # build with tests
+%define kdeappsver 22.04.1
%define kframever 5.56.0
%define qtver 5.9.0
%define kaname calendarsupport
Summary: Calendarsupport
Name: ka5-%{kaname}
-Version: 21.04.1
+Version: 22.04.1
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: d2bf7af3b77b68ed9aa5d02c5a09383c
+# Source0-md5: 21e303d99720939068f2f4282c878824
URL: http://www.kde.org/
BuildRequires: Qt5Core-devel >= %{qtver}
BuildRequires: Qt5Gui-devel >= 5.11.1
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
%files devel
%defattr(644,root,root,755)
%{_includedir}/KF5/CalendarSupport
-%{_includedir}/KF5/calendarsupport
-%{_includedir}/KF5/calendarsupport_version.h
%{_libdir}/cmake/KF5CalendarSupport
%{_libdir}/libKF5CalendarSupport.so
%{_libdir}/qt5/mkspecs/modules/qt_CalendarSupport.pri