diff --git a/.gitignore b/.gitignore index e69de29..271bfb0 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/knavalbattle-4.10.0.tar.xz diff --git a/knavalbattle.spec b/knavalbattle.spec new file mode 100644 index 0000000..695b665 --- /dev/null +++ b/knavalbattle.spec @@ -0,0 +1,82 @@ + +Name: knavalbattle +Summary: A ship sinking game +Version: 4.10.0 +Release: 2%{?dist} + +License: GPLv2+ and GFDL +URL: https://projects.kde.org/projects/kde/kdegames/%{name} +%global revision %(echo %{version} | cut -d. -f3) +%if %{revision} >= 50 +%global stable unstable +%else +%global stable stable +%endif +Source0: http://download.kde.org/%{stable}/%{version}/src/%{name}-%{version}.tar.xz + +BuildRequires: desktop-file-utils +BuildRequires: libkdegames-devel >= %{version} + +Requires: libkdegames%{?_isa} >= %{_kde4_version} + +%description +Naval Battle is a ship sinking game for KDE. Ships are placed on a board +which represents the sea. Players try to hit each others ships in turns +without knowing where they are placed. The first player to destroy all +ships wins the game. + + +%prep +%setup -q + + +%build +mkdir -p %{_target_platform} +pushd %{_target_platform} +%{cmake_kde4} .. +popd + +make %{?_smp_mflags} -C %{_target_platform} + + +%install +make install/fast DESTDIR=%{buildroot} -C %{_target_platform} + +%find_lang kbattleship --with-kde + + +%check +desktop-file-validate %{buildroot}%{_kde4_datadir}/applications/kde4/kbattleship.desktop + + +%post +touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null || : + +%postun +if [ $1 -eq 0 ] ; then +touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null +gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || : +update-desktop-database -q &> /dev/null ||: +fi + +%posttrans +gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || : +update-desktop-database -q &> /dev/null ||: + +%files -f kbattleship.lang +%doc COPYING* +%doc AUTHORS +%{_kde4_bindir}/kbattleship +%{_kde4_datadir}/applications/kde4/kbattleship.desktop +%{_kde4_datadir}/kde4/services/kbattleship.protocol +%{_kde4_iconsdir}/hicolor/*/*/* +%{_kde4_appsdir}/kbattleship/ + + +%changelog +* Fri Feb 15 2013 Rex Dieter 4.10.0-2 +- update license, description + +* Thu Feb 07 2013 Rex Dieter 4.10.0-1 +- first try + diff --git a/sources b/sources index e69de29..05c7da9 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +7fc88b443a62cbbda40e42ef6aa9359e knavalbattle-4.10.0.tar.xz