File xlogical.spec of Package xlogical

# spec file for package xlogical
# Copyright (c) 2017 SUSE LINUX 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

Name:           xlogical
Version:        1.0.8
Release:        0
Summary:        Puzzle Game
License:        GPL-2.0+
Group:          Amusements/Games/Logic
Source1:        %{name}_gfx.tar.bz2
Source2:        %{name}.desktop
Source3:        %{name}.png
# PATCH-FIX-UPSTREAM xlogical-destdir.patch
Patch0:         %{name}-%{version}-destdir.patch
# PATCH-FIX-UPSTREAM xlogical-gcc43.patch
Patch1:         %{name}-%{version}-gcc43.patch
BuildRequires:  SDL_image-devel
BuildRequires:  SDL_mixer-devel
BuildRequires:  automake
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  update-desktop-files
%if 0%{?suse_version} >= 1330
Requires(pre):  group(games)
Requires(pre):  user(games)

XLogical is a puzzle game based on an Amiga game developed by Rainbow
Arts called Logical.

%setup -q -n %{name}-1.0-8
cd images
tar -xjf %{SOURCE1}

autoreconf -f -i
%configure --localstatedir=%{_localstatedir}/games
make %{?_smp_mflags}

install -D -m 0644 %{SOURCE3} %{buildroot}%{_datadir}/pixmaps/xlogical.png
%suse_update_desktop_file -i %{name} Game ArcadeGame
%fdupes %{buildroot}

%dir %{_localstatedir}/games/%{name}
%config(noreplace) %attr(664,games,games) %{_localstatedir}/games/%{name}/xlogical.scores