Blob Blame History Raw
%if %{?fedora}%{!?fedora:7} >= 7
%define _opengl_wrapper 1
%else
%define _opengl_wrapper 0
%endif

Name:           supertux
Version:        0.3.1
Release:        5%{?dist}
Summary:        Jump'n run like game
Group:          Amusements/Games
License:        GPLv2+
URL:            http://supertux.lethargik.org/
#Source0:        http://download.berlios.de/supertux/supertux-%{version}.tar.bz2
Source0:        http://download.berlios.de/supertux/supertux-%{version}d.tar.bz2
Patch0:         supertux-0.3.1-gcc43.patch
Patch1:         supertux-0.3.1-comments.patch
Patch2:         supertux-0.3.1-cons_disable.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  SDL-devel >= 1.2.4
BuildRequires:  SDL_image-devel
BuildRequires:  SDL_mixer-devel
BuildRequires:  zlib-devel
BuildRequires:  desktop-file-utils
BuildRequires:  libGLU-devel
BuildRequires:  physfs-devel
BuildRequires:  openal-devel
BuildRequires:  libvorbis-devel
BuildRequires:  gettext
BuildRequires:  flex
BuildRequires:  bison
BuildRequires:  jam
BuildRequires:  sed
%if %_opengl_wrapper
Requires:       opengl-games-utils
%endif

%description
SuperTux is a jump'n run like game, 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.

%prep
%setup -q
%patch0 -p1 -b .gcc43
%patch1 -p1 -b .comments
%patch2 -p1 -b .cons_disable

# We want to just call this release "supertux", not "supertux2".
find . -depth -name 'supertux2*' \
    | while read file ; do
        mv -v "$file" "$( echo "$file" | sed 's/\(supertux\)2/\1/' )"
    done

find . -type f -exec grep -li 'supertux \?2' {} \; \
    | xargs sed -i -e 's/\(supertux \?\)2/\1/ig'

%build
%configure --disable-debug
jam %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
jam -sDESTDIR=$RPM_BUILD_ROOT install 

rm -f $RPM_BUILD_ROOT%{_datadir}/applications/supertux.desktop
rm -rf desktop_file
mkdir desktop_file
%if %_opengl_wrapper
ln -snf opengl-game-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/supertux-wrapper
sed 's:^Exec=\(.*\)$:Exec=\1-wrapper:g' < supertux.desktop > desktop_file/supertux.desktop
%else
cp -dpf supertux.desktop desktop_file/supertux.desktop
%endif
desktop-file-install \
        --vendor fedora \
        --add-category X-Fedora \
        --dir $RPM_BUILD_ROOT%{_datadir}/applications desktop_file/supertux.desktop

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc COPYING README WHATSNEW.txt
%{_bindir}/*
%{_datadir}/%{name}
%{_datadir}/applications/*
%{_datadir}/pixmaps/*

%changelog
* Fri Jan 30 2009 Hans de Goede <hdegoede@redhat.com> 0.3.1-5
- Update description for new trademark guidelines

* Sun Jan 18 2009 Lubomir Rintel <lkundrak@v3.sk> 0.3.1-4
- Fix parsing of translations (#477497)
- Disable debugging console

* Thu Jul 10 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 0.3.1-3
- Fix building with gcc-4.3 (bz 434445)

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.3.1-2
- Autorebuild for GCC 4.3

* Tue Jan 08 2008 Steven Pritchard <steve@kspei.com> 0.3.1-1
- Update to 0.3.1.
- Upstream is calling this release "supertux2", so we get rid of the "2".
- Update License.

* Fri Oct 19 2007 Nils Philippsen <nphilipp@redhat.com> 0.3.0-3
- use opengl-games-wrapper.sh from Fedora 7 on (#335701)

* Fri Oct 19 2007 Nils Philippsen <nphilipp@redhat.com> 0.3.0-2
- use opengl-games-wrapper.sh from Fedora 8 on (#335701)

* Tue Feb 13 2007 Steven Pritchard <steve@kspei.com> 0.3.0-1
- Update to 0.3.0.
- Update URL.
- Drop compile fix patch.
- BR: physfs-devel, openal-devel, libvorbis-devel.
- BR: gettext, flex, bison, jam.
- Build uses jam instead of make now.
- Update doc list.
- Minor spec cleanup.

* Mon Aug 28 2006 Steven Pritchard <steve@kspei.com> 0.1.3-5
- Rebuild

* Sat Jun 03 2006 Steven Pritchard <steve@kspei.com> 0.1.3-4
- BR: libGLU-devel to fix rawhide build

* Tue Feb 07 2006 Steven Pritchard <steve@kspei.com> 0.1.3-3
- Patch to fix compile on rawhide

* Tue Sep 06 2005 Steven Pritchard <steve@kspei.com> 0.1.3-2
- Avoid second .desktop file (#167579)

* Thu Sep 01 2005 Steven Pritchard <steve@kspei.com> 0.1.3-1
- Update to 0.1.3

* Sun May 22 2005 Jeremy Katz <katzj@redhat.com> - 0.1.2-3
- rebuild on all arches

* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
- rebuilt

* Sun Oct 03 2004 Panu Matilainen <pmatilai@welho.com> 0:0.1.2-1
- update to 0.1.2

* Sat May 15 2004 Panu Matilainen <pmatilai@welho.com> 0:0.1.1-0.fdr.2
- add buildrequires libtiff-devel

* Thu May 13 2004 Panu Matilainen <pmatilai@welho.com> 0:0.1.1-0.fdr.1
- Initial RPM release.