%define name 4stAttack %define version 2.1.4 %define release 5mdk Summary: Connect-four for pygame. Name: %{name} Version: %{version} Release: %{release} Group: Games/Boards License: GPL URL: http://forcedattack.sourceforge.net Source: http://belnet.dl.sourceforge.net/sourceforge/forcedattack/%{name}-%{version}.tar.bz2 Source2: %{name}-icons.tar.bz2 BuildRoot: %{_tmppath}/%{name}-buildroot Requires: pygame >= 1.5.3 BuildArch: noarch %description 4stAttack is a game in which you have to try to out-smart your opponent. The goal of the game is to connect four of stones in a straight line. This can be horizontaly, vertically or diagonally. This rpm works with the portable pygame game-engine. %prep %setup -q %setup -q -T -D -a2 %build %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_gamesbindir}/%{name} cp -R * $RPM_BUILD_ROOT%{_gamesbindir}/%{name} #icon install -D -m644 %{name}48.png $RPM_BUILD_ROOT%{_liconsdir}/%{name}.png install -D -m644 %{name}32.png $RPM_BUILD_ROOT%{_iconsdir}/%{name}.png install -D -m644 %{name}16.png $RPM_BUILD_ROOT%{_miconsdir}/%{name}.png # Lets make a wrapper. mkdir -p %{buildroot}%{_bindir} cat << EOF > %{buildroot}%{_bindir}/%{name} #!/bin/sh cd %{_prefix}/games/%{name} if [ ! -f ~/.%{name} ]; then cp settings.ini ~/.%{name} || exit 1 fi %{__python} 4stattack.py -ini ~/.%{name} EOF # Menu entry install -m755 -d $RPM_BUILD_ROOT%{_menudir} cat << EOF > $RPM_BUILD_ROOT%{_menudir}/%{name} ?package(%{name}):\ needs="x11"\ section="More applications/Games/Boards"\ title="%{name}"\ longtitle="%{summary}"\ command="%{name}"\ icon="%{name}.png" EOF %post %{update_menus} %{make_session} %postun %{clean_menus} %{update_menus} %{make_session} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %doc changelog.txt README.txt %dir %{_gamesbindir}/%{name} %{_gamesbindir}/%{name}/* %{_menudir}/%{name} %{_liconsdir}/%{name}.png %{_iconsdir}/%{name}.png %{_miconsdir}/%{name}.png # %defattr(755,root,root,755) %{_bindir}/%{name} %changelog * Thu Jun 10 2004 Lenny Cartier <lenny@mandrakesoft.com> 2.1.4-5mdk - rebuild * Tue Apr 29 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 2.1.4-4mdk - own game directory * Sun Mar 09 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 2.1.4-3mdk - removed obsolete prefix tag - install icons in install stage, you should'nt touch buildroot in the build stage - nicer formatting - spec cleanups * Fri Dec 27 2002 Han Boetes <han@linux-mandrake.com> 2.1.4-2mdk - rebuild because of new rpm macros and new glibc. * Sat Oct 5 2002 Han Boetes <han@linux-mandrake.com> 2.1.4-1mdk - Bump - minor spec-cleanup * Mon Sep 23 2002 Han Boetes <han@linux-mandrake.com> 2.1.3-1mdk - Same story :) * Mon Sep 23 2002 Han Boetes <han@linux-mandrake.com> 2.1.2-1mdk - While I was making the rpm I found a bug and the author fixed it so: Bump to next release - Silly mistakes - Icons and menu-entry * Fri Sep 20 2002 Han Boetes <han@linux-mandrake.com> 2.1.1-1mdk - Bump * Wed May 29 2002 Han Boetes <han@mijncomputer.nl> 2-0.20020529.1mdk - test release * Fri May 24 2002 Han Boetes <han@mijncomputer.nl> 2-0.alpha.1mdk - Initial MDK built