Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > 2fcbdaecf600f1f8eba14651f376c22e > files > 7

alienarena-7.51-2.fc13.src.rpm

Name:		alienarena
Summary: 	Multiplayer retro sci-fi deathmatch game
Version:	7.51
Release:	2%{?dist}
License:	GPLv2+
Group:		Amusements/Games
# Subversion:  https://svn.icculus.org/alienarena/trunk/?sortby=date
# Upstream seems too inept to provide a simple source only tarball, so we use svn.
#   svn export svn://svn.icculus.org/alienarena/tags/7.51/ alienarena-7.51/
# These windows files are useless to us.
#   rm -rf alienarena-7.51/*.exe alienarena-7.51/*.dll alienarena-7.51/Tools/aaradiant.exe 
# These bundled zips are also pretty useless.
#   rm -rf alienarena-7.51/lib_zipfiles/
# We don't want the bundled ode code.
#   rm -rf alienarena-7.51/source/unix/ode/
# arena/ botinfo/ data1/ live in the alienarena-data package
#   mkdir alienarena-data-20101216
#   mv alienarena-7.51/arena/ alienarena-7.51/botinfo/ alienarena-7.51/data1/ alienarena-data-20110323/
#   rm -f alienarena-data-20110323/{arena,data1}/game.so
# This data tarball is used for the alienarena-data package
#   tar -cvJf alienarena-data-20110323.tar.xz alienarena-data-20110323
# This source tarball is used for the alienarena package
#   tar -cvjf alienarena-7.51.tar.bz2 alienarena-7.51
Source0:	alienarena-%{version}.tar.bz2
Source1:	alienarena.desktop
Source2:	GPL.acebot.txt
Patch3:		alienarena-7.45-no-qglBlitFramebufferEXT.patch
Patch4:		alienarena-7.51-nodata.patch
Patch5:		alienarena-7.51-system-ode-double.patch
URL:		http://red.planetarena.org/
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:	libX11-devel, libXext-devel, libXxf86vm-devel, libjpeg-devel
BuildRequires:	mesa-libGL-devel, mesa-libGLU-devel, curl-devel, libpng-devel
BuildRequires:	libvorbis-devel, openal-soft-devel, ode-devel, freetype-devel
BuildRequires:	desktop-file-utils
Requires:	alienarena-data = 20110323
Requires:	desktop-file-utils >= 0.9, opengl-games-utils
Requires:	openal-soft%{?_isa}

%description
Alien Arena 2011 is an online deathmatch game with over 30 levels, seven modes 
of play, loads of mutators, built-in bots, multiple player characters and weapons
(with alt-fire modes).


%package server
Group:      Amusements/Games
Summary:    Dedicated server for alienarena, the FPS game
Requires:   alienarena-data = 20110323


%description server
Alien Arena 2011 is an online deathmatch game with over 30 levels, seven modes
of play, loads of mutators, built-in bots, multiple player characters and weapons
(with alt-fire modes).

This is the dedicated server.


%prep
%setup -q

%patch3 -p1 -b .no-qglBlitFramebufferEXT
%patch4 -p1 -b .nodata
%patch5 -p1 -b .ode-double

# Copy license clarification for acebot
cp -p %{SOURCE2} .

# clean up prebuilt binary files
[[ -e crx ]] && rm crded crx crx.sdl {arena,data1}/game.so

# clean up end-line encoding
[[ -e docs/README.txt ]] && %{__sed} -i 's/\r//' docs/README.txt

# So, AlienArena now "uses" openal by dlopening the library, which is hardcoded to 
# "libopenal.so". That file only lives in openal-devel, so we need to adjust the hardcoding.
LIBOPENAL=`ls %{_libdir}/libopenal.so.? | cut -d "/" -f 4`
sed -i "s|\"libopenal.so\"|\"$LIBOPENAL\"|g" source/unix/qal_unix.c

%build
export PTHREAD_LIBS="-lpthread"
export PTHREAD_CFLAGS="-pthread" 
%configure --with-system-libode --without-xf86dga
make %{?_smp_mflags}

# make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" PREFIX="%{_prefix}" \
# 	WITH_DATADIR=yes WITH_LIBDIR=yes WITH_CURRENTDIR=no  \
#	DATADIR=%{_datadir}/%{name} LIBDIR="%{_libdir}/%{name}" OPTIMIZED_CFLAGS=no


%install
make DESTDIR=%{buildroot} install

%{__mkdir_p} %{buildroot}%{_datadir}/applications
desktop-file-install --vendor "fedora"			\
	--dir %{buildroot}%{_datadir}/applications	\
	%{SOURCE1}

mkdir -p %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/
mv %{buildroot}%{_datadir}/icons/%{name}.png %{buildroot}/%{_datadir}/icons/hicolor/32x32/apps/%{name}.png

# Fedora's little opengl checker
ln -s opengl-game-wrapper.sh %{buildroot}/%{_bindir}/%{name}-wrapper
ln -s crx %{buildroot}/%{_bindir}/%{name}
ln -s crx-ded %{buildroot}/%{_bindir}/%{name}-server


%post
update-desktop-database %{_datadir}/applications 2>/dev/null || :
gtk-update-icon-cache -qf %{_datadir}/icons/hicolor 2>/dev/null || :

%postun
update-desktop-database %{_datadir}/applications 2>/dev/null || :
gtk-update-icon-cache -qf %{_datadir}/icons/hicolor 2>/dev/null || :


%files
%defattr(-,root,root,-)
%doc GPL.acebot.txt
%{_bindir}/crx
%{_bindir}/%{name}
%{_bindir}/%{name}-wrapper
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%{_defaultdocdir}/%{name}/

%files server
%defattr(-,root,root,-)
%{_bindir}/crx-ded
%{_bindir}/%{name}-server
%{_defaultdocdir}/%{name}/

%changelog
* Thu Mar 24 2011 Tom Callaway <spot@fedoraproject.org> - 7.51-2
- use system ode-double
- disable xf86dga to add mouse sanity

* Wed Mar 23 2011 Tom Callaway <spot@fedoraproject.org> - 7.51-1
- update to 7.51

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.50-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Dec 16 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 7.50-1
- update to 7.50
- fix ode NAN issue

* Mon Aug  2 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 7.45-1
- update to 7.45

* Thu Jul 15 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 7.40-2
- add hard dependency on openal-soft (bz 597684)

* Thu Jul 15 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 7.40-1
- update to 7.40

* Tue Apr  6 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 7.33-2
- fix security issues identified in bz 577810
 - By supplying various invalid parameters to the download command,
   it is possible to cause a DoS condition by causing the server to
   crash. A path ending in . or / will crash on Linux. Supplying
   a negative offset will cause a crash on all platforms.
 - Fix buffer overflow identified in R1Q2 client code

* Fri Jan 15 2010 Tom "spot" Callaway <tcallawa@redhat.com> - 7.33-1
- update to 7.33

* Sat Nov  7 2009 Hans de Goede <hdgoede@redhat.com> - 7.32-2
- dlopen openal.so.x, not openal.so.x.y. this fixes a crash on startup when
  the openal minor version has changed
- fix deprecation warning with latest libXxf86dga-devel

* Mon Nov  2 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 7.32-1
- update to 7.32
- fix CVE-2009-3637 (bugzilla 530514)

* Wed Aug 12 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 7.30-2
- fix dlopen code to find proper openal library
- use openal-soft instead of old openal

* Thu Jul 30 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 7.30-1
- update to 7.30

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.21-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.21-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Fri Jan 30 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 7.21-1
- update to 7.21
- apply Paul's patch to print the search paths

* Wed Oct 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 7.20-5
- use /bin/bash for the scripts due to the export LD_LIBRARY_PATH

* Sun Oct 26 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 7.20-4
- re-enable "don't search data path" patch

* Sun Oct 26 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 7.20-3
- use LD_LIBRARY_PATH in scripts

* Sat Oct 25 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 7.20-2 
- drop old "don't search data path" patch
- call alienarena-wrapper in .desktop file

* Mon Oct 20 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 7.20-1
- sync up with Paul Bredbury's spec file
- update to 7.20

* Fri Sep 26 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 7.10-2
- drop fhs patch, use Makefile DATADIR options instead

* Wed Jul  2 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 7.10-1
- update to 7.10 (2008)

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 6.10-6
- Autorebuild for GCC 4.3

* Wed Nov 28 2007 Tom "spot" Callaway <tcallawa@redhat.com> 6.10-5
- generic optflags only

* Tue Nov 27 2007 Tom "spot" Callaway <tcallawa@redhat.com> 6.10-4
- lots of cleanups from review

* Fri Nov 16 2007 Tom "spot" Callaway <tcallawa@redhat.com> 6.10-3
- include legal clarification text for ace bot code
- simplify description

* Thu Nov 8 2007 Tom "spot" Callaway <tcallawa@redhat.com> 6.10-2
- make shell script launcher to get game working
  (run alienarena, not crx.sdl directly)

* Thu Nov 1 2007 Tom "spot" Callaway <tcallawa@redhat.com> 6.10-1
- Initial package for Fedora