-%define kdeappsver 19.04.1
-%define kframever 5.56.0
-%define qtver 5.9.0
+#
+# Conditional build:
+%bcond_with tests # build with tests
+%define kdeappsver 23.04.2
+%define kframever 5.94.0
+%define qtver 5.15.2
%define kaname kblocks
Summary: Kblocks
Name: ka5-%{kaname}
-Version: 19.04.1
+Version: 23.04.2
Release: 1
License: GPL v2+/LGPL v2.1+
Group: X11/Applications/Games
-Source0: http://download.kde.org/stable/applications/%{kdeappsver}/src/%{kaname}-%{version}.tar.xz
-# Source0-md5: a03617a566d92c624075815f29e9497e
+Source0: https://download.kde.org/stable/release-service/%{kdeappsver}/src/%{kaname}-%{version}.tar.xz
+# Source0-md5: bb6c7de46466de324acbca452f8e8217
URL: http://www.kde.org/
BuildRequires: Qt5Core-devel >= %{qtver}
BuildRequires: Qt5Gui-devel >= 5.11.1
play area. When there is not enough space for blocks to fall, the game
is over.
+%description -l pl.UTF-8
+KBlocks jest klasyczną grą w spadające bloki. Ideą gry jest
+układać spadające bloki tak, aby tworzyły poziome linie bez przerw.
+Kompletne linie są usuwane i robi się więcej miejsca w obszarze gry.
+Gdy nie ma już miejsca na spadające bloki, gra się kończy.
+
%prep
%setup -q -n %{kaname}-%{version}
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 -f %{kaname}.lang
%defattr(644,root,root,755)
-/etc/xdg/kblocks.categories
-/etc/xdg/kblocks.knsrc
%attr(755,root,root) %{_bindir}/kblocks
%{_desktopdir}/org.kde.kblocks.desktop
%{_datadir}/config.kcfg/kblocks.kcfg
%{_iconsdir}/hicolor/48x48/apps/kblocks.png
%{_iconsdir}/hicolor/64x64/apps/kblocks.png
%{_datadir}/kblocks
-%{_datadir}/kxmlgui5/kblocks
%{_datadir}/metainfo/org.kde.kblocks.appdata.xml
+%{_datadir}/qlogging-categories5/kblocks.categories
+%{_datadir}/knsrcfiles/kblocks.knsrc