%define _prefix /opt/freeware %define _defaultdocdir %{_prefix}/doc %define glib2_version 2.2.3 %define pango_version 1.2.5 %define gtk2_version 2.2.4 %define libgnomeui_version 2.4.0.1 %define scrollkeeper_version 0.3.12 Summary: GNOME games. Name: gnome-games Version: 2.4.0 Release: 2 Copyright: LGPL Group: Amusements/Games Source: ftp://ftp.gnome.org/pub/GNOME/sources/pre-gnome2/%{name}/%{name}-%{version}.tar.bz2 Patch0: gnome-games-2.4.0-aix.patch Patch1: gnome-games-2.4.0-autotools.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root Obsoletes: gnome gnome-games-devel URL: http://www.gnome.org Prereq: scrollkeeper >= %{scrollkeeper_version} BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: pango-devel >= %{pango_version} BuildRequires: gtk2-devel >= %{gtk2_version} BuildRequires: libgnomeui-devel >= %{libgnomeui_version} %description The gnome-games package includes some small games that come with the GNOME desktop environment but can be used under any desktop. The games are mostly puzzle or solitaire games. %prep %setup -q if test x$PATCH = x ; then PATCH=patch ; fi $PATCH -p2 -s < %{_sourcedir}/gnome-games-2.4.0-aix.patch $PATCH -p2 -s < %{_sourcedir}/gnome-games-2.4.0-autotools.patch %build LDFLAGS=-L%{_libdir} \ CPPFLAGS=-I%{_includedir} \ PATH=%{_bindir}:$PATH \ ./configure --prefix=%{_prefix} G_CHARSET_ALIAS=%{_libdir}/charset.alias \ PATH=%{_bindir}:$PATH make %install if test "%{buildroot}" != "/"; then rm -rf %{buildroot} fi mkdir -p %{buildroot} PATH=%{_bindir}:$PATH \ XML_CATALOG_FILES=%{_sysconfdir}/xml/docbook \ GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 \ make DESTDIR=%{buildroot} install-strip # Make the links cd %{buildroot} for dir in bin lib include do mkdir -p usr/$dir cd usr/$dir ln -sf ../..%{_prefix}/$dir/* . cd - done %clean %pre # make a group named "games" lsgroup games >/dev/null 2>&1 if [ $? -ne 0 ] then mkgroup games fi %post export PATH=%{_bindir}:$PATH export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` SCHEMAS="gnect.schemas gnomine.schemas same-gnome.schemas mahjongg.schemas gtali.schemas \ gataxx.schemas iagno.schemas gnome-stones.schemas gnotravex.schemas \ glines.schemas gnobots2.schemas gnibbles.schemas" for S in $SCHEMAS; do gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/$S > /dev/null done export XML_CATALOG_FILES=%{_sysconfdir}/xml/docbook scrollkeeper-update -q > /dev/null %postun export PATH=%{_bindir}:$PATH export XML_CATALOG_FILES=%{_sysconfdir}/xml/docbook scrollkeeper-update -q > /dev/null %files %defattr(-, root, system) %doc AUTHORS COPYING ChangeLog %{_datadir}/gnome %{_datadir}/applications %{_datadir}/gnect %{_datadir}/pixmaps %{_datadir}/gnobots2 %{_datadir}/sounds %{_datadir}/gnome-stones %{_datadir}/mime-info %{_datadir}/gnome-stonesrc* %{_datadir}/gnibbles #%{_datadir}/sol-games %{_datadir}/omf %{_libdir}/gnome-stones %{_libdir}/*a %{_sysconfdir}/gconf/schemas/* %config %{_sysconfdir}/sound/events/* %config(noreplace) %attr(664, root, games) %{_prefix}/var/games/* # these are not setgid games %{_bindir}/gnect /usr/lib/lib*.a /usr/bin/gnect # these are setgid games %attr(2551, root, games) %{_bindir}/gnomine %attr(2551, root, games) %{_bindir}/same-gnome %attr(2551, root, games) %{_bindir}/mahjongg %attr(2551, root, games) %{_bindir}/gtali %attr(2551, root, games) %{_bindir}/gnobots2 %attr(2551, root, games) %{_bindir}/gnome-stones %attr(2551, root, games) %{_bindir}/gataxx %attr(2551, root, games) %{_bindir}/gnotravex %attr(2551, root, games) %{_bindir}/gnotski %attr(2551, root, games) %{_bindir}/gnibbles %attr(2551, root, games) %{_bindir}/glines %attr(2551, root, games) %{_bindir}/iagno #%attr(2551, root, games) %{_bindir}/sol %attr(2551, root, games) /usr/bin/gnomine %attr(2551, root, games) /usr/bin/same-gnome %attr(2551, root, games) /usr/bin/mahjongg %attr(2551, root, games) /usr/bin/gtali %attr(2551, root, games) /usr/bin/gnobots2 %attr(2551, root, games) /usr/bin/gnome-stones %attr(2551, root, games) /usr/bin/gataxx %attr(2551, root, games) /usr/bin/gnotravex %attr(2551, root, games) /usr/bin/gnotski %attr(2551, root, games) /usr/bin/gnibbles %attr(2551, root, games) /usr/bin/glines %attr(2551, root, games) /usr/bin/iagno #%attr(2551, root, games) /usr/bin/sol # would be a devel package if it was worth it (nothing links to this anyhow) %{_includedir}/gdkcardimage /usr/include/* # add the .mo files %{_datadir}/locale/*/LC_MESSAGES/gnome-games.mo