File overgod.spec of Package overgod

#
# spec file for package overgod
#
# Copyright (c) 2015 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:           overgod
Version:        1.0
Release:        0
Summary:        Another Asteroid like game
License:        GPL-2.0+
Group:          Amusements/Games/Action/Arcade
Url:            http://www.allegro.cc/depot/Overgod
Source0:        http://downloads.sourceforge.net/overgod/overgod.tar.gz
Source1:        overgod.desktop
Source2:        overgod.png
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch0:         overgod-1.0.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch1:         overgod-libs.patch
# PATCH-FIX-UPSTREAM overgod-gcc5.patch -- Fix build with gcc >= 5.0
Patch2:         overgod-gcc5.patch
BuildRequires:  allegro-devel
BuildRequires:  fdupes
BuildRequires:  update-desktop-files
Requires:       hicolor-icon-theme
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
For too long has humanity been ruled by cruel and disputatious gods!
Fly through the various layers of the Celestial Oversphere to unseat
those who control the universe.

In Overgod you control a little vehicle in the middle of the screen and fly
around and shoot things - a bit like asteroids, but the asteroids move
independently and shoot back. You can also upgrade your vehicle in various
ways.

%prep
%setup -q
%patch -P 0 -p1 -z .unix
%patch -P 1
%if 0%{?suse_version} > 1320
#need to convert to unix file ending for patching
sed -i "s/\r//" stuff.c
%patch -P 2 -p1
%endif
sed -i 's/\r//' readme.txt licence.txt

%build
make %{?_smp_mflags} CFLAGS="%{optflags}" PREFIX=%{_prefix}

%install
make install PREFIX=%{buildroot}%{_prefix}
# below is the desktop file and icon stuff.
%suse_update_desktop_file -i %{name} Game ArcadeGame
%fdupes %{buildroot}%{_datadir}/%{name}

%files
%defattr(-,root,root,-)
%doc readme.txt licence.txt
%{_bindir}/overgod
%{_datadir}/overgod
%{_datadir}/applications/overgod.desktop
%{_datadir}/pixmaps/overgod.png

%changelog
openSUSE Build Service is sponsored by