Sophie

Sophie

distrib > Mageia > 6 > x86_64 > by-pkgid > 2764d93ff502f5254f8456a34d2256d8 > files > 2

armagetron-0.2.8.3.3-1.mga6.src.rpm

#(peroyvind) dunno what this is nor why it's required, but we don't have it and it shouldn't be required
%global	__requires_exclude	BEGIN_RIM

%define sourcename	armagetronad

Summary:	Armagetron Advanced, 3D lightcycle game using OpenGL
Name:		armagetron
Version:	0.2.8.3.3
Release:	%mkrel 1
License:	GPL
Group:		Games/Arcade
URL:		http://armagetronad.net/
Source: 	http://prdownloads.sourceforge.net/armagetronad/%{sourcename}-%{version}.src.tar.bz2
Source1:	%{name}-png.tar.bz2
Patch0:		armagetronad-0.2.8.3.1-empty-master.srv-fix.patch

BuildRequires:	SDL_image-devel
BuildRequires:	mesaglu-devel
BuildRequires:	libpng-devel
BuildRequires:	libxml2-devel

%description
Armagetron is a multiplayer game in 3D that attempts to emulate and expand
on the lightcycle sequence from the movie Tron. It's an old school arcade
game slung into the 21st century. Highlights include a customizable playing
arena, HUD, unique graphics, and AI bots. For the more advanced player there
are new game modes and a wide variety of physics settings to tweak as well.

%prep
%setup -q -n %{sourcename}-%{version}
%autopatch -p1

%build
autoreconf -vfi
%configure2_5x \
	--bindir=%{_gamesbindir} \
	--datadir=%{_gamesdatadir} \
	--disable-games \
	--disable-uninstall
%make_build

%install
%make_install

mv %{buildroot}%{_gamesdatadir}/doc %{buildroot}%{_datadir}

# remove unwanted files
rm -f %{buildroot}%{_gamesbindir}/armagetronad-uninstall
rm -rf %{buildroot}%{_gamesdatadir}/%{sourcename}/{desktop,scripts}
rm -rf %{buildroot}%{_datadir}/{applnk,icons}
rm -rf %{buildroot}/opt/kde3/share/{applnk,icons}

cat <<EOF >%{buildroot}%{_gamesbindir}/%{name}
#!/bin/sh -e

REALTRON=%{_gamesbindir}/%{sourcename}

DATADIR=%{_gamesdatadir}/%{sourcename}
CONFDIR=%{_sysconfdir}/%{sourcename}
USERCONFDIR=\$HOME/.%{name}
USERDATADIR=\$USERCONFDIR/data
VARDIR=\$HOME/.%{name}
AUTORESOURCEDIR=\$HOME/.%{name}/resource
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
# remove empty master.srv file created by earlier revisions
if [ -r \$USERCONFDIR/master.srv ] && ! [ -s \$USERCONFDIR/master.srv ]; then
  rm -f \$USERCONFDIR/master.srv
fi

CMDLINE="--datadir \$DATADIR --configdir \$CONFDIR --userconfigdir \$USERCONFDIR --vardir \$VARDIR --autoresourcedir \$AUTORESOURCEDIR"
if [ -d \$USERDATADIR ]; then
	CMDLINE="\$CMDLINE --userdatadir \$USERDATADIR"
fi
exec \$REALTRON \$CMDLINE "\$@"
EOF

tar xjf %{SOURCE1}
install -m0644 %{name}-16.png -D %{buildroot}%{_miconsdir}/%{name}.png
install -m0644 %{name}-32.png -D %{buildroot}%{_iconsdir}/%{name}.png
install -m0644 %{name}-48.png -D %{buildroot}%{_liconsdir}/%{name}.png

install -d %{buildroot}%{_datadir}/applications
cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF
[Desktop Entry]
Name=Armagetron Advanced
Comment=Another 3d lightcycle game
Exec=%_gamesbindir/%{name}
Icon=%{name}
Terminal=false
Type=Application
Categories=Game;ArcadeGame;
EOF

%files
%doc AUTHORS COPYING NEWS README
%attr(0755,root,games) %{_gamesbindir}/%{name}
%attr(2755,root,games) %{_gamesbindir}/%{sourcename}
%{_gamesdatadir}/%{sourcename}
%dir %{_sysconfdir}/%{sourcename}
%config(noreplace) %{_sysconfdir}/%{sourcename}/*
%{_miconsdir}/%{name}.png
%{_iconsdir}/%{name}.png
%{_liconsdir}/%{name}.png
%{_datadir}/applications/%{name}.desktop
%{_defaultdocdir}/%{sourcename}


%changelog
* Sun Jan 03 2016 akien <akien> 0.2.8.3.3-1.mga6
+ Revision: 919088
- Version 0.2.8.3.3

* Wed Oct 15 2014 umeabot <umeabot> 0.2.8.3.2-7.mga5
+ Revision: 745840
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 0.2.8.3.2-6.mga5
+ Revision: 677902
- Mageia 5 Mass Rebuild

  + tv <tv>
    - use %%global for req/prov exclude
    - autoconvert to new prov/req excludes

* Sat Oct 19 2013 umeabot <umeabot> 0.2.8.3.2-5.mga4
+ Revision: 526038
- Mageia 4 Mass Rebuild

* Mon Jun 03 2013 fwang <fwang> 0.2.8.3.2-4.mga4
+ Revision: 435781
- rebuild for new libpng

* Fri Jan 11 2013 umeabot <umeabot> 0.2.8.3.2-3.mga3
+ Revision: 346084
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Tue Mar 06 2012 zezinho <zezinho> 0.2.8.3.2-2.mga2
+ Revision: 220483
- remove soundwrapper from menu as it is not used anymore

* Sun Sep 18 2011 fwang <fwang> 0.2.8.3.2-1.mga2
+ Revision: 144908
- fix detect on libpng15
- new version 0.2.8.3.2
- rebuild for new libpng

  + stormi <stormi>
    - rebuild for libpng
    - remove forgotten patch

* Sun Mar 13 2011 stormi <stormi> 0.2.8.3.1-1.mga1
+ Revision: 70666
- new version 0.2.8.3.1
- remove merged upstream patch for gcc 4.3 compilation
- rediff empty-master.srv-fix.patch and submit it upstream
- clean spec

* Sat Mar 12 2011 stormi <stormi> 0.2.8.2.1-12.mga1
+ Revision: 68363
- imported package armagetron