%define name kugel %define version 2.7 %define release %mkrel 7 # (misc) perl refuse to run setgid without cleaning the program ( man perlsec ) # therefore, the scorefile cannot be group writeable with the script being setgid on # group games. # (misc) do not change layout of files, rpm will not updgrade cleanly. # see http://archives.mandrakelinux.com/cooker/2004-01/msg00013.php Summary: Kugel, board game Name: %name Version: %version Release: %release License: GPL Group: Games/Boards Source: %name-%version.tar.bz2 Url: http://www.vlptel.com/~vlatko/kugel/kugel.html BuildRoot: %_tmppath/%{name}-buildroot Buildarch: noarch %description The game is played by moving objects on the board and putting them into rows, columns, diagonals. Each time you create a line of the same objects ("kugels", balls...), the score will increment with the number of objects you accomplished to line up. In the same time, the lined up "kugels" will disappear, so you can continue the game with more maneuver space on the board. Any time you fail to create a line of "kugels", new ones will appear on the board. Once the board is full, the game is over. %prep rm -rf $RPM_BUILD_ROOT %setup -q %build #perl -pi -e 's#/usr/games/kugel#%_gamesdatadir/kugel#' kugel %install mkdir -p $RPM_BUILD_ROOT/%_bindir/ mkdir -p $RPM_BUILD_ROOT/%_gamesbindir/kugel mkdir -p $RPM_BUILD_ROOT/%_mandir/man1 chmod a+rw $RPM_BUILD_DIR/%name-%version/scorefile cp -R $RPM_BUILD_DIR/%name-%version/* $RPM_BUILD_ROOT/%_gamesbindir/kugel cp $RPM_BUILD_DIR/%name-%version/kugel $RPM_BUILD_ROOT/%_bindir/kugel cp $RPM_BUILD_DIR/%name-%version/kugel.1.bz2 $RPM_BUILD_ROOT/%_mandir/man1 rm -rf $RPM_BUILD_ROOT/usr/games/kugel/{COPYING,INSTALL,README,TODO,kugel,kugel.spec,kugel.1.bz2} # Menu entry mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications/ cat << EOF > %buildroot%{_datadir}/applications/mandriva-%{name}.desktop [Desktop Entry] Type=Application Exec=%{_bindir}/%{name} Icon=boards_section Categories=BoardGame; Name=Kugel Comment=Kugel board game EOF %if %mdkversion < 200900 %post %update_menus %endif %if %mdkversion < 200900 %postun %clean_menus %endif %files %defattr(-,root,root) %doc COPYING INSTALL README TODO %_gamesbindir/kugel %_mandir/man1/* %{_datadir}/applications/mandriva-*.desktop %_bindir/kugel %attr(666,root,root) %_gamesbindir/kugel/scorefile %changelog * Fri Jul 25 2008 Thierry Vignaud <tvignaud@mandriva.com> 2.7-7mdv2009.0 + Revision: 248191 - rebuild - fix 'error: for key "Icon" in group "Desktop Entry" is an icon name with an extension, but there should be no extension as described in the Icon Theme Specification if the value is not an absolute path' + Pixel <pixel@mandriva.com> - rpm filetriggers deprecates update_menus/update_scrollkeeper/update_mime_database/update_icon_cache/update_desktop_database/post_install_gconf_schemas * Thu Jan 03 2008 Thierry Vignaud <tvignaud@mandriva.com> 2.7-5mdv2008.1 + Revision: 141877 - auto-convert XDG menu entry - kill re-definition of %%buildroot on Pixel's request - import kugel + Olivier Blin <oblin@mandriva.com> - restore BuildRoot * Tue Dec 20 2005 Lenny Cartier <lenny@mandriva.com> 2.7-5mdk - rebuild * Thu Jan 01 2004 Michael Scherer <misc@mandrake.org> 2.7-4mdk - revert to old files layout, to fix upgrade * Wed Dec 31 2003 Michael Scherer <misc@mandrake.org> 2.7-3mdk - fix [DIRM] - add doc - use macro - move to %%_gamesdatadir * Sat Feb 01 2003 Lenny Cartier <lenny@mandrakesoft.com 2.7-2mdk - rebuild * Wed Jan 08 2003 Lenny Cartier <lenny@mandrakesoft.com> 2.7-1mdk - 2.7 * Mon Nov 18 2002 Lenny Cartier <lenny@mandrakesoft.com> 2.6-1mdk - 2.6