-%define kdeappsver 19.04.1
+#
+# Conditional build:
+%bcond_with tests # build with tests
+%define kdeappsver 22.04.2
%define kframever 5.56.0
%define qtver 5.9.0
%define kaname knavalbattle
Summary: knavalbattle
Name: ka5-%{kaname}
-Version: 19.04.1
+Version: 22.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: fe86f47a4457e74e6044e8d2b6838b55
+Source0: https://download.kde.org/stable/release-service/%{kdeappsver}/src/%{kaname}-%{version}.tar.xz
+# Source0-md5: c0684952bc66df699655d907e5adabec
URL: http://www.kde.org/
BuildRequires: Qt5Core-devel >= %{qtver}
BuildRequires: Qt5Gui-devel >= 5.11.1
in turns without knowing where they are placed. The first player to
destroy all ships wins the game.
+%description -l pl.UTF-8
+Naval Battle to gra w statki dla KDE. Okręty są umieszczone na
+planszy, która reprezentuje morze. Gracze próbują trafić statki
+przeciwnika, nie wiedząc, gdzie się one znajdują, wykonując strzały
+na przemian. Gracz, który pierwszy zatopi wszystkie okręty
+przeciwnika wygrywa.
+
%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
%{_iconsdir}/hicolor/32x32/apps/knavalbattle.png
%{_iconsdir}/hicolor/48x48/apps/knavalbattle.png
%{_iconsdir}/hicolor/64x64/apps/knavalbattle.png
-%{_datadir}/kconf_update/knavalbattle.upd
%{_datadir}/knavalbattle
-%{_datadir}/kservices5/knavalbattle.protocol
-%dir %{_datadir}/kxmlgui5/knavalbattle
-%{_datadir}/kxmlgui5/knavalbattle/knavalbattleui.rc
%{_datadir}/metainfo/org.kde.knavalbattle.appdata.xml
+%{_datadir}/qlogging-categories5/knavalbattle.categories