%define name xmoto %define version 0.2.0 %define release %mkrel 3 Summary: A challenging 2D motocross platform game Name: %{name} Version: %{version} Release: %{release} Source0: http://prdownloads.sourceforge.net/xmoto/%{name}-%{version}-src.tar.bz2 Source1: %{name}.png License: GPL Group: Games/Arcade Url: http://xmoto.sourceforge.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: mesaglu-devel ode-devel SDL-devel SDL_mixer-devel lua-devel BuildRequires: curl-devel ImageMagick Requires: soundwrapper %description X-Moto is a challenging 2D motocross platform game, where physics play an all important role in the gameplay. You need to control your bike to its limit, if you want to have a chance finishing the more difficult of the challenges. First you'll try just to complete the levels, while later you'll compete with yourself and others, racing against the clock. %prep %setup -q %build export LDFLAGS=-L%_prefix/X11R6/%{_lib} %configure --bindir=%{_gamesbindir} --datadir=%{_gamesdatadir} %if %mdkversion <= 200600 # workaround not to link against the devel .so # (because there is no SONAME in libode.so and liblualib5.so) REAL_ODE=`readlink -f %{_libdir}/libode.so` REAL_LUA=`readlink -f %{_libdir}/liblua.so` REAL_LUALIB=`readlink -f %{_libdir}/liblualib.so` cp $REAL_ODE $REAL_LUA $REAL_LUALIB . perl -pi -e "s|-lode\b|`basename $REAL_ODE`|;s|-llua\b|`basename $REAL_LUA`|;s|-llualib\b|`basename $REAL_LUALIB`|" Makefile %endif %make %install rm -rf $RPM_BUILD_ROOT %makeinstall bindir=$RPM_BUILD_ROOT%{_gamesbindir} datadir=$RPM_BUILD_ROOT%{_gamesdatadir} mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications cat > $RPM_BUILD_ROOT%{_datadir}/applications/mandriva-%{name}.desktop << EOF [Desktop Entry] Encoding=UTF-8 Name=X-Moto Comment=Motocross platform game Exec=soundwrapper %_gamesbindir/%{name} Icon=%{name} Terminal=false Type=Application Categories=Game;ArcadeGame;X-MandrivaLinux-MoreApplications-Games-Arcade; EOF mkdir -p $RPM_BUILD_ROOT%{_menudir} cat > $RPM_BUILD_ROOT%{_menudir}/%{name} << EOF ?package(%{name}): command="soundwrapper %{_gamesbindir}/%{name}" section="More Applications/Games/Arcade" title="X-Moto" longtitle="Motocross platform game"icon="%{name}.png" needs="x11" xdg="true" EOF mkdir -p $RPM_BUILD_ROOT/{%{_liconsdir},%{_iconsdir},%{_miconsdir}} install %SOURCE1 $RPM_BUILD_ROOT%{_liconsdir}/%{name}.png convert -scale 32 %SOURCE1 $RPM_BUILD_ROOT%{_iconsdir}/%{name}.png convert -scale 16 %SOURCE1 $RPM_BUILD_ROOT%{_miconsdir}/%{name}.png %clean rm -rf $RPM_BUILD_ROOT %post %update_menus %postun %clean_menus %files %defattr(-,root,root) %doc AUTHORS README %{_gamesbindir}/%{name} %{_gamesbindir}/%{name}-edit %{_gamesdatadir}/%{name}/ %{_datadir}/applications/mandriva-%{name}.desktop %{_menudir}/%{name} %{_iconsdir}/%{name}.png %{_liconsdir}/%{name}.png %{_miconsdir}/%{name}.png %changelog * Sat Sep 9 2006 Olivier Blin <blino@mandriva.com> 0.2.0-3mdv2007.0 - use soundwrapper * Mon Aug 7 2006 Olivier Blin <blino@mandriva.com> 0.2.0-2mdv2007.0 - rebuild for single precision ode (#24139) * Fri Jul 28 2006 Olivier Blin <blino@mandriva.com> 0.2.0-1mdv2007.0 - 0.2.0 * Thu Jul 20 2006 Olivier Blin <blino@mandriva.com> 0.1.16-2mdv2007.0 - rebuild for new libode - XDG menu - fix old menu section * Fri Jun 16 2006 Olivier Blin <oblin@mandriva.com> 0.1.16-1mdv2007.0 - New release 0.1.16 * Sat May 20 2006 Olivier Blin <oblin@mandriva.com> 0.1.14-1mdk - New release 0.1.14 - adapt to new X11 package name in BuildRequires - BuildRequires curl-devel, for online high-scores * Sun Apr 09 2006 Olivier Blin <oblin@mandriva.com> 0.1.12-1mdk - New release 0.1.12 * Tue Feb 07 2006 Olivier Blin <oblin@mandriva.com> 0.1.11-1mdk - New release 0.1.11 * Sat Dec 03 2005 Olivier Blin <oblin@mandriva.com> 0.1.10-1mdk - New release 0.1.10 * Fri Dec 2 2005 Olivier Blin <oblin@mandriva.com> 0.1.9-2mdk - add linking workaround for lua as well - enable linking workaround if <= 2006.0 only * Fri Dec 02 2005 Olivier Blin <oblin@mandriva.com> 0.1.9-1mdk - New release 0.1.9 * Tue Nov 15 2005 Olivier Blin <oblin@mandriva.com> 0.1.8-3mdk - add SDL_mixer-devel BuildRequires * Tue Nov 15 2005 Olivier Blin <oblin@mandriva.com> 0.1.8-2mdk - add icons - mkrel - workaround not to link against the devel .so - fix x86_64 build * Fri Nov 11 2005 Olivier Blin <oblin@mandriva.com> 0.1.8-1mdk - initial Mandriva release