File neverball.spec of Package neverball

#
# spec file for package neverball
#
# Copyright (c) 2011 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:           neverball
Version:        1.5.4
Release:        9
License:        GPLv2+
Summary:        Deftly Guide a Rolling Ball through Many Slick 3D Levels
Url:            http://neverball.org
Group:          Amusements/Games/3D/Other
Source0:        neverball-%{version}.tar.bz2
Source1:        %{name}.desktop
%define	        name2 neverputt
Source2:        %{name2}.desktop
BuildRequires:  libSDL_ttf-devel
BuildRequires:  libSDL-devel
BuildRequires:  libpng-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libvorbis-devel
BuildRequires:  update-desktop-files
BuildRequires:  physfs-devel
BuildRequires:  fdupes
BuildRequires:  xorg-x11-libX11-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Patch:          neverball-add-needed.patch 
%define binary	%{_prefix}/games/%{name}
%define binary2	%{_prefix}/games/%{name2}
%define datadir	%{_datadir}/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.

%prep
%setup -q
%patch

%build
make CC="gcc %{optflags} -fomit-frame-pointer" DATADIR=%{datadir}

%install
install -D -m 755 %name	 %{buildroot}%{binary}
install -D -m 755 %name2 %{buildroot}%{binary2}
install -d -m 755 	 %{buildroot}%{datadir}
rm data/*/*.map
find data -name '*.sol' -exec chmod 644 '{}' \;
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}%{_datadir}/pixmaps
cp dist/neverball_64.png %{buildroot}%{_datadir}/pixmaps/neverball.png
cp dist/neverputt_64.png %{buildroot}%{_datadir}/pixmaps/neverputt.png
%suse_update_desktop_file -i -G %{name} %name Game X-SuSE-ActionGame
%suse_update_desktop_file -i -G %{name2} %name2 Game X-SuSE-ActionGame
%fdupes %{buildroot}%{datadir}

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

%clean
rm -rf %{buildroot}

%changelog
openSUSE Build Service is sponsored by