File knights.spec of Package knights4

#
# spec file for package knights
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:           knights
Version:        2.5.0
Release:        0
License:        GPL-2.0+
Summary:        A simple chess board for KDE 4
Url:            http://kde-apps.org/content/show.php/KChess?content=122046
Group:          Amusements/Games/Board/Chess
Source0:        http://dl.dropbox.com/u/2888238/Knights/%{name}-%{version}.tar.bz2
BuildRequires:  libkde4-devel >= 4.9.0
BuildRequires:  libkdegames4-devel >= 4.9.0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif
Requires:       gnuchess
Recommends:     %{name}-lang = %{version}
Suggests:       crafty
Obsoletes:      kchess
%kde4_runtime_requires

%description
Knights is the chess interface for KDE SC 4. It features play against opponents
on the Free Internet Chess Server, a friend on the same computer, or a computer
chess engine.

%lang_package
%prep
%setup -q

%build
%cmake_kde4 -d build
%make_jobs

%install
%kde4_makeinstall -C build

%if 0%{?suse_version}
%suse_update_desktop_file -r knights Qt KDE Game BoardGame
%endif

%if 0%{?suse_version} && 0%{?suse_version} < 1140
rm -rf %{buildroot}%{_datadir}/locale/sr@ijekavian/
rm -rf %{buildroot}%{_datadir}/locale/sr@ijekavianlatin
%endif

%find_lang %{name}

%kde_post_install

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc README.themes
%{_kde4_applicationsdir}/knights.desktop
%{_kde4_appsdir}/knights/
%{_kde4_bindir}/knights
%{_kde4_configdir}/knights.knsrc
%doc %{_kde4_htmldir}/en/knights/
%{_kde4_iconsdir}/*/*/*/knights.*
%{_kde4_sharedir}/config.kcfg/knights.kcfg
%{_datadir}/dbus-1/interfaces/org.kde.Knights.xml

%files lang -f %{name}.lang
%defattr(-,root,root,-)
%exclude %{_kde4_htmldir}/en/knights/

%changelog