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 http://bugs.opensuse.org/
#


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

Name:           pingus
Version:        0.7.6
Release:        0
Summary:        A Lemmings Clone
License:        GPL-3.0+
Group:          Amusements/Games/Action/Arcade
Url:            http://pingus.seul.org/
Source:         http://pingus.googlecode.com/files/pingus-%{version}.tar.bz2
Source2:        %{name}.desktop
Source3:        %{name}.png
# PATCH-FEATURE-OPENSUSE pingus-cwiid_with_bluez.patch pascal.bleser@opensuse.org -- 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 dbuck@novell.com -- allow wii support to compile
Patch3:         remove-debug_fix-includes.patch
# PATCH-FIX-OPENSUSE makefile-fixes.patch dbuck@novell.com -- use /usr for prefix
Patch4:         makefile-fixes.patch
# PATCH-FIX-UPSTREAM pingus-gcc47.patch dimstar@opensuse.org -- 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

%description
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.)

%prep
%setup -q
%patch1
%patch2
%patch3
%patch4
%patch5 -p1

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

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

%files
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS README TODO
%doc %{_mandir}/man1/pingus.6.gz
%{_bindir}/pingus
%{_bindir}/pingus.bin
%{_datadir}/pingus
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png

%changelog
openSUSE Build Service is sponsored by