Blob Blame Raw
%global         _tarname SuperTux-v%{version}-Source

Name:           supertux
Version:        0.5.0
Release:        1%{?dist}
Summary:        Jump'n run like game

Group:          Amusements/Games
License:        GPLv2+
URL:            http://supertux.lethargik.org/
Source0:        https://github.com/SuperTux/%{name}/releases/download/v%{version}/%{_tarname}.tar.gz
Patch0:         supertux-0.4.0-desktop.patch

BuildRequires:  pkgconfig(sdl2) >= 2.0.1
BuildRequires:  pkgconfig(SDL2_image) >= 2.0.0
BuildRequires:  zlib-devel
BuildRequires:  desktop-file-utils
BuildRequires:  libGLU-devel
BuildRequires:  openal-devel
BuildRequires:  libvorbis-devel
BuildRequires:  glew-devel
BuildRequires:  boost-devel
BuildRequires:  libcurl-devel
BuildRequires:  gettext
BuildRequires:  flex
BuildRequires:  bison
BuildRequires:  cmake
BuildRequires:  sed
BuildRequires:  /usr/bin/appstream-util
Requires:       opengl-games-utils hicolor-icon-theme

# Bundled and forked physfs.
Provides:       bundled(physfs) = 2.1.0.20160502git
# Bundled version of squirrel 3 (only version 2 in Fedora).
Provides:       bundled(squirrel) = 3.1
# Bundled (and forked) version of tinygettext.
Provides:       bundled(tinygettext) = 0.1.20160606git

%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 -qn %{_tarname}
%patch0 -p1 -b .desktop


%build
# The rpath handling is a hack for the internal tinygettext.
%cmake -DINSTALL_SUBDIR_SHARE=share/supertux2 -DINSTALL_SUBDIR_BIN=bin \
    -DENABLE_BOOST_STATIC_LIBS=OFF .
make VERBOSE=1 %{?_smp_mflags}


%install
make install DESTDIR=%{buildroot}
rm -r %{buildroot}/usr/share/doc/supertux2
ln -snf opengl-game-wrapper.sh %{buildroot}%{_bindir}/supertux2-wrapper

# Desktop file and icon stuff
desktop-file-install --vendor "" \
  --dir %{buildroot}%{_datadir}/applications \
  %{buildroot}%{_datadir}/applications/supertux2.desktop
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/48x48/apps
mv %{buildroot}%{_datadir}/pixmaps/supertux.png \
  %{buildroot}%{_datadir}/icons/hicolor/48x48/apps
rm %{buildroot}%{_datadir}/pixmaps/supertux.xpm

install -Dpm 644 man/man6/supertux2.6 %{buildroot}%{_mandir}/man6/supertux2.6


%check
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/supertux2.appdata.xml
desktop-file-validate %{buildroot}%{_datadir}/applications/supertux2.desktop


%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :


%files
%doc README.md NEWS.md
%license LICENSE.txt
%{_bindir}/supertux2*
%{_datadir}/supertux2
%{_datadir}/appdata/supertux2.appdata.xml
%{_datadir}/applications/supertux2.desktop
%{_datadir}/icons/hicolor/48x48/apps/supertux.png
%{_mandir}/man6/supertux2.6*


%changelog
* Wed Sep 28 2016 David King <amigadave@amigadave.com> - 0.5.0-1
- Update to 0.5.0 (#1380088)

* Wed Sep 14 2016 David King <amigadave@amigadave.com> - 0.5.0-0.3.rc4-1
- Update to 0.5.0-rc.4

* Mon Sep 12 2016 David King <amigadave@amigadave.com> - 0.5.0-0.3.rc3-1
- Update to 0.5.0-rc.3

* Sat Aug 13 2016 David King <amigadave@amigadave.com> - 0.5.0-0.2.rc2-1
- Update for bundled physfs

* Sat Aug 13 2016 David King <amigadave@amigadave.com> - 0.5.0-0.1.rc2-1
- Update to 0.5.0-rc.2 (#1365227)

* Thu Aug 04 2016 David King <amigadave@amigadave.com> - 0.4.0-5
- Use bundled squirrel 3.0.7 (#1295185)

* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Jan 15 2016 Jonathan Wakely <jwakely@redhat.com> - 0.4.0-3
- Rebuilt for Boost 1.60

* Thu Jan 14 2016 Adam Jackson <ajax@redhat.com> - 0.4.0-2
- Rebuild for glew 1.13

* Mon Dec 21 2015 David King <amigadave@amigadave.com> - 0.4.0-1
- Update to 0.4.0 (#1293182)

* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 0.3.5a-5
- Rebuilt for Boost 1.59

* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.5a-4
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159

* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 0.3.5a-3
- rebuild for Boost 1.58

* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.5a-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sun May 10 2015 David King <amigadave@amigadave.com> - 0.3.5a-1
- Update to 0.3.5a (#1219849)

* Mon Apr 13 2015 David King <amigadave@amigadave.com> - 0.3.5-1
- Update to 0.3.5
- Validate AppData during check
- Install man page

* Tue Jan 27 2015 Petr Machata <pmachata@redhat.com> - 0.3.4-2
- Rebuild for boost 1.57.0

* Tue Nov 11 2014 David King <amigadave@amigadave.com> - 0.3.4-1
- Update to 0.3.4 (#999396)

* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 0.3.3-15
- Rebuild for boost 1.55.0

* Mon Nov 18 2013 Dave Airlie <airlied@redhat.com> - 0.3.3-14
- rebuilt for GLEW 1.10

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Tue Jul 30 2013 Petr Machata <pmachata@redhat.com> - 0.3.3-12
- Rebuild for boost 1.54.0

* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Thu Dec 13 2012 Adam Jackson <ajax@redhat.com> - 0.3.3-10
- Rebuild for glew 1.9.0

* Thu Jul 26 2012 Hans de Goede <hdegoede@redhat.com> - 0.3.3-9
- Rebuilt for new GLEW

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-7
- Rebuilt for c++ ABI breakage

* Sun Jan 15 2012 Dan HorĂ¡k <dan@danny.cz> - 0.3.3-6
- rebuilt with squirrel 2.2.5

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Mon Dec 05 2011 Tom Callaway <spot@fedoraproject.org> - 0.3.3-4
- rebuild for physfs2

* Thu Jun 30 2011 Nils Philippsen <nils@redhat.com> - 0.3.3-3
- include cstddef header to fix build

* Wed Jun 29 2011 Nils Philippsen <nils@redhat.com> - 0.3.3-3
- fix building with current libcurl

* Mon Jun 20 2011 ajax@redhat.com - 0.3.3-3
- Rebuild for new glew soname

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Tue Apr  6 2010 Hans de Goede <hdegoede@redhat.com> 0.3.3-1
- New upstream release 0.3.3
- As upstream consistently calls this supertux2, do the same
  (rather then renaming it to supertux)
- Move the icon to the FDO icon dir

* Tue Aug 25 2009 Alex Lancaster <alexlan[AT]fedoraproject org> - 0.3.1-9
- Rebuild for new openal

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Sun Mar 01 2009 Lubomir Rintel <lkundrak@v3.sk> - 0.3.1-7
- Fix build with GCC 4.4

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* 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 08 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.