File pingus.spec of Package pingus
#
# spec file for package pingus (Version 0.7.3)
#
# Copyright (c) 2010 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/
#
# norootforbuild
Name: pingus
BuildRequires: coreutils gcc-c++ scons update-desktop-files
BuildRequires: SDL_image-devel SDL_mixer-devel boost-devel libpng-devel
BuildRequires: bluez-devel libcwiid-devel
License: GPLv2+
Group: Amusements/Games/Action/Arcade
Url: http://pingus.seul.org/
AutoReqProv: on
Version: 0.7.3
Release: 1
Summary: A Lemmings Clone
Source: http://pingus.seul.org/files/pingus-%{version}.tar.bz2
Source2: %{name}.desktop
Source3: %{name}.png
Patch1: pingus-cwiid_with_bluez.patch
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
%build
CFLAGS="${RPM_OPT_FLAGS/-D_FORTIFY_SOURCE=2/-D_FORTIFY_SOURCE=1}"
CFLAGS="${CFLAGS/-O2/-O}"
sed -i "s/-O2 -Wall/$CFLAGS/" src/Makefile.static
scons configure CCFLAGS="$CFLAGS" with_wiimote=True with_linuxusbmouse=True with_linuxevdev=True with_xinput=True
scons -j4
%install
./install.sh $RPM_BUILD_ROOT%{_prefix}
chmod -x $RPM_BUILD_ROOT%{_datadir}/pingus/data/gen-scrfile.scm
mv $RPM_BUILD_ROOT%{_prefix}/{bin,games}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps/
install -m 644 $RPM_SOURCE_DIR/%{name}.png $RPM_BUILD_ROOT%{_datadir}/pixmaps
install -m 644 -D doc/pingus.6 $RPM_BUILD_ROOT%{_mandir}/man6/pingus.6
%suse_update_desktop_file -i %{name} Game ArcadeGame
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%files
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS README TODO
%doc %{_mandir}/man6/pingus.6.gz
%{_prefix}/games/pingus
%{_datadir}/pingus
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%changelog