File rocksndiamonds.spec of Package rocksndiamonds
#
# spec file for package rocksndiamonds
#
# 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: rocksndiamonds
Version: 3.3.0.1
Release: 0
Summary: Arcade style game with stereo sounds
License: GPL-2.0+
Group: Amusements/Games/Action/Arcade
Url: http://www.artsoft.org/rocksndiamonds/
# Downloaded from http://www.artsoft.org/RELEASES/unix/rocksndiamonds/rocksndiamonds-3.3.0.1.tar.gz
# Deleted already compiled binary: rm rocksndiamonds
# Repacked as tar.bz2
Source: %{name}-%{version}.tar.bz2
Source2: %{name}.png
Source3: %{name}.desktop
Source4: Contributions-1.2.0.tar.bz2
# PATCH-FIX-UPSTREAM rocksndiamonds-3.3.0.1-smpeg.patch
Patch0: %{name}-%{version}-smpeg.patch
# PATCH-FIX-UPSTREAM rocksndiamonds-CVE-2011-4606.patch
Patch1: %{name}-CVE-2011-4606.patch
BuildRequires: SDL_image-devel
BuildRequires: SDL_mixer-devel
BuildRequires: SDL_net-devel
%if 0%{?suse_version} > 1030
BuildRequires: fdupes
%endif
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
A game like "Boulderdash" (C 64) or "Emerald Mine" (Amiga). Included
are many levels known from the games "Boulderdash", "Emerald Mine",
"Sokoban", "Supaplex" and "DX-Boulderdash", level elements for "Diamond
Caves II" style games and a lot of new levels designed by other
players.
Some features:
- joystick support for Linux, FreeBSD and DOS/Windows
- local multiplayer support for all supported platforms
- network multiplayer support for Unix platform
- soft scrolling with 50 frames/s
- stereo sound effects and music
- music module support for SDL version (Unix/Win32)
- fullscreen support for SDL version (Unix/Win32)
- lots of additional levels available (over 10.000)
%prep
%setup -q
if [ ! -f /usr/%{_lib}/libsmpeg.a ] ; then
%patch0 -p1
fi
%patch1 -p1
cp %{SOURCE2} %{SOURCE3} .
pushd levels
tar -xjf %{SOURCE4}
popd
%build
make %{?_smp_mflags} sdl \
OPTIONS="%{optflags}" \
XLIB_PATH=/usr/X11R6/%{_lib} \
RO_GAME_DIR=%{_datadir}/%{name} \
RW_GAME_DIR=%{_localstatedir}/games/%{name}
%install
install -m 755 -d %{buildroot}%{_datadir}/%{name}
install -m 755 -d %{buildroot}%{_localstatedir}/games/%{name}
install -m 755 -d %{buildroot}%{_bindir}/
install -m 755 -d %{buildroot}%{_mandir}/man6
install -m 755 -d %{buildroot}%{_datadir}/pixmaps
cp -a graphics %{buildroot}%{_datadir}/%{name}
cp -a sounds %{buildroot}%{_datadir}/%{name}
cp -a music %{buildroot}%{_datadir}/%{name}
cp -a levels %{buildroot}%{_datadir}/%{name}
find %{buildroot}%{_datadir}/%{name}/levels -name '*.orig' -delete
find %{buildroot}%{_datadir}/%{name} -type f -exec chmod 644 "{}" "+"
find %{buildroot}%{_datadir}/%{name} -type d -exec chmod 755 "{}" "+"
install -m 755 %{name} %{buildroot}%{_bindir}
install -m 644 %{name}.1 %{buildroot}%{_mandir}/man6/%{name}.6
install -m 644 %{name}.png %{buildroot}%{_datadir}/pixmaps
%if 0%{?suse_version}
%suse_update_desktop_file -i %{name} Game ArcadeGame
%endif
%if 0%{?suse_version} > 1030
%fdupes %{buildroot}
%endif
%files
%defattr(-,root,root,-)
%doc ChangeLog COPYING CREDITS README
%doc %{_mandir}/man6/*
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_bindir}/%{name}
%attr(775,games,games) %{_localstatedir}/games/%{name}
%changelog