File kobo-deluxe.spec of Package kobo-deluxe

# spec file for package kobo-deluxe
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright Vincent Petry <>
# 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

Name:           kobo-deluxe
BuildRequires:  Mesa-devel
BuildRequires:  SDL-devel
BuildRequires:  SDL_image-devel
BuildRequires:  gcc-c++
Summary:        3rd person scrolling 2D shooter
License:        GPL-2.0 and LGPL-2.1
Group:          Amusements/Games/Action/Arcade
Version:        0.5.1
Release:        0
Source1:        %{name}.desktop
Source2:        %{name}.png
# PATCH-FIX-UPSTREAM kobo-deluxe-compile-errors-fix.patch
Patch0:         %{name}-compile-errors-fix.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%if 0%{?suse_version} > 1320
Requires(post): user(games)

Kobo Deluxe is an enhanced version of Akira Higuchi's game XKobo for Un*x systems with X11. Kobo Deluxe adds sound, smoother animation, high resolution support, OpenGL acceleration (optional), an intuitive menu driven user interface, joystick support and other features. Recent versions also add a number of alternative skill levels with slightly modernized gameplay. Kobo Deluxe uses SDL for graphics, sound and input, which makes it possible to build and run the game on pretty much anything.

%setup -q -n KoboDeluxe-%{version}
%patch0 -p1

%configure --sharedstatedir="%{_localstatedir}/games"
make %{?_smp_mflags}

make DESTDIR="%{buildroot}" install

# NOTE: the Makefile will install a file called kobosfx.h in the sfx subdir,
# this is required by the game to be loaded at run time.

install -m 0755 -D -d %{buildroot}/%{_datadir}/applications/
install -m 0644 -D %{S:1} %{buildroot}/%{_datadir}/applications/
install -m 0755 -D -d %{buildroot}/%{_datadir}/pixmaps/
install -m 0644 -D %{S:2} %{buildroot}/%{_datadir}/pixmaps/

%if 0%{?suse_version}
%suse_update_desktop_file %{name}

%dir %{_datadir}/%{name}/
%attr(0775,games,users) %dir %{_localstatedir}/games/%{name}/
%attr(0775,games,users) %{_localstatedir}/games/%{name}/scores