Blob Blame History Raw

Name:    kiriki
Summary: A dice 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
Kiriki is an addictive and fun dice game for KDE, designed to be played by as
many as six players. Participants have to collect points by rolling five dice
for up to three times per single turn. Each roll generates a specific
combination of numbers which the player is free to either accept or decline.
However, each specific combination of numbers can be accepted only once.
After thirteen turns the game ends and the scores are compared.
The player with the largest amount of points 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 %{name} --with-kde


%check
desktop-file-validate %{buildroot}%{_kde4_datadir}/applications/kde4/%{name}.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 || :
fi

%posttrans
gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || :

%files -f %{name}.lang
%doc COPYING* 
%{_kde4_bindir}/%{name}
%{_kde4_datadir}/applications/kde4/%{name}.desktop
%{_kde4_iconsdir}/hicolor/*/*/*
%{_kde4_appsdir}/%{name}/


%changelog
* Thu Feb 14 2013 Rex Dieter <rdieter@fedoraproject.org> 4.10.0-2
- updated description, license

* Thu Feb 07 2013 Rex Dieter <rdieter@fedoraproject.org> 4.10.0-1
- first try