File kye.spec of Package kye

#
# spec file for package kye
#
# Copyright (c) 2011 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:           kye
Version:        1.0
Release:        1
Group:          Amusements/Games/Strategy/Turn Based
Summary:        Logic puzzle game with arcade elements
License:        GPL-2.0+
Url:            http://games.moria.org.uk/kye/

Source:         %name-%version.tar.xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  desktop-file-utils python-base update-desktop-files xz
BuildArch:      noarch
%py_requires
Requires:       gdk-pixbuf-loader-rsvg, python-gtk

%description
This is a clone of the original Kye game for Windows, by Colin Garbutt.

Kye is a puzzle game with arcade game elements. The game takes place
in a small playing area, where the player controls Kye - a
distinctive green blob. The player moves around and tries to collect
all of the diamonds. However, there are many other objects in the
game, which can obstruct, trap or kill the Kye.

Kye is one of those games like Chess, where a small number of
different playing pieces, obeying simple rules, combine to create a
game of enormous variety and complexity.

Authors:
--------
	Colin Phipps

%prep
%setup -q

%build
python setup.py build;

%install
python setup.py install --prefix=%_prefix --root=%buildroot \
	--record-rpm=INSTALLED_FILES;
mkdir -p "%buildroot/%_datadir/pixmaps";
cp -a kye*icon.png "%buildroot/%_datadir/pixmaps/";
# convenience
ln -s Kye "%buildroot/%_bindir/kye";
ln -s Kye-edit "%buildroot/%_bindir/kye-edit";

cat >>"%name.desktop" <<-EOF
	[Desktop Entry]
	Type=Application
	Version=1.0
	Name=Kye
	Icon=kye-icon
	Exec=Kye %f
	Terminal=false
	Categories=Game;LogicGame;
EOF

cat >>"%name-edit.desktop" <<-EOF
	[Desktop Entry]
	Type=Application
	Version=1.0
	Name=Kye Level Editor
	Exec=Kye-edit %f
	Icon=kye-edit-icon
	Terminal=false
	Categories=Game;LogicGame;
EOF

mkdir -p "%buildroot/%_datadir/applications";
desktop-file-install --dir "%buildroot/%_datadir/applications/" \
	"%name.desktop" "%name-edit.desktop"
%suse_update_desktop_file %name
%suse_update_desktop_file %name-edit

%files -f INSTALLED_FILES
%defattr(-,root,root)
%_bindir/kye*
%_datadir/*/*

%changelog