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 http://bugs.opensuse.org/
#


Name:           xlogical
Version:        1.0.8
Release:        0
Summary:        Puzzle Game
License:        GPL-2.0+
Group:          Amusements/Games/Logic
Url:            http://changeling.ixionstudios.com/xlogical/
Source:         http://changeling.ixionstudios.com/xlogical/downloads/xlogical-1.0-8.tar.bz2
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)
%endif

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

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

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

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

%files
%doc AUTHORS COPYING ChangeLog README TODO NEWS LICENSE
%{_bindir}/%{name}
%{_datadir}/%{name}/
%dir %{_localstatedir}/games/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%config(noreplace) %attr(664,games,games) %{_localstatedir}/games/%{name}/xlogical.scores

%changelog