Blob Blame History Raw
Name:		knights
Version:	2.5.0
Release:	3%{?dist}
Summary:	A chess board for KDE

Group:		Amusements/Games
# KDE e.V. may determine that future GPL versions are accepted
License: GPLv2 or GPLv3
URL:		http://kde-apps.org/content/show.php/Knights?content=122046
Source0:	http://dl.dropbox.com/u/2888238/Knights/%{name}-%{version}.tar.bz2
BuildRequires:	kdegames-devel >= 6:4.9
BuildRequires:	gettext
BuildRequires:	desktop-file-utils
Requires:	gnuchess
#from the KDE SIG page:
%{?_kde4_macros_api:Requires: kde4-macros(api) = %{_kde4_macros_api} }
%{?_kde4_version:Requires: kdelibs4%{?_isa} >= %{_kde4_version}}


%description
Knights is a chess board for KDE that supports playing against
computer engines that support the XBoard protocol like GNUChess and also
multiplayer games over the internet on FICS. It features automatic rule
checking, themes, and nice animations


%prep
%setup -q


%build
mkdir build
pushd build
%{cmake_kde4} ..
popd

make %{?_smp_mflags} -C build


%install
make install/fast DESTDIR=%{buildroot} -C build

desktop-file-validate %{buildroot}%{_kde4_datadir}/applications/kde4/%{name}.desktop

%find_lang %{name} --with-kde


#scriplet to update the icon cache
%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 || :
#end of scriptlet to update the icon cache


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc README
%{_bindir}/%{name}
%{_datadir}/dbus-1/interfaces/org.kde.Knights.xml
%{_kde4_appsdir}/%{name}
%{_kde4_iconsdir}/hicolor/*/apps/%{name}.*
%{_kde4_datadir}/applications/kde4/%{name}.desktop
%{_kde4_configdir}/%{name}.knsrc
%{_kde4_configdir}.kcfg/%{name}.kcfg


%changelog
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Wed Oct 03 2012 Rex Dieter <rdieter@fedoraproject.org> 2.5.0-2
- do safer out-of-src-tree build
- add minimal/versioned kdelibs4 dep
- drop .desktop permissions hack (rpmlint be darned, it's legit)
- use %%find_lang --with-kde
- use %%_kde4_iconsdir consistently

* Thu Aug 30 2012 Julian Aloofi <julian@fedoraproject.org> 2.5.0-1
- update to latest upstream release
- remove the patch for building against the new KDEgames API

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jun 15 2012 Julian Aloofi <julian@fedoraproject.org> 2.4.2-2
- apply patch to build against the new KDEgames API
- removed the buildroot tag

* Mon Apr 30 2012 Julian Aloofi <julian@fedoraproject.org> 2.4.2-1
- update to latest upstream release

* Sat Nov 12 2011 Julian Aloofi <julian@fedoraproject.org> 2.4.0-1
- update to latest upstream release

* Mon Jun 13 2011 Julian Aloofi <julian@fedoraproject.org> 2.3.2-1
- update to latest upstream release

* Mon Mar 21 2011 Julian Aloofi <julian@fedoraproject.org> 2.3.1-1
- update to latest upstream release

* Fri Mar 11 2011 Julian Aloofi <julian@fedoraproject.org> 2.3.0-1
- update to latest upstream release

* Sun Feb 13 2011 Julian Aloofi <julian@fedoraproject.org> 2.2.0-4
- fix permissions of the desktop file

* Mon Feb 07 2011 Julian Aloofi <julian@fedoraproject.org> 2.2.0-3
- clarification on the license tag

* Mon Feb 07 2011 Julian Aloofi <julian@fedoraproject.org> 2.2.0-2
- using macros in Source0
- build with the proper make flags

* Mon Jan 31 2011 Julian Aloofi <julian@fedoraproject.org> 2.2.0-1
- initial package