%define name	supertux
%define version	0.1.3
%define release	1%{?_dist_release}

Summary:	Super Mario Bros like 2D jump 'n run sidescroller game.
Summary(ja): 	スーパーマリオブラザース風の 2D 横スクロールゲーム
Name:		%{name}
Version:	%{version}
Release: 	%{release}
Source0:	%{name}-%{version}.tar.bz2
Patch0:		supertux-0.1.3-gcc4.patch
License:	GPL
Group:		Applications/Games
URL:		http://super-tux.sf.net/

BuildRequires:	SDL-devel >= 1.2.4, SDL_image-devel, SDL_mixer-devel >= 1.2.7
BuildRequires:	zlib-devel
%if %{?_dist_release} == "vl5"
Requires:	mesa-libGL
BuildRequires:	xorg-x11-devel 
BuildRequires:	mesa-libGL-devel
%endif
%if %{?_dist_release} == "vl4"
Requires:	XOrg-gl
BuildRequires:	XOrg-devel 
BuildRequires:	XOrg-gl-devel
%endif

BuildRoot:	%{_tmppath}/%{name}-%{version}-root


%description
SuperTux is a 2D jump 'n run sidescroller game, with strong inspiration
from the Super Mario Bros games for Nintendo.

Run and jump through multiple worlds, fighting off enemies by jumping
on them or bumping them from below.  Grabbing power-ups and other stuff
on the way.
  
%description -l ja
SuperTux は 任天堂のスーパーマリオブラザースから強い影響を浮けた
2D の横スクロールゲームです。

複数のステージを走ったりジャンプしたりしながら、敵の上にジャンプしたり
下から突き上げたりして戦うゲームです。また途中でパワーアップアイテムや
その他のアイテムが手に入れられます。


%prep
%setup -q
%if %{?_dist_release} == "vl5"
%patch -p0 -b .gcc4
%endif

%build
%configure \
    --disable-dependency-tracking \
    ;
%__make


%install
%__rm -rf ${RPM_BUILD_ROOT}
%makeinstall


%clean
%__rm -rf ${RPM_BUILD_ROOT}


%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog INSTALL LEVELDESIGN
%doc NEWS README TODO
%{_bindir}/supertux
%{_datadir}/applications/supertux.desktop
%{_datadir}/supertux
%{_datadir}/pixmaps/supertux.png

%changelog
* Sun Jan 25 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.1.3-1
- apply new versioning policy 
- spec in utf-8
- apply supertux-0.1.3-gcc4.patch for vl5
- added Requires: 
  - mesa-libGL (for vl5)
  - XOrg-gl (for vl4)
- added BuildRequires: 
  - xorg-x11-devel (for vl5)
  - mesa-libGL-devel (for vl5)
  - XOrg-devel (for vl4)
  - XOrg-gl-devel (for vl4)

* Sat Mar 10 2007 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.1.3-0vl1
- initial build for Vine Linux