Name:		glob2
Version:	0.8.19
Release:	5%{?dist}
Summary:	A realtime strategy game with a different approach on micromanagement

Group:		Amusements/Games
License:	GPL
Patch:		glob2-0.8.19-extra-qualification-fix.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	SDL_ttf-devel SDL_image-devel SDL_net-devel
BuildRequires:	speex-devel freetype-devel boost-devel
BuildRequires:	mesa-libGLU-devel mesa-libGL-devel
BuildRequires:	libXext-devel libXxf86vm-devel libjpeg-devel libpng-devel
BuildRequires:	libvorbis-devel libXau-devel libXdmcp-devel desktop-file-utils
# The configure scripts looks for automake14 and the test fails
# if a new version is installed instead of 1.4

# Unsure if this is really necessary, next 'mocking' will confirm

Globulation 2 is a realtime strategy game
with a different approach on micromanagement.
You control a swarm of globs that need to grow and fight enemies.

%setup -q
%patch -p 1
chmod -x src/*.cpp src/*.h

make %{?_smp_mflags}

for i in $RPM_BUILD_ROOT%{_datadir}/pixmaps/glob2-*.png; do
	# Takes the XXxYY.png from the filename and then remove the .png
	# getting only the XXxYY token.
	SIZE=`basename $i | cut -d- -f3 | cut -d. -f1`
	mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/$SIZE/apps
	mv $RPM_BUILD_ROOT%{_datadir}/pixmaps/glob2-icon-$SIZE.png \
rm -R $RPM_BUILD_ROOT%{_datadir}/pixmaps/
# Fixes the desktop file icon name
sed -i "s@Icon=glob2-icon-48x48.png@Icon=glob2.png@" \
desktop-file-install --delete-original --vendor fedora \
	--dir ${RPM_BUILD_ROOT}%{_datadir}/applications --add-category X-Fedora \
rm $RPM_BUILD_ROOT%{_datadir}/%{name}/AUTHORS

touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
	%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :

touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
	%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :



* Sat Jul 08 2006 Nikolai <brkamikaze at> 0.8.19-5%{?dist}
- Just a fine tuning on the spec, like adding spacing on the ChangeLog.
- Removed the '-Rc' parameter from the chmod, because no recursion is needed and no verboseness too.

* Tue Jul 06 2006 Nikolai <brkamikaze at> 0.8.19-4%{?dist}
- Figured out how to get rid of the 'no-version-in-last-changelog' error.
- Trimmed every line to 80 characters tops, except the changelog ones. Two lines weren't trimmable, but they're ok, I guess.
- Fixed error when not building as root
- Install all icons on the proper location

* Thu Jul 04 2006 Nikolai <brkamikaze at> 0.8.19-3%{?dist}
- Fixed almost all rpmlint errors; can't figure out how to get rid of the 'no-version-in-last-changelog' error.
- Fixed the desktop file and the icons to use more standard standards :-)

* Tue Jun 27 2006 Nikolai <brkamikaze at> 0.8.19-2%{?dist}
- Added the automake14 to BuildRequires to help 'mocking' the package.

* Sun May 7 2006 Nikolai <brkamikaze at> 0.8.19-1%{?dist}
- First created.