%define name armagetron %define sourcename armagetronad %define version 0.2.7.1 %define release %mkrel 4 Summary: Armagetron Advanced, another 3d lightcycle game using OpenGL Name: %{name} Version: %{version} Release: %{release} License: GPL Group: Games/Arcade URL: http://armagetronad.net/ Source: http://prdownloads.sourceforge.net/armagetronad/%{sourcename}-%{version}.tar.bz2 Source1: %{name}-png.tar.bz2 #Patch0: armagetron-configure-fix.patch.bz2 #Patch2: armagetron-distrib.patch.bz2 #Patch3: armagetron-0.2.6.0-64bit-fixes.patch.bz2 #Patch4: %{name}-0.2.4-fixes.patch.bz2 #Patch5: armagetron-0.2.6.0-gcc3_4.patch.bz2 #Patch6: armagetron-0.2.6.0-lib64.patch.bz2 Patch10: armagetron-0.2.7.1-gcc4.patch.bz2 BuildRoot: %{_tmppath}/%{sourcename}-%{version}-buildroot BuildRequires: SDL_image-devel BuildRequires: XFree86-devel BuildRequires: alsa-lib-devel BuildRequires: esound-devel BuildRequires: libMesaGLU-devel BuildRequires: libpng-devel BuildRequires: autoconf2.1 #(peroyvind) dunno what this is nor why it's required, but we don't have it and it shouldn't be required %define _requires_exceptions BEGIN_RIM %description Another very nice and networked Tron game using OpenGL. Armagetron Advanced is the continuation of the original Armagetron game. %prep %setup -q -n %{sourcename}-%{version} %patch10 -p0 -b .gcc4 autoconf %build %configure2_5x %make "-I. -I.. -I../.. `sdl-config --cflags` $RPM_OPT_FLAGS" %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_gamesbindir} cat <<EOF >$RPM_BUILD_ROOT%{_gamesbindir}/%{name} #!/bin/sh -e REALTRON=%{_gamesbindir}/%{name}.real DATADIR=%{_gamesdatadir}/%{name} CONFDIR=%{_sysconfdir}/%{name} USERCONFDIR=\$HOME/.%{name} USERDATADIR=\$USERCONFDIR/data VARDIR=%{_localstatedir}/games/%{name} if [ ! -d \$USERCONFDIR ]; then # have to create configuration directory install -d \$USERCONFDIR fi if [ -f \$HOME/.%{name}rc ]; then # upgrade from before 0.2 mv -f \$HOME/.%{name}rc \$USERCONFDIR/user.cfg fi CMDLINE="--datadir \$DATADIR --configdir \$CONFDIR --userconfigdir \$USERCONFDIR --vardir \$VARDIR" if [ -d \$USERDATADIR ]; then CMDLINE="\$CMDLINE --userdatadir \$USERDATADIR" fi exec \$REALTRON \$CMDLINE "\$@" EOF install -m0755 src/tron/%{sourcename} $RPM_BUILD_ROOT%{_gamesbindir}/%{name}.real mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/games/%{name} mkdir -p $RPM_BUILD_ROOT%{_gamesdatadir}/%{name} cp -a arenas models sound textures language \ $RPM_BUILD_ROOT%{_gamesdatadir}/%{name} rm -f $RPM_BUILD_ROOT%{_gamesdatadir}/%{name}/language/.tag chmod -R a+r $RPM_BUILD_ROOT%{_gamesdatadir}/%{name} chmod a+r COPYING.txt README tar xjf %{SOURCE1} install -m0644 %{name}-16.png -D $RPM_BUILD_ROOT%{_miconsdir}/%{name}.png install -m0644 %{name}-32.png -D $RPM_BUILD_ROOT%{_iconsdir}/%{name}.png install -m0644 %{name}-48.png -D $RPM_BUILD_ROOT%{_liconsdir}/%{name}.png mkdir -p $RPM_BUILD_ROOT%{_menudir} cat <<EOF >$RPM_BUILD_ROOT%{_menudir}/%{name} ?package(%{name}):command="%{_gamesbindir}/%{name}" \ icon="%{name}.png" \ needs="x11" \ section="Amusement/Arcade" \ title="Armagetron Advanced" \ longtitle="Another 3d lightcycle game" EOF install -d %{buildroot}%{_datadir}/applications cat > %{buildroot}%{_datadir}/applications/mandriva-%{name}.desktop << EOF [Desktop Entry] Encoding=UTF-8 Name=Armagetron Advanced Comment=Another 3d lightcycle game Exec=soundwrapper %_gamesbindir/%{name} Icon=%{name} Terminal=false Type=Application Categories=Game;ArcadeGame;X-MandrivaLinux-MoreApplications-Games-Arcade; EOF install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name} cp -a config/* $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/ %clean rm -rf $RPM_BUILD_ROOT %post %{update_menus} %postun %{clean_menus} %files %defattr(-,root,root) %doc COPYING.txt README %attr(0755,root,games) %{_gamesbindir}/%{name} %attr(2755,root,games) %{_gamesbindir}/%{name}.real %{_gamesdatadir}/%{name} %dir %attr(0775,games,games) %{_localstatedir}/games/%{name} %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/* %{_miconsdir}/%{name}.png %{_iconsdir}/%{name}.png %{_liconsdir}/%{name}.png %{_menudir}/%{name} %{_datadir}/applications/mandriva-%{name}.desktop %changelog * Sat Dec 02 2006 Olivier Blin <oblin@mandriva.com> 0.2.7.1-4mdv2007.0 + Revision: 89973 - xdg menu - Import armagetron * Wed Aug 24 2005 Rafael Garcia-Suarez <rgarciasuarez@mandriva.com> 0.2.7.1-3mdk - Fix summary, menu name and URL * Sun Jul 31 2005 Guillaume Bedot <littletux@mandriva.org> 0.2.7.1-2mdk - rebuild - Patch10: allows to build with g++4 * Mon Apr 25 2005 Rafael Garcia-Suarez <rgarciasuarez@mandriva.com> 0.2.7.1-1mdk - 0.2.7.1 - Drop patches 3 to 6 * Tue Oct 26 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.2.6.0-4mdk - lib64 fixes - put back 64-bit fixes that got nuked away somehow since 9.2 * Fri Aug 20 2004 Laurent MONTEL <lmontel@mandrakesoft.com> 0.2.6.0-3mdk - Rebuild with new menu * Mon Jul 19 2004 Christiaan Welvaart <cjw@daneel.dyndns.org> 0.2.6.0-2mdk - rebuild with gcc 3.4 (patch5) * Fri Apr 23 2004 Michael Scherer <misc@mandrake.org> 0.2.6.0-1mdk - New release 0.2.6.0 * Mon Oct 13 2003 François Pons <fpons@mandrakesoft.com> 0.2.5.2-1mdk - 0.2.5.2. * Thu Sep 25 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.2.4-2mdk - even more 64-bit fixes * Wed Jul 23 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 0.2.4-1mdk - 0.2.4 - converted icons to png - dropped redundant buildrequires - dropped P0 & P2 - regenerated P3 - fix some compile problems (P4) - install language packs - adapted wrapper to new version (taken from debian) - macroize * Wed Aug 14 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.1.4.9-10mdk - Automated rebuild with gcc 3.2-0.3mdk * Thu Jul 25 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.1.4.9-9mdk - Automated rebuild with gcc3.2 * Wed May 29 2002 François Pons <fpons@mandrakesoft.com> 0.1.4.9-8mdk - rebuild for new libstdc++. * Mon Apr 29 2002 Guillaume Cottenceau <gc@mandrakesoft.com> 0.1.4.9-7mdk - rebuild for new alsa * Mon Jan 21 2002 Stefan van der Eijk <stefan@eijk.nu> 0.1.4.9-6mdk - BuildRequires * Sat Dec 1 2001 Jeff Garzik <jgarzik@mandrakesoft.com> 0.1.4.9-5mdk - patch3: fix 64-bit build - use %%configure2_5x instead of manually calling ./configure - execute autoconf in %%prep not %%build stage * Wed Nov 07 2001 François Pons <fpons@mandrakesoft.com> 0.1.4.9-4mdk - added url tag. - updated source tag. * Mon Oct 15 2001 Guillaume Cottenceau <gc@mandrakesoft.com> 0.1.4.9-3mdk - rebuild for libpng3 * Fri Sep 28 2001 Stefan van der Eijk <stefan@eijk.nu> 0.1.4.9-2mdk - BuildRequires: libpng-devel - Removed redundant BuildRequires. * Mon Aug 27 2001 François Pons <fpons@mandrakesoft.com> 0.1.4.9-1mdk - 0.1.4.9. - removed already applied patch. - fixed unused /var/lib/armagetron directory (no highscore saved). * Fri Jun 22 2001 François Pons <fpons@mandrakesoft.com> 0.1.4.6-1mdk - initial release.