File sopwith.spec of Package sopwith
#
# spec file for package sopwith
#
# Copyright (c) 2012 SUSE LINUX Products 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: sopwith
Version: 1.7.1
Release: 0
Summary: SDL port of the sopwith game
License: GPL-2.0+
Group: Amusements/Games/Action/Arcade
Url: http://sdl-sopwith.sourceforge.net/
Source0: http://downloads.sourceforge.net/sdl-sopwith/sdl_sopwith-%{version}.tar.gz
#Source0: http://downloads.sourceforge.net/project/sdl-sopwith/sdl_sopwith/%{version}/sopwith-%{version}.tar.gz
Source1: sopwith.png
Patch0: sopwith-gcc4.patch
Patch1: sopwith.6.patch
Patch2: sopwith-gtk-video.patch
Patch3: sopwith-sdl-video.patch
Patch4: sopwith-vid_vga.patch
Patch5: sopwith-gpl.diff
BuildRequires: SDL-devel
BuildRequires: SDL_gfx-devel
BuildRequires: desktop-file-utils
BuildRequires: gtk2-devel
%description
This is a port of the classic computer game "Sopwith" to run on modern
computers and operating systems.
%prep
%setup -q -n sdl_sopwith-%{version}
rm -f src/font.h
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
sed -i 's/\r//' doc/readme.txt
%build
%configure
make %{?_smp_mflags}
%install
make DESTDIR=$RPM_BUILD_ROOT install
rm -rf $RPM_BUILD_ROOT%{_prefix}/share/doc/sopwith
cat > %{name}.desktop <<EOF
[Desktop Entry]
Name=Sopwith
Type=Application
Comment=The classic sopwith game
Exec=gtksopwith
Terminal=false
Icon=sopwith
EOF
desktop-file-install --delete-original \
--dir %{buildroot}%{_datadir}/applications \
--add-category ArcadeGame \
--add-category Game \
%{name}.desktop
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
cp %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/pixmaps
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING FAQ NEWS README TODO doc/keys.txt doc/origdoc.txt doc/readme.txt
%{_bindir}/sopwith
%{_bindir}/gtksopwith
%{_mandir}/man6/sopwith*
%{_datadir}/applications/*%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%changelog