%define name xmris %define version 4.0.5 %define release %mkrel 7 Name: %{name} Summary: A version of 'Mr Do' video game for X Version: %{version} Release: %{release} Source0: http://www.cs.bris.ac.uk/~nathan/xmris/%{name}.%{version}.tar.bz2 Source10: %{name}.16.png Source11: %{name}.32.png Source12: %{name}.48.png Patch0: xmris-config.patch.bz2 Patch1: xmris-scoring.patch Patch2: xmris-signal-handling.patch Patch3: xmris-wm-protocol.patch License: GPL Group: Games/Arcade BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot Buildrequires: libxaw-devel imake URL: http://www.cs.bris.ac.uk/~nathan/xmris %description Mr Is is a version of the Mr Do video arcade game for the X Window System. %prep %setup -q -n %{name}.%{version} %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %build xmkmf -a perl -p -i -e "s|XAPPLOADDIR = .*|XAPPLOADDIR = %{_datadir}/X11/app-defaults|" Makefile make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/var/lib/games/xmris cat > $RPM_BUILD_ROOT/var/lib/games/xmris/xmris.scores << EOF +0 +8182 EOF make install install.man DESTDIR=$RPM_BUILD_ROOT # A link to ../../../etc/X11/app-defaults is made and named lib in x86_64 APPDEF=%{buildroot}/usr/lib/X11/app-defaults if [ -L $APPDEF ]; then rm $APPDEF elif [ -d $APPDEF ]; then rmdir $APPDEF fi mkdir -p $RPM_BUILD_ROOT/%{_mandir} # menu mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications/ mkdir -p $RPM_BUILD_ROOT%{_miconsdir} mkdir -p $RPM_BUILD_ROOT%{_liconsdir} cat << EOF > %buildroot%{_datadir}/applications/mandriva-%name.desktop [Desktop Entry] Type=Application Categories=Game;ArcadeGame; Name=XMrIs Comment=Mr. Is, a Mr. Do clone for X Exec=%{_gamesbindir}/xmris Icon=xmris EOF install -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_miconsdir}/%{name}.png install -m 644 %{SOURCE11} $RPM_BUILD_ROOT%{_iconsdir}/%{name}.png install -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_liconsdir}/%{name}.png %if %mdkversion < 200900 %post %{update_menus} %endif %if %mdkversion < 200900 %postun %{clean_menus} %endif %clean chmod 755 $RPM_BUILD_ROOT/var/lib/games/xmris rm -rf $RPM_BUILD_ROOT %files %defattr(-, root, games, 755) %doc COPYRIGHT CHANGES* README* COPYING-2.0 ChangeLog %{_gamesbindir}/xmred %attr(2755, root, games) %{_gamesbindir}/xmris %{_datadir}/X11/app-defaults/Xmris %{_gamesdatadir}/%{name}/gardens %{_mandir}/man1/* %{_datadir}/applications/mandriva-%{name}.desktop %{_miconsdir}/%{name}.png %{_iconsdir}/%{name}.png %{_liconsdir}/%{name}.png %defattr(-, games, games,2575) %dir %{_localstatedir}/lib/games/xmris %defattr(-, games, games,464) %{_localstatedir}/lib/games/xmris/xmris.scores %changelog * Sat Aug 09 2008 Thierry Vignaud <tvignaud@mandriva.com> 4.0.5-7mdv2009.0 + Revision: 269805 - rebuild early 2009.0 package (before pixel changes) + Pixel <pixel@mandriva.com> - rpm filetriggers deprecates update_menus/update_scrollkeeper/update_mime_database/update_icon_cache/update_desktop_database/post_install_gconf_schemas - adapt to %%_localstatedir now being /var instead of /var/lib (#22312) * Mon May 12 2008 Paulo Andrade <pcpa@mandriva.com.br> 4.0.5-6mdv2009.0 + Revision: 206433 - Correct problems in .desktop file to update move of binary to %%{_gamesbindir} and add a missing newline to separate the Exec and Icon entries. * Wed May 07 2008 Paulo Andrade <pcpa@mandriva.com.br> 4.0.5-5mdv2009.0 + Revision: 202611 - Don't just make it not conflict with x11-server-common, but make the game functional. - Install Xt resources file in proper directory and don't try to be owner of the base directory. This is required to allow x11-server-common being the owner package of most shared directories used by xorg packages. make it work properly. + Olivier Blin <oblin@mandriva.com> - restore BuildRoot * Tue Dec 18 2007 Thierry Vignaud <tvignaud@mandriva.com> 4.0.5-4mdv2008.1 + Revision: 132635 - adjust file list for x86_64 - update file list - BR imake - auto-convert XDG menu entry - kill re-definition of %%buildroot on Pixel's request - buildrequires X11-devel instead of XFree86-devel - import xmris * Sun Oct 02 2005 Nicolas Lécureuil <neoclust@mandriva.org> 4.0.5-4mdk - BuildRequires fix * Thu Jun 02 2005 Nicolas Lécureuil <neoclust@mandriva.org> 4.0.5-3mdk - Rebuild * Mon Nov 17 2003 Michael Scherer <scherer.michael@free.fr> 4.0.5-2mdk - BuildRequires Xfree-devel - use macro, and move binary in /usr * Wed Jul 9 2003 Austin Acton <aacton@yorku.ca> 4.0.5-1mdk - from andi payn <payn@myrealbox.com> : - first Mandrake RPM - based on xmris-4.0.5-5 RedHat spec by prospector@redhat.com - added Mandrake menu system stuff, icon, and updated URL