Blob Blame History Raw
%define	ver	0751

Name:		ultimatestunts
Version:	0.7.5
Release:	1%{?dist}
Summary:	UltimateStunts is a remake of the famous DOS-game Stunts

Group:		Amusements/Games
License:	GPLv2+
URL:		http://www.ultimatestunts.nl
Source0:	http://downloads.sf.net/%{name}/%{name}-srcdata-%{ver}.tar.gz
Source1:	%{name}.desktop
Patch0:		ultimatestunts-0721-make.patch
Patch1:		ultimatestunts-0751-locale.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	dos2unix freealut-devel SDL_image-devel freeglut-devel libXi-devel
BuildRequires:	desktop-file-utils


%description
UltimateStunts is a remake of the famous DOS-game Stunts. It was a 3D racing
game, with simple CGA/EGA/VGA graphics and no texture or smooth shading, but
because of the spectacular stunts (loopings, bridges to jump over, etc.)
it was really fun to play. One of the best aspects of this game is that it
had a track editor. Because of the tile-based tracks, every gamer was able
to make it's own tracks. This remake works on UNIX-compatible systems (like
Linux), and on windows. It also provides more modern features, like openGL
graphics, 3D sound and internet multiplaying.


%prep
%setup -q -n %{name}-srcdata-%{ver}
%patch0
%patch1

# remove CVS control files
find . -name CVS -type d -print0 | xargs -0 rm -rf

# fixup access
find ./data -type d -print0 | xargs -0 chmod a+rx
find ./data -type f -print0 | xargs -0 chmod a+r
find ./doc -type f -print0 | xargs -0 chmod a+r
chmod a-x simulation/metaserver.cpp

# fixup EOL
pushd "doc/nolanguage/Original Stunts Track-Format_files"
dos2unix -q style.css
dos2unix -q stunts.htm
touch -r tree.png style.css stunts.htm
popd

# fixup encoding
pushd "doc/nolanguage/Original Stunts Track-Format_files"
f=stunts.htm
iconv -f ISO8859-1 -t UTF-8 -o $f.new $f
touch -r tree.png $f.new
mv $f.new $f
popd

pushd doc/nl
for f in *.htm
do
	iconv -f ISO8859-1 -t UTF-8 -o $f.new $f
	touch -r $f $f.new
	mv $f.new $f
done
popd

%build
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT \
	usdatadir=$RPM_BUILD_ROOT%{_datadir}/%{name} \
	localedir=%{_datadir}/locale

rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/lang

%find_lang %{name}

desktop-file-install --vendor fedora \
	--dir $RPM_BUILD_ROOT%{_datadir}/applications \
	%{SOURCE1}


%clean
rm -rf $RPM_BUILD_ROOT


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc COPYING doc/*
%{_bindir}/ustunts*
%config(noreplace) %{_sysconfdir}/%{name}.conf
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/%{name}


%changelog
* Mon Jun 23 2008 Dan Horak <dan[at]danny.cz> 0.7.5-1
- update to upstream version 0751
- use locale data from system directory

* Wed Jan 30 2008 Dan Horak <dan[at]danny.cz> 0.7.4-1
- update to upstream version 0741
- remove integrated patches

* Sun Jan 27 2008 Dan Horak <dan[at]danny.cz> 0.7.3-5
- add patch with gcc 4.3 support

* Fri Nov  9 2007 Dan Horak <dan[at]danny.cz> 0.7.3-4
- recode *.htm files without encoding header

* Wed Nov  7 2007 Dan Horak <dan[at]danny.cz> 0.7.3-3
- added COPYING into docs
- added desktop file

* Tue Nov  6 2007 Dan Horak <dan[at]danny.cz> 0.7.3-2
- fix findind ALUT library on development

* Sun Nov  4 2007 Dan Horak <dan[at]danny.cz> 0.7.3-1
- initial package release