File pingus.spec of Package pingus

# spec file for package pingus
# 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

%if 0%{?suse_version} > 1210
%define with_wiimote False
%define with_wiimote True

Name:           pingus
Version:        0.7.6
Release:        0
Summary:        A Lemmings Clone
License:        GPL-3.0+
Group:          Amusements/Games/Action/Arcade
Source2:        %{name}.desktop
Source3:        %{name}.png
# PATCH-FEATURE-OPENSUSE pingus-cwiid_with_bluez.patch -- adds wii support
Patch1:         pingus-cwiid_with_bluez.patch
# PATCH-FIX-UPSTREAM dsolink.patch -- Fix linking against X11
Patch2:         dsolink.patch
# PATCH-FIX-UPSTREAM remove-debug_fix-includes.patch -- allow wii support to compile
Patch3:         remove-debug_fix-includes.patch
# PATCH-FIX-OPENSUSE makefile-fixes.patch -- use /usr for prefix
Patch4:         makefile-fixes.patch
# PATCH-FIX-UPSTREAM pingus-gcc47.patch -- Fix build with gcc 4.7
Patch5:         pingus-gcc47.patch
BuildRequires:  SDL_image-devel
BuildRequires:  SDL_mixer-devel
BuildRequires:  bluez-devel
BuildRequires:  boost-devel
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  libcwiid-devel
BuildRequires:  libpng-devel
BuildRequires:  scons
BuildRequires:  update-desktop-files
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Pingus is a free Lemmings-like game covered under the GNU GPL. It features
currently 22 playable levels and runs under a wide variety of operating systems
(Linux, Windows, etc.)

%setup -q
%patch5 -p1

mkdir -p build
scons %{?_smp_mflags} CCFLAGS="%{optflags}" with_wiimote=%{with_wiimote} with_linuxusbmouse=True with_linuxevdev=True with_xinput=True

mkdir -p %{buildroot}%{_datadir}/pixmaps/
install -m 644 %{SOURCE3} %{buildroot}%{_datadir}/pixmaps
%suse_update_desktop_file -i %{name} Game ArcadeGame
%fdupes -s %{buildroot}%{_datadir}

%doc %{_mandir}/man1/pingus.6.gz

openSUSE Build Service is sponsored by