File chapping.spec of Package chapping
#
# spec file for package chapping
#
# 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: chapping
Version: 0.43
Release: 0
Summary: Pro Evolution Chapping: button football game
License: GPL-3.0
Group: Amusements/Games/Board/Other
Url: http://%{name}.wordpress.com/
Source: http://forja.rediris.es/frs/download.php/760//%{name}-%{version}-src.tar.bz2
Patch0: %{name}-%{version}-dirs.patch
Patch1: %{name}-%{version}-Makefile.patch
Patch2: %{name}-%{version}-gcc43.patch
# PATCH-FIX-UPSTREAM chapping-0.43-gcc47.patch
Patch3: %{name}-%{version}-gcc47.patch
BuildRequires: SDL-devel
BuildRequires: SDL_gfx-devel
BuildRequires: SDL_image-devel
BuildRequires: SDL_ttf-devel
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: update-desktop-files
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Pro Evolution Chapping is a turn based button football game.
%prep
%setup -q -n %{name}-%{version}-source
%patch -P 0
%patch -P 1
%patch -P 2
%patch -P 3 -p1
%build
CXXFLAGS='%{optflags} -DDATADIR=\"%{_datadir}/%{name}\"' \
make linux %{?_smp_mflags}
%install
install -p -D -m 0755 '%{name}' '%{buildroot}%{_bindir}/%{name}'
find ! -type d \( -wholename './themes/*' -o -wholename './menuimg/*' \) -exec install -D -p -m 0644 '{}' '%{buildroot}%{_datadir}/%{name}/{}' \;
%suse_update_desktop_file -c %{name} 'Pro Evolution Chapping' 'Pro Evolution Chapping' %{name} %{name} 'Game;SportsGame;'
%fdupes -s '%{buildroot}%{_datadir}/%{name}/themes'
%files
%defattr(-, root, root, 0755)
%license LICENSE
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%changelog