%define name dopewars %define version 1.5.7 %define release 2mdk %define summary Make a fortune dealing drugs on the streets of New York... Name: %{name} Version: %{version} Release: %{release} Summary: %{summary} License: GPL Group: Games/Strategy Source0: http://dopewars.sourceforge.net/%{name}-%{version}.tar.bz2 Source1: %{name}-16.png.bz2 Source2: %{name}-32.png.bz2 Source3: %{name}-48.png.bz2 URL: http://dopewars.sourceforge.net Requires: libgtk+1.2 BuildRequires: libgtk+1.2-devel BuildRoot: %{_tmppath}/%{name}-buildroot %description Based on John E. Dell's old Drug Wars game, dopewars is a simulation of an imaginary drug market. dopewars is an All-American game which features buying, selling, and trying to get past the cops! The first thing you need to do is pay off your debt to the Loan Shark. After that, your goal is to make as much money as possible (and stay alive)! You have one month of game time to make your fortune. dopewars supports multiple players via. TCP/IP. Chatting to and fighting with other players (computer or human) is supported; check the command line switches (via dopewars -h) for further information. %prep rm -rf $RPM_BUILD_ROOT %setup bzcat %{SOURCE1} > %{name}-16.png bzcat %{SOURCE2} > %{name}-32.png bzcat %{SOURCE3} > %{name}-48.png %build %configure %make %install %makeinstall_std install -d 0755 $RPM_BUILD_ROOT%{_gamesbindir} install -d 0755 $RPM_BUILD_ROOT%{_sysconfdir} install -d 0755 $RPM_BUILD_ROOT%{_localstatedir}/games mv $RPM_BUILD_ROOT%{_bindir}/%{name} $RPM_BUILD_ROOT%{_gamesbindir}/%{name} mv doc/example-cfg $RPM_BUILD_ROOT%{_sysconfdir}/%{name} touch $RPM_BUILD_ROOT%{_localstatedir}/games/%{name}.sco # clean up documentation rm -f doc/example-cfg rm -f doc/Makefile* rm -f doc/%{name}.6 %{find_lang} %{name} # icons install -D -m 644 %{name}-16.png $RPM_BUILD_ROOT%{_miconsdir}/%{name}.png install -D -m 644 %{name}-32.png $RPM_BUILD_ROOT%{_iconsdir}/%{name}.png install -D -m 644 %{name}-48.png $RPM_BUILD_ROOT%{_liconsdir}/%{name}.png # menu entry mkdir -p $RPM_BUILD_ROOT%{_libdir}/menu cat >$RPM_BUILD_ROOT%{_menudir}/%{name} <<EOF ?package(%{name}):\\ command="%{_gamesbindir}/%{name}"\\ needs="X11"\\ icon="%{name}.png"\\ section="Amusement/Strategy"\\ title="Dopewars" \ longtitle="%{summary}" EOF %clean rm -rf $RPM_BUILD_ROOT %post %{update_menus} if [ ! -r %{_localstatedir}/games/%{name}.sco ]; then touch %{_localstatedir}/games/%{name}.sco chown root.games %{_localstatedir}/games/%{name}.sco chmod 664 %{_localstatedir}/games/%{name}.sco fi %postun %{clean_menus} %files -f %{name}.lang %defattr(-, root, root) %doc ChangeLog LICENCE README doc/* %config(noreplace) %{_sysconfdir}/%{name} %{_libdir}/%{name} %attr(2711, root, games) %{_gamesbindir}/dopewars %attr(0664, root, games) %ghost %{_localstatedir}/games/%{name}.sco %{_mandir}/man6/* %{_datadir}/pixmaps/* %{_menudir}/%{name} %{_miconsdir}/%{name}.png %{_iconsdir}/%{name}.png %{_liconsdir}/%{name}.png %changelog * Fri Aug 16 2002 Götz Waschk <waschk@linux-mandrake.com> 1.5.7-2mdk - rebuild with new vorbis and gcc 3.2 * Wed Jun 26 2002 Guillaume Rousse <g.rousse@linux-mandrake.com> 1.5.7-1mdk - 1.5.7 - menu entry - config file - better high score file handling - more explicit summary :-) * Fri Oct 26 2001 Guillaume Rousse <g.rousse@linux-mandrake.com> 1.5.2-2mdk - new in contribs - removed lurking cvs file * Wed Oct 17 2001 Guillaume Rousse <g.rousse@linux-mandrake.com> 1.5.2-1mdk - 1.5.2 - s/Copyright/License * Tue May 15 2001 Guillaume Rousse <g.rousse@linux-mandrake.com> 1.5.0-1mdk - first Mandrake release