File edgar.spec of Package edgar

#
# spec file for package edgar
#
# 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:           edgar
Version:        1.26
Release:        0
Summary:        2D platform game with a persistent world
License:        GPL-2.0+
Group:          Amusements/Games/Action/Arcade
Url:            http://www.parallelrealities.co.uk/p/legend-of-edgar.html
Source0:        https://github.com/riksweeney/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  update-desktop-files
BuildRequires:  zlib-devel
BuildRequires:  pkgconfig(SDL_image)
BuildRequires:  pkgconfig(SDL_mixer)
BuildRequires:  pkgconfig(SDL_ttf)
BuildRequires:  pkgconfig(sdl)

%description
The Legend of Edgar is a platform game, not unlike those found on the Amiga and
SNES. Edgar must battle his way across the world, solving puzzles and defeating
powerful enemies to achieve his quest.

A 2D platform game with a persistent world.
When Edgar's father fails to return home after venturing out one dark and stormy
night, Edgar fears the worst: he has been captured by the evil sorcerer who
lives in a fortress beyond the forbidden swamp.

Donning his armour, Edgar sets off to rescue him, but his quest will not be
easy...

%prep
%setup -q
mv makefile Makefile

# SED-FIX-OPENSUSE -- Fix paths
sed -i -e 's|$(PREFIX)/games/|$(PREFIX)/bin/|;
           s|/share/doc/|/share/doc/packages/|;
           s|/share/games/edgar/|/share/edgar/|' Makefile

%build
make %{?_smp_mflags} CC="cc %{optflags}"

%install
%make_install
%find_lang %name

%suse_update_desktop_file %{name}
%fdupes -s %{buildroot}%{_prefix}

%files -f %name.lang
%defattr(-,root,root,-)
%doc doc/*
%attr(-,root,games) %{_bindir}/%{name}
%{_mandir}/man6/%{name}.6%{ext_man}
%{_datadir}/appdata
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/
%attr(-,root,games) %{_datadir}/%{name}

%changelog
openSUSE Build Service is sponsored by