Sophie

Sophie

distrib > Mandriva > 7.2 > i586 > media > main-src > by-pkgid > a79b691eb86e14539298a5722e03c6be > files > 7

gnome-games-1.2.0-8mdk.src.rpm

%define version		1.2.0
%define release		8mdk
%define gamesdir	%{_localstatedir}/games

Summary:	GNOME games
Name:		gnome-games
Version:	%version
Release:	%{release}
Copyright:	GPL
Group:		Games/Other

Source:		ftp://ftp.gnome.org/pub/GNOME/stable/sources/gnome-games/gnome-games-%{PACKAGE_VERSION}.tar.bz2
Source3:	mdk.xpm.bz2
Source4:	mdk_bw.xpm.bz2
Source6:	%{name}-icons16.tar.bz2
Source7:	%{name}-icons32.tar.bz2
Source8:	%{name}-icons48.tar.bz2

BuildRoot:	%{_tmppath}/%{name}-%{version}-root
Icon:		gnome-games-icon.xpm
Obsoletes:	gnome
URL:		http://www.gnome.org/
BuildRequires:	guile-devel XFree86-devel ORBit-devel gnome-libs-devel audiofile-devel esound-devel imlib-devel zlib-devel gpm-devel ncurses-devel

%description
The gnome-games package includes games for the GNOME GUI desktop environment.

This package includes:
   * GnomeScott,
   * Ctali,
   * Freecell,
   * Gnibbles,
   * Gnobots2,
   * Gnome-stones,
   * Gnomine,
   * Gnotravex,
   * Gtali,
   * Gturing,
   * Iagno,
   * Mahjongg,
   * Same-gnome
   * Sol

%package devel
Summary:	GNOME games development libraries
Group:		Development/GNOME and GTK+
Icon:		gnome-games-devel-icon.xpm
Requires:	gnome-games = %{version}
Requires:	gtk+-devel

%description devel
The gnome-games-devel package installs the libraries and files needed to develop
games for the GNOME GUI desktop environment.

Install gnome-games-devel if you're developing games for GNOME.

%prep

%setup -q

%build
perl -p -i -e "s|redhat.xpm|mdk.xpm|" xbill/pixmaps/*
perl -p -i -e "s|redhat.xpm|mdk.xpm|" xbill/cursors/*
perl -p -i -e "s|redhat|mdk|" xbill/Library.cc
rm -f xbill/pixmaps/redhat.xpm
rm -f xbill/cursors/redhat.xpm
bzcat %{SOURCE3} > xbill/pixmaps/mdk.xpm
bzcat %{SOURCE4} > xbill/cursors/mdk.xpm

%configure

%make

%install
rm -rf $RPM_BUILD_ROOT

%makeinstall

# lawyers are fun
#
#rm -f  $RPM_BUILD_ROOT%{_bindir}/metatris
rm -f  $RPM_BUILD_ROOT%{_bindir}/gnometris
rm -f  $RPM_BUILD_ROOT%{_datadir}/gnome/apps/Games/gnometris.desktop
#rm -f  $RPM_BUILD_ROOT%{_datadir}/gnome/apps/Games/metatris.desktop
#rm -f  $RPM_BUILD_ROOT%{_datadir}/pixmaps/gnome-metatris.png
rm -f  $RPM_BUILD_ROOT%{_datadir}/pixmaps/gnome-gtetris.png
rm -rf $RPM_BUILD_ROOT%{_datadir}/pixmaps/gnometris/
rm -f  $RPM_BUILD_ROOT%{gamesdir}/gnometris.scores
#rm -f  $RPM_BUILD_ROOT%{gamesdir}/metatris.scores

install -m 755 -d $RPM_BUILD_ROOT%{_menudir}
cat << EOF >> $RPM_BUILD_ROOT%{_menudir}/%{name}
?package(%{name}): title="FreeCell" longtitle="FreeCell Game" command="%{_bindir}/freecell" icon="gnome-cardgame.xpm" needs="x11" section="Amusement/Cards"
?package(%{name}): title="Gnome Mines" longtitle="Gnome Mines game" command="%{_bindir}/gnomine" icon="gnome-gnomine.xpm" needs="x11" section="Amusement/Boards"
?package(%{name}): title="Same Gnome" longtitle="Gnome SameGame" command="%{_bindir}/same-gnome" icon="gnome-gsame.xpm" needs="x11" section="Amusement/Boards"
?package(%{name}): title="Gnome Mahjongg" longtitle="A Mahjongg game for Gnome" command="%{_bindir}/mahjongg" icon="gnome-mahjongg.xpm" kde_info="Gnome Mahjongg game" needs="x11" section="Amusement/Boards"
?package(%{name}): title="gTuring" longtitle="Waste time with a simulated Turing machine" icon="gturing.xpm" command="%{_bindir}/gturing" needs="x11" section="Amusement/Toys"
?package(%{name}): title="GTali" longtitle="Gnome Dice game" command="%{_bindir}/gtali" icon="gnome-gtali.xpm" needs="x11" section="Amusement/Other"
?package(%{name}): title="Gnobots II" longtitle="Gnome Robots game" command="%{_bindir}/gnobots2" icon="gnome-gnobots.xpm" needs="x11" section="Amusement/Arcade"
?package(%{name}): icon="iagno.xpm" title="Iagno" longtitle="Gnome Reversi game" command="%{_bindir}/iagno" needs="x11" section="Amusement/Boards"
?package(%{name}): title="Gnotravex" longtitle="Gnome Tetravex game" command="%{_bindir}/gnotravex" icon="gnome-gnotravex.xpm" needs="x11" section="Amusement/Boards"
?package(%{name}): title="Gnome Stones" longtitle="Gnome Stones game" command="%{_bindir}/gnome-stones" icon="gnome-stones.xpm" needs="x11" section="Amusement/Boards"
?package(%{name}): title="AisleRiot" longtitle="Card-based Solitaire suite" command="%{_bindir}/sol" icon="gnome-aisleriot.xpm" needs="x11" section="Amusement/Cards"
?package(%{name}): title="Gnibbles" longtitle="Gnome Nibbles Game" command="%{_bindir}/gnibbles" icon="gnome-nibbles.xpm" needs="x11" icon="gnome-nibbles.xpm" section="Amusement/Arcade"
?package(%{name}): title="Glines" longtitle="Gnome color lines" command="%{_bindir}/glines" icon="glines.xpm" needs="x11" section="Amusement/Boards"
?package(%{name}): icon="gataxx.xpm" title="Gataxx" longtitle="Gnome ataxx game" command="%{_bindir}/gataxx" needs="x11" section="Amusement/Boards"
EOF

mkdir -p $RPM_BUILD_ROOT%{_miconsdir} $RPM_BUILD_ROOT%{_iconsdir} $RPM_BUILD_ROOT%{_liconsdir}

tar yxvf %{SOURCE6} -C $RPM_BUILD_ROOT%{_miconsdir}
tar yxvf %{SOURCE7} -C $RPM_BUILD_ROOT%{_iconsdir}
tar yxvf %{SOURCE8} -C $RPM_BUILD_ROOT%{_liconsdir}

%{find_lang} %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig
## menu
%{update_menus}

%postun
/sbin/ldconfig
## menu
%{clean_menus}

%pre
# 1 means first time install
if [ "$1" = "1" ]; then
	[ -d %{gamesdir} ] || mkdir -p %{gamesdir}
	for i in gnibbles.1.0 gnibbles.1.1 gnibbles.2.0 gnibbles.2.1 \
		gnibbles.3.0 gnibbles.3.1 gnibbles.4.0 gnibbles.4.1 \
		gnobots.safe gnobots.unsafe gnobots2.classic_robots-safe \
		gnobots2.classic_robots gnobots2.nightmare-safe \
		gnobots2.nightmare gnobots2.robots2-safe gnobots2.robots2 \
		gnobots2.robots2_easy-safe gnobots2.robots2_easy \
		gnobots2.robots_with_safe_teleport-safe \
		gnobots2.robots_with_safe_teleport gnome-stones \
		gnomine.Biiiig gnomine.Custom gnomine.Medium gnomine.Tiny \
		gnotravex.2x2 gnotravex.3x3 gnotravex.4x4 gnotravex.5x5 \
		gnotravex.6x6 gtali iagno.b1 iagno.b2 iagno.b3 iagno.w1 \
		iagno.w2 iagno.w3 mahjongg same-gnome
	do
		touch %{gamesdir}/$i.scores
		chown games.games %{gamesdir}/$i.scores
		chmod 664 %{gamesdir}/$i.scores
	done
	for i in `find %{gamesdir} -name "*.scores" -a -empty`
	do
		echo "100.000000 `date +%s` gnome" >> $i
		echo "150.000000 `date +%s` gnome" >> $i
		echo "200.000000 `date +%s` gnome" >> $i
	done
fi

%files -f %{name}.lang
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_bindir}/GnomeScott
%{_bindir}/ctali
%{_bindir}/freecell
%{_bindir}/sol
%{_bindir}/gataxx
%{_bindir}/glines
%{_bindir}/gnome-xbill
%{_datadir}/xbill
# these are setgid games
%attr(2555, root, games) %{_bindir}/gnibbles
#%attr(2111, root, games) %{_bindir}/gnobots
%attr(2555, root, games) %{_bindir}/gnobots2
%attr(2555, root, games) %{_bindir}/gnome-stones
%attr(2555, root, games) %{_bindir}/gnomine
%attr(2555, root, games) %{_bindir}/gnotravex
%attr(2555, root, games) %{_bindir}/gtali
%attr(2555, root, games) %{_bindir}/gturing
%attr(2555, root, games) %{_bindir}/iagno
%attr(2555, root, games) %{_bindir}/mahjongg
%attr(2555, root, games) %{_bindir}/same-gnome
%config(noreplace) %{_sysconfdir}/sound/events/*
%{_datadir}/gnibbles
%{_datadir}/gnobots2
%{_datadir}/gnome/help/*
%{_datadir}/gnome-stones
%{_datadir}/gturing
#%{_datadir}/metatris
%{_datadir}/pixmaps/*
%{_menudir}/*
%{_iconsdir}/*.xpm
%{_liconsdir}/*.xpm
%{_miconsdir}/*.xpm
%{_datadir}/sol-games
%{_datadir}/sounds/*
%{_libdir}/lib*.so.*
%dir %{_libdir}/gnome-stones
%dir %{_libdir}/gnome-stones/objects
%{_libdir}/gnome-stones/objects/lib*.so.*
%attr(664, games, games) %ghost %{gamesdir}/*

%files devel
%defattr(-, root, root)
%{_libdir}/lib*.so
%{_libdir}/*a
%{_libdir}/gnome-stones/objects/lib*.so
%{_libdir}/gnome-stones/objects/lib*a
%{_includedir}/*

%changelog
* Tue Oct  3 2000 Frederic Crozat <fcrozat@mandrakesoft.com> 1.2.0-8mdk
- Rebuild with correct large icons

* Thu Sep  7 2000 Frederic Crozat <fcrozat@mandrakesoft.com> 1.2.0-7mdk
- Add missing icons
- Use more macros

* Wed Aug 30 2000 Frederic Crozat <fcrozat@mandrakesoft.com> 1.2.0-6mdk
- /var/state -> /var/lib (FHS 2.1)
- use find_lang macro

* Wed Aug 16 2000 David BAUDENS <baudens@mandrakesoft.com> 1.2.0-5mdk
- Fix menu entry
- Human readable Description

* Tue Aug 08 2000 Frederic Lepied <flepied@mandrakesoft.com> 1.2.0-4mdk
- automatically added BuildRequires

* Tue Aug  8 2000 Frederic Crozat <fcrozat@mandrakesoft.com> 1.2.0-3mdk
- BM + macroszification
- menu entry is embedded in spec file

* Mon Aug 07 2000 Frederic Lepied <flepied@mandrakesoft.com> 1.2.0-2mdk
- automatically added BuildRequires

* Tue Jun 13 2000 dam's <damien@mandrakesoft.com> 1.2.0-1mdk
- updated from helix version

* Wed May 24 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.0.51-9mdk
- BuildRequires: guile-devel.

* Wed May 10 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 1.0.51-8mdk
- fixed many ugly/not-working/parties-en-live icons: gnome-xbill,
  gnomine, iagno, gataxx
- added 16x16 icons

* Tue Apr 25 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 1.0.51-7mdk
- added menu entries
- fixed copyright

* Tue Apr 18 2000 Daouda Lo <daouda@mandrakesoft.com> 1.0.51-6mdk
- some minor fixes
- cleanup spec
- setgid to 02555
- add ldconfig to post and postun sections

* Sun Mar 26 2000 David BAUDENS <baudens@mandrakesoft.com>
- Group
- Enable all games
- Use Mandrake logo and not RH logo
- Use %%{_tmppath} for BuildRoot

* Sun Oct 31 1999 Axalon Bloodstone <axalon@linux-mandrake.com>
- SMP build/check macro
- remove patch[01]
- 1.0.51 (sware i did this already so we use release 3mdk, just incase.)

* Tue Aug 31 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
- rebuild against new libguile version
- got latest translations

* Sun Jul 11 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
- added a nice icon
- made %ghost for score files so they aren't lost after upgrades
- cleaned %files

* Tue Jun 29 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Merging with RedHat :
    - added new sol games and a fix for the old ones.

* Fri Apr 23 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Mandrake adpatations.

* Mon Mar 29 1999 Michael Fulbright <drmike@redhat.com>
- removed more offending t*tris stuff

* Thu Mar 18 1999 Michael Fulbright <drmike@redhat.com>
- version 1.0.2
- made gnibbles have correct attr since its setgid
- strip binaries

* Sun Mar 14 1999 Michael Fulbright <drmike@redhat.com>
- added score files to file list

* Thu Mar 04 1999 Michael Fulbright <drmike@redhat.com>
- Version 1.0.1

* Fri Feb 19 1999 Michael Fulbright <drmike@redhat.com>
- removed *tris games

* Mon Feb 15 1999 Michael Fulbright <drmike@redhat.com>
- version 0.99.8
- added sound event lists to file list
- touched up file list some more

* Wed Feb 03 1999 Michael Fulbright <drmike@redhat.com>
- added gnibbles data to file list

* Wed Feb 03 1999 Michael Fulbright <drmike@redhat.com>
- updated to 0.99.7

* Wed Feb 03 1999 Michael Fulbright <drmike@redhat.com>
- updated to 0.99.5

* Mon Jan 18 1999 Michael Fulbright <drmike@redhat.com>
- updated to 0.99.3

* Wed Jan 06 1999 Michael Fulbright <drmike@redhat.com>
- updated to 0.99.1

* Thu Dec 16 1998 Michael Fulbright <drmike@redhat.com>
- updated to 0.99.0 in prep for GNOME 1.0

* Sat Nov 21 1998 Michael Fulbright <drmike@redhat.com>
- updated for 0.30 tree

* Fri Nov 20 1998 Pablo Saratxaga <srtxg@chanae.alphanet.ch>
- use --localstatedir=/var/lib in config state (score files for games
  for exemple will go there).

* Mon Mar 16 1998 Marc Ewing <marc@redhat.com>
- Integrate into gnome-games CVS source tree