[supertux/el6] - New upstream release 0.3.3 - As upstream consistently calls this supertux2, do the same (rather th
David King
amigadave at fedoraproject.org
Tue Nov 11 18:20:54 UTC 2014
commit 4a5480f8e3a01ad3a0b8e1eaa3435482f2e8abef
Author: Hans de Goede <jwrdegoede at fedoraproject.org>
Date: Wed Apr 7 11:35:00 2010 +0000
- 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
supertux.spec | 105 +++++++++++++++++++++++++++++---------------------------
1 files changed, 54 insertions(+), 51 deletions(-)
---
diff --git a/supertux.spec b/supertux.spec
index 2e051d8..dd947ae 100644
--- a/supertux.spec
+++ b/supertux.spec
@@ -1,22 +1,13 @@
-%if %{?fedora}%{!?fedora:7} >= 7
-%define _opengl_wrapper 1
-%else
-%define _opengl_wrapper 0
-%endif
-
Name: supertux
-Version: 0.3.1
-Release: 9%{?dist}
+Version: 0.3.3
+Release: 1%{?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
-Patch3: supertux-0.3.1-gcc44.patch
+Source0: http://download.berlios.de/supertux/supertux-%{version}.tar.bz2
+Patch0: supertux-0.3.3-desktop.patch
+Patch1: supertux-0.3.3-system-squirrel.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: SDL-devel >= 1.2.4
BuildRequires: SDL_image-devel
@@ -27,70 +18,82 @@ BuildRequires: libGLU-devel
BuildRequires: physfs-devel
BuildRequires: openal-devel
BuildRequires: libvorbis-devel
+BuildRequires: squirrel-devel
BuildRequires: gettext
BuildRequires: flex
BuildRequires: bison
-BuildRequires: jam
+BuildRequires: cmake
BuildRequires: sed
-%if %_opengl_wrapper
-Requires: opengl-games-utils
-%endif
+Requires: opengl-games-utils hicolor-icon-theme
%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
-%patch3 -p1 -b .gcc44
+%patch0 -p1
+%patch1 -p1
-# 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}
+export CFLAGS="$RPM_OPT_FLAGS -I/usr/include/squirrel"
+export CXXFLAGS="$RPM_OPT_FLAGS -I/usr/include/squirrel"
+%cmake -DINSTALL_SUBDIR_SHARE=share/supertux2 -DINSTALL_SUBDIR_BIN=bin .
+make VERBOSE=1 %{?_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
+make install DESTDIR=$RPM_BUILD_ROOT
+rm -r $RPM_BUILD_ROOT/usr/share/doc/supertux2
+ln -snf opengl-game-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/supertux2-wrapper
+
+# Desktop file and icon stuff
+desktop-file-install --vendor "" \
+ --dir $RPM_BUILD_ROOT%{_datadir}/applications \
+ $RPM_BUILD_ROOT%{_datadir}/applications/supertux2.desktop
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
+mv $RPM_BUILD_ROOT%{_datadir}/pixmaps/supertux.png \
+ $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
+rm $RPM_BUILD_ROOT%{_datadir}/pixmaps/supertux.xpm
+
%clean
rm -rf $RPM_BUILD_ROOT
+
+%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
%defattr(-,root,root,-)
%doc COPYING README WHATSNEW.txt
-%{_bindir}/*
-%{_datadir}/%{name}
-%{_datadir}/applications/*
-%{_datadir}/pixmaps/*
+%{_bindir}/supertux2*
+%{_datadir}/supertux2
+%{_datadir}/applications/supertux2.desktop
+%{_datadir}/icons/hicolor/48x48/apps/supertux.png
+
%changelog
+* Tue Apr 6 2010 Hans de Goede <hdegoede at 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
More information about the scm-commits
mailing list