File neverball.spec of Package neverball

#
# spec file for package neverball (Version 1.4.0)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           neverball
BuildRequires:  Mesa-devel SDL_image-devel SDL_mixer-devel SDL_ttf-devel update-desktop-files
Summary:        Deftly Guide a Rolling Ball through Many Slick 3D Levels
Version:        1.4.0
Release:        94
Source0:        neverball-%{version}.tar.gz
Source1:        %name.desktop
%define	       name2 neverputt
Source2:        %name2.desktop
Patch0:         neverball-1.3.7-config.diff
Patch1:         neverball-%{version}-data.diff
Patch2:         neverball-game-data.patch
Patch3:         neverball-1.4.0-subscript-out-of-range.patch
Group:          Amusements/Games/3D/Other
License:        GPL v2 or later
URL:            http://icculus.org/neverball/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define binary	/usr/games/%name
%define binary2	/usr/games/%name2
%define datadir	/usr/share/games/%name

%description
Guide a rolling ball through dangerous territory that you control by
tilting the floor. Balance on narrow bridges, navigate mazes, ride
moving platforms, and dodge pushers and shovers to get to the goal.
Race against the clock to collect coins to earn extra balls. With nice
physics and very clean and appealing 3D graphics, this is definitely a
must play.



Authors:
--------
    Robert Kooima

%prep
%setup -n %name-%{version}
%patch0 -p1
%patch1 -p1
%patch2
%patch3

%build
make CC="gcc %optflags -fexpensive-optimizations -fomit-frame-pointer"

%install
rm -rf %buildroot
install -D -m 755 %name	 %buildroot/%{binary}
install -D -m 755 %name2 %buildroot/%{binary2}
install -d -m 755 	 %buildroot/%{datadir}
rm data/*/*.map
cp -rp data/.				  %buildroot/%{datadir}
chmod -x %buildroot/%{datadir}/back/*.png
chmod -x %buildroot/%{datadir}/shot-putt/*.jpg
chmod -x %buildroot/%{datadir}/*.txt
mkdir -p %buildroot/usr/share/pixmaps
cp icon/*.png                             %buildroot/usr/share/pixmaps
%suse_update_desktop_file -i %name Game X-SuSE-ActionGame
%suse_update_desktop_file -i %name2 Game X-SuSE-ActionGame

%files
%attr(-,root,root) %doc CHANGES COPYING README 
%defattr(-,games,games)
%{binary}
%{binary2}
%{datadir}
/usr/share/applications/%name.desktop
/usr/share/applications/%name2.desktop
/usr/share/pixmaps/*.png

%clean
rm -rf $RPM_BUILD_ROOT

%changelog
* Tue Jul 10 2007 - gekker@suse.de
- Fix build
* Fri Feb 09 2007 - ro@suse.de
- fix build as non-root
* Mon Nov 06 2006 - gekker@suse.de
- Remove executable permission from files in %%{datadir}
* Wed Jul 19 2006 - gekker@suse.de
- Fix array subscript out of range warning in mapc.c (#185608)
* Fri Mar 10 2006 - bk@suse.de
- re-enabled screen resolution 1280x800
- update BuildRequires: Mesa-devel w/o xorg-x11 and freetype-devel
* Fri Jan 27 2006 - nadvornik@suse.cz
- fixed BuildRequires
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Aug 29 2005 - gekker@suse.de
- Fix camera configuration as requested by author (64291)
- Install icons for neverball, neverputt (113653, 113654)
* Mon Sep 20 2004 - bk@suse.de
- add binary of neverputt (game data is shared with neverball)
* Thu Sep 16 2004 - sndirsch@suse.de
- updated to release 1.4.0; changes since 1.3.7
  New in 1.4.0:
  * Fixed font renderer to never exceed maximum texture size.
  New in 1.3.11:
  * Fixed broken Unix build.
  * Added OSX SDL mouse invert workaround.
  * A few texture tweaks.
  * Fixed broken Ball HUD.
  New in 1.3.10:
  * Tweaks to pars.
  * Added wireframe view to Putt.
  * Fixed view toward hole when the hole is directly above or below the ball.
  New in 1.3.9:
  * Made a few minor fixes to paxed's holes.
  * Added score and par to HUD.
  * Show score card only after a hole is finished.
  * Added timeouts to all in-game states except Next Player.
  * Fixed texture ID leak in conf state.
  New in 1.3.8:
  * Modified joystick traversal of GUIs to wrap top/bottom and left/right.
  * Converted Putt to use Ball's GUI API.
  * Merged Putt's and Ball's audio managers into shared.
  * Added "Paused" screen to Putt.
  * Generalized Putt's scoring to allow courses of length other than 18.
  * Enabled switches in Putt.
  * Added paxed's Putt courses.
  * Changed a few textures on paxed's courses.
  * Capped per-hole scores at 12.
  * Modified several Putt backgrounds.
  * Applied a change to Mehdi 25.
  * Added poser mode to Putt.
  * "Fixed" mouse jump on pointer grab.  SDL is unpredictable here.
  * By popular demand, set initial ball view toward hole.
* Wed Aug 25 2004 - bk@suse.de
- updated to release 1.3.7 with default camera setting of 1.2.6
- make some of the levels of the easy series more playable
* Fri Feb 06 2004 - sndirsch@suse.de
- updated to release 1.1.0
* Sat Aug 30 2003 - sndirsch@suse.de
- fixed game category
* Tue Aug 12 2003 - sndirsch@suse.de
- added desktop file
* Thu Aug 07 2003 - bk@suse.de
- neverball - deftly guide a ball through many slick 3D levels!
openSUSE Build Service is sponsored by