LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File neverball.spec of Package neverball (Project games)

#
# spec file for package neverball
#
# Copyright (c) 2013 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:        0
Summary:        Deftly Guide a Rolling Ball through Many Slick 3D Levels
License:        GPL-2.0+
Group:          Amusements/Games/3D/Other
Url:            http://neverball.org
Source0:        neverball-%{version}.tar.bz2
Source1:        %{name}.desktop
%define	        name2 neverputt
Source2:        %{name2}.desktop
BuildRequires:  fdupes
BuildRequires:  libSDL-devel
BuildRequires:  libSDL_ttf-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  libvorbis-devel
BuildRequires:  physfs-devel
BuildRequires:  update-desktop-files
BuildRequires:  xorg-x11-libX11-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Patch:          neverball-add-needed.patch 
# following patch sent upstream: http://forum.nevercorner.net/viewtopic.php?id=2662
Patch1:         neverball-libpng16.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
%patch1 -p1

%build
make %{?_smp_mflags} CC="gcc %{optflags} -fomit-frame-pointer" DATADIR=%{datadir} LOCALEDIR=%{_datadir}/locale

%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}
cp -r locale %{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
%find_lang %{name}
%fdupes %{buildroot}%{datadir}

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

%changelog