%define name cxhextris %define exec /usr/X11R6/bin/xhextris %define version 1.0 %define release 27mdk %define summary An X Window System color version of xhextris. %define group Games/Arcade BuildRequires: XFree86-devel XFree86 gcc %define section Amusement/Arcade Summary: %{summary} Name: %{name} Icon: %{name}.xpm Version: %{version} Release: %{release} License: GPL Group: %{group} Source0: ftp://sunsite.unc.edu/pub/Linux/games/arcade/tetris/cxhextris.tar.bz2 Source1: %{name}_16x16.png Source2: %{name}_32x32.png Patch0: cxhextris-config.patch.bz2 Patch1: cxhextris-axp.patch.bz2 Patch2: cxhextris-security.patch.bz2 Prereq: /usr/X11R6/bin/mkfontdir BuildRoot: %_tmppath/cxhextris-root %description CXHextris is a color version of the popular xhextris game, which is a Tetris-like game that uses hexagon shapes instead of square shapes. CXHextris runs within the X Window System. Install cxhextris if you enjoy playing Tetris or Tetris-like games and you'd like to play one on your system. You'll need to have X installed in order to play CXHextris. %prep %setup -q -n cxhextris %patch -p1 %patch1 -p1 %patch2 -p1 %build xmkmf make CDEBUGFLAGS="$RPM_OPT_FLAGS" CXXDEBUGFLAGS="$RPM_OPT_FLAGS" %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install install.man mkdir -p $RPM_BUILD_ROOT/usr/X11R6/lib/X11/fonts/misc make FONTDIR=$RPM_BUILD_ROOT/usr/X11R6/lib/X11/fonts install.font # icons install -D %{SOURCE1} \ $RPM_BUILD_ROOT/usr/share/icons/mini/%{name}.png install -D %{SOURCE2} \ $RPM_BUILD_ROOT/usr/share/icons/%{name}.png # (fg) Menu entry mkdir -p $RPM_BUILD_ROOT/usr/lib/menu cat >$RPM_BUILD_ROOT/usr/lib/menu/%{name} <<EOF ?package(%{name}):\ command="%{exec}"\ needs="X11"\ icon="%{name}.png"\ section="%{section}"\ title="Cxhextris"\ longtitle="Cxhextris: %{summary}" EOF %clean rm -rf $RPM_BUILD_ROOT %post (cd /usr/X11R6/lib/X11/fonts/misc; /usr/X11R6/bin/mkfontdir) ## add menu entry [ -x /usr/bin/update-menus ] && /usr/bin/update-menus || true %postun (cd /usr/X11R6/lib/X11/fonts/misc; /usr/X11R6/bin/mkfontdir) ## remove menu entry [ "$1" = 0 ] && [ -x /usr/bin/update-menus ] && /usr/bin/update-menus || true %files %defattr(644,root,root,755) %doc README README.Linux %attr(2755,games,games) /usr/X11R6/bin/xhextris /usr/X11R6/lib/X11/fonts/misc/hex20.pcf %attr(664,games,games) /var/lib/games/xhextris-scores /usr/lib/menu/%{name} /usr/share/icons/%{name}.png /usr/share/icons/mini/%{name}.png %changelog * Sat Feb 16 2002 Stefan van der Eijk <stefan@eijk.nu> 1.0-27mdk - BuildRequires * Thu Jan 31 2002 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.0-26mdk - score file must not be conffile - hardcoded path in menu icon - capitalize title - fix sources permissions - xpm -> png icons * Tue May 01 2001 David BAUDENS <baudens@mandrakesoft.com> 1.0-25mdk - Use %%_tmppath for BuildRoot * Mon Aug 07 2000 Frederic Lepied <flepied@mandrakesoft.com> 1.0-24mdk - automatically added BuildRequires * Wed Mar 29 2000 Denis Havlik <denis@mandrakesoft.com> 1.0-23mdk - fixed section ( != group :-(( ) * Wed Mar 29 2000 Denis Havlik <denis@mandrakesoft.com> 1.0-22mdk - replaced .wmconfig with new menu entry (need better icons!!!) - new Group (Games/Arcade) * Thu Dec 30 1999 Florent Villard <warly@mandrakesoft.com> 1.0-21mdk - remove suid for /usr/X11/bin/xhextrix - change 666 mode of /var/lib/games/xhextris-scores * Tue Nov 02 1999 Pablo Saratxaga <pablo@mandrakesoft.com> - rebuild for new environmint * Fri Oct 15 1999 - David BAUDENS <baudens@mandrakesoft.com> - Fix incorrect Path in patch #2 (cxhextris-security.patch.bz2) * Wed Jun 23 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - Merging with red-hat : - mark scores as %config(noreplace) (#2882) * Tue May 11 1999 Bernhard Rosenkänzer <bero@mandrakesoft.com> - handle RPM_OPT_FLAGS - Mandrake adaptions * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> - auto rebuild in the new build environment (release 15) * Wed Feb 24 1999 Preston Brown <pbrown@redhat.com> - Injected new description and group. * Tue Aug 4 1998 Jeff Johnson <jbj@redhat.com> - build root * Wed Jun 10 1998 Prospector System <bugs@redhat.com> - translations modified for de, fr * Tue Jun 09 1998 Mike Wangsmo <wanger@redhat.com> - fixed the wmconfig entry * Sat May 2 1998 Alan Cox <alan@redhat.com> - buffer overrun fixed. General restructure to avoid running setuid except during the first moments of initialisation. * Mon Apr 27 1998 Prospector System <bugs@redhat.com> - translations modified for de, fr, tr * Tue Oct 21 1997 Otto Hammersmith <otto@redhat.com> - fixed src url - added wmconfig entries * Thu Jul 10 1997 Erik Troan <ewt@redhat.com> - built against glibc