File openarena.spec of Package openarena
#
# spec file for package Open Arena
#
# Copyright (c) 2006 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/
#
# norootforbuild
Name: openarena
License: GNU General Public License (GPL) - all versions
Group: Amusements/Games/Action/Shoot
Autoreqprov: on
Version: 0.8.8
Release: 1
Summary: Open Arena game engine
URL: http://openarena.ws/
Source0: openarena-0.8.8.zip
Source1: %{name}.desktop
Source2: %{name}.svg
Source3: demo0000.dm_71
Source4: openarena
Source5: openarena-64
BuildRequires: unzip
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Obsoletes: openarena < %{version} openarena-data
%define gamelibdir %{_libdir}/games/%{name}
%description
OpenArena is an open-source content package for Quake III Arena
licensed under the GPL, effectively creating a free stand-alone game.
Authors:
--------
Aardappel - Maps (Converted with permission)
leileilol - Leads, gfx, models, anim, sound and textures
Multiplex - Models, textures
crayon - Skins, models
JK Makowka - Models, skins
Democritus - Textures
jzero - Models, textures, 2D
Mancubus - The Announcer
mewse - Engine compiling, tools, textures and testing
div0 - Engine compiling, fixing
dmn_clown - Botfiles code
MilesTeg - 2D art and textures
evillair - Textures (nicked from Nexuiz)
Shadowdragon - Models
mightypea - Models
Morphed - Skins
toddd - Sound
DarkThief - Skins
slyus - Skins
SavageX - Maps
Kaz - Skins
pixie - Voices (Kyonshi, Major)
Vondur - Map (kaos)
Tyrann - Map (Aggressor)
Ed - Map (Conversion of ce1m7)
%prep
%setup -n openarena-0.8.8
%install
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
mkdir -p $RPM_BUILD_ROOT/%{gamelibdir}
mkdir -p $RPM_BUILD_ROOT/%{gamelibdir}/baseoa/
mkdir -p $RPM_BUILD_ROOT/%{gamelibdir}/baseoa/demos
install -m 644 ./baseoa/* $RPM_BUILD_ROOT/%{gamelibdir}/baseoa/
install -m 644 %{S:3} $RPM_BUILD_ROOT/%{gamelibdir}/baseoa/demos
%ifarch = %ix86
install -m 755 ./openarena.i386 $RPM_BUILD_ROOT/%{gamelibdir}
install -m 755 %{S:4} $RPM_BUILD_ROOT%{_bindir}/%{name}
%else
%ifarch = x86_64
install -m 755 ./openarena.x86_64 $RPM_BUILD_ROOT/%{gamelibdir}
install -m 755 %{S:5} $RPM_BUILD_ROOT%{_bindir}/%{name}
%else
exit 1
%endif
%endif
# Icon, it is simple official icon
install -D -m 644 %{S:2} $RPM_BUILD_ROOT/%{_datadir}/pixmaps/%{name}.svg
# Desktop entry
install -D -m 644 %{S:1} $RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop
# Magic and unnecessary lines but without them build is not successful
#%if 0%{?suse_version}
#%suse_update_desktop_file %{name}
#%endif
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr (-, games, games)
%dir %{_libdir}/games
%dir %{gamelibdir}
%attr (0775, root, root) %{gamelibdir}/openarena.*
%{gamelibdir}/*
%{_bindir}/openarena*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.svg
%changelog