[gnome-games] Split each game into its own package

Mathieu Bridon bochecha at fedoraproject.org
Fri Aug 10 15:14:17 UTC 2012


commit 774d9bbe2956f0e726a94e8d99e60668ea48df0b
Author: Mathieu Bridon <bochecha at fedoraproject.org>
Date:   Wed Aug 8 18:30:59 2012 +0800

    Split each game into its own package
    
    This is part of:
        https://bugzilla.redhat.com/show_bug.cgi?id=846274

 gnome-games.spec |  680 +++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 520 insertions(+), 160 deletions(-)
---
diff --git a/gnome-games.spec b/gnome-games.spec
index 763df2c..26a8b78 100644
--- a/gnome-games.spec
+++ b/gnome-games.spec
@@ -31,7 +31,7 @@
 Summary: Games for the GNOME desktop
 Name: gnome-games
 Version: 3.5.5
-Release: 1%{?dist}
+Release: 2%{?dist}
 Epoch: 1
 License: GPLv2+ and GPLv3 and GFDL
 #VCS: git:git://git.gnome.org/gnome-games
@@ -77,41 +77,204 @@ BuildRequires: libSM-devel
 BuildRequires: itstool
 BuildRequires: yelp-tools
 
+%description
+The gnome-games package is a collection of some small "five-minute" games
+in a variety of styles and genres for the GNOME desktop.
+
+This only provides things common to all games. Each game should be installed
+individually.
+
+
+%package gnomine
+Summary: GNOME Mines Sweeper game
+Requires: %{name} = %{version}-%{release}
+
+%description gnomine
+The popular logic puzzle minesweeper. Find mines on a grid using hints from
+squares you have already cleared.
+
+
+%package iagno
+Summary: GNOME Reversi game.
+Requires: %{name} = %{version}-%{release}
+
+%description iagno
+The GNOME version of Reversi. The goal is to control the most disks on the
+board.
+
+
+%package swell-foop
+Summary: GNOME Swell-Foop game
+Requires: %{name} = %{version}-%{release}
+
+%description swell-foop
+"I want to play that game! You know, they all go whirly-round and you click on
+them and they vanish!" - Telsa.
+
 
+%if %{have_sudoku}
+%package sudoku
+Summary: GNOME Sudoku game.
+BuildArch: noarch
+Requires: %{name} = %{version}-%{release}
 Provides: gnome-sudoku = %{epoch}:%{version}-%{release}
 Obsoletes: gnome-sudoku < %{epoch}:%{version}-%{release}
 
+%description sudoku
+A logic game with a Japanese name that has recently exploded in popularity.
+%endif
+
+
+%package glchess
+Summary: GNOME Chess game
+Requires: %{name} = %{version}-%{release}
 Provides: glchess = %{epoch}:%{version}-%{release}
 Obsoletes: glchess < 2.0
 
+%description glchess
+A chess game which supports several chess engines, with 2D and optionally 3D
+support if OpenGL is present.
 
-%description
-The gnome-games package is a collection of some small "five-minute" games
-in a variety of styles and genres for the GNOME desktop.
 
+%package glines
+Summary: GNOME "Five or More" game
+Requires: %{name} = %{version}-%{release}
 
-%package extra
-Group: Amusements/Games
-Summary: More games for the GNOME desktop
-Requires: %{name} = %{epoch}:%{version}-%{release}
-Requires: pygtkglext
-Requires: PyOpenGL
-Requires: gnuchess
-Requires: gnome-python2-rsvg
+%description glines
+Move balls around the grid and try and form lines. Once you form five in a
+row, the line disappears. Unfortunately more balls keep dropping in.
 
-%description extra
-The gnome-games-extra package contains additional small "five-minute" games
-in a variety of styles and genres for the GNOME desktop.
+
+%package gnect
+Summary: GNOME "Four in a row" game
+Requires: %{name} = %{version}-%{release}
+
+%description gnect
+Place disks one at a time and try to form a row of four. Tic-tac-toe for those
+who like to think.
+
+
+%package gnibbles
+Summary: GNOME Nibbles game
+Requires: %{name} = %{version}-%{release}
+
+%description gnibbles
+Pilot a worm around a maze trying to collect diamonds and at the same time
+avoiding the walls and yourself. With each diamond your worm grows longer and
+navigation becomes more and more difficult. Playable by up to four people.
 
 
-%package help
-Group: Applications/Productivity
-Summary: Help files for %{name}
-Requires: %{name} = %{epoch}:%{version}-%{release}
+%package gnobots2
+Summary: GNOME Robots game
+Requires: %{name} = %{version}-%{release}
+
+%description gnobots2
+The classic game where you have to avoid a hoard of robots who are trying to
+kill you. Each step you take brings them closer toward you. Fortunately they
+aren't very smart and you also have a helpful teleportation gadget.
+
+
+%package mahjongg
+Summary: GNOME Mahjongg game
+Requires: %{name} = %{version}-%{release}
+
+%description mahjongg
+Mahjongg is a simple pattern recognition game. You score points by matching
+identical tiles.
+
+
+%package gnotravex
+Summary: GNOME Tetravex game
+Requires: %{name} = %{version}-%{release}
+
+%description gnotravex
+A puzzle game where you have to match a grid of tiles together. The skill
+level ranges from the simple two by two up to the seriously mind-bending six
+by six grid.
+
+
+%package gnotski
+Summary: GNOME Klotski game
+Requires: %{name} = %{version}-%{release}
+
+%description gnotski
+A series of sliding block puzzles. Try and solve them in the least number of
+moves.
+
+
+%if %{build_tali}
+%package gtali
+Summary: GNOME Tali game
+Requires: %{name} = %{version}-%{release}
+
+%description gtali
+Sort of poker with dice and less money. An ancient Roman game.
+%endif
+
+
+%package lightsoff
+Summary: GNOME Lightsoff game
+Requires: %{name} = %{version}-%{release}
+
+%description lightsoff
+A puzzle played on an 5X5 grid with the aim to turn off all the lights. Each
+click on a tile toggles the state of the clicked tile and its non-diagonal
+neighbors.
+
+
+%package quadrapassel
+Summary: GNOME falling blocks game
+Requires: %{name} = %{version}-%{release}
+
+%description quadrapassel
+The Russian game of falling geometric shapes.
+
+
+%package compat
+Summary: Compat package to help migrate to the new "one game per package" split
 BuildArch: noarch
 
-%description help
-This package contains user documentation for %{name}.
+# These help the transition (only require the gamnes which were in gnome-games)
+Obsoletes: %{name} < 3.5.5-2
+Obsoletes: %{name}-help < 3.5.5-2
+Requires: %{name}-gnomine = %{version}-%{release}
+Requires: %{name}-iagno = %{version}-%{release}
+Requires: %{name}-swell-foop = %{version}-%{release}
+%if %{have_sudoku}
+Requires: %{name}-sudoku = %{version}-%{release}
+%endif
+
+%description compat
+This package only exists to help transition gnome-games users to the new
+package split. It will be removed after one distribution release cycle, please
+do not reference it or depend on it in any way.
+
+
+%package extra-compat
+Summary: Compat package to help migrate to the new "one game per package" split
+BuildArch: noarch
+
+# These help the transition (only require the gamnes which were in gnome-games)
+Obsoletes: %{name}-extra < 3.5.5-2
+Requires: %{name}-glchess = %{version}-%{release}
+Requires: %{name}-glines = %{version}-%{release}
+Requires: %{name}-gnect = %{version}-%{release}
+Requires: %{name}-gnibbles = %{version}-%{release}
+Requires: %{name}-gnobots2 = %{version}-%{release}
+Requires: %{name}-gnotravex = %{version}-%{release}
+Requires: %{name}-gnotski = %{version}-%{release}
+%if %{build_tali}
+Requires: %{name}-gtali = %{version}-%{release}
+%endif
+Requires: %{name}-lightsoff = %{version}-%{release}
+Requires: %{name}-mahjongg = %{version}-%{release}
+Requires: %{name}-quadrapassel = %{version}-%{release}
+
+%description extra-compat
+This package only exists to help transition gnome-games-extra users to the new
+package split. It will be removed after one distribution release cycle, please
+do not reference it or depend on it in any way.
+
 
 %prep
 %setup -q
@@ -147,19 +310,13 @@ desktop-file-install --vendor gnome --delete-original       \
 rm -f $RPM_BUILD_ROOT%{_libdir}/gnome-games/libgames-support-gi.{l,}a
 
 %find_lang %{gettext_package} --all-name --with-gnome
+# Help files translation are split with each game
 grep "/usr/share/locale" %{gettext_package}.lang > translations.lang
-grep -v "/usr/share/locale" %{gettext_package}.lang > help-tmp.lang
-# not sure why sr at latin/figures is listed -- with other languages,
-# only ${LANG} is listed, and ${LANG}/figures is not
-grep -v "/sr at latin/figures" help-tmp.lang > help.lang
 
 
 %post
 touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
-%post extra
-touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
-
 %postun
 if [ $1 -eq 0 ]; then
   touch --no-create %{_datadir}/icons/hicolor &> /dev/null
@@ -167,196 +324,399 @@ if [ $1 -eq 0 ]; then
   glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
 fi
 
-%postun extra
+%posttrans
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
+
+%post gnomine
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun gnomine
 if [ $1 -eq 0 ]; then
   touch --no-create %{_datadir}/icons/hicolor &> /dev/null
   gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
   glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
 fi
 
-%posttrans
+%posttrans gnomine
 gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
 
-%posttrans extra
+%post iagno
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun iagno
+if [ $1 -eq 0 ]; then
+  touch --no-create %{_datadir}/icons/hicolor &> /dev/null
+  gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
+  glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
+fi
+
+%posttrans iagno
 gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
 
+%post swell-foop
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
-%files help -f help.lang
+%postun swell-foop
+if [ $1 -eq 0 ]; then
+  touch --no-create %{_datadir}/icons/hicolor &> /dev/null
+  gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
+  glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
+fi
 
-%files -f translations.lang
-%doc AUTHORS COPYING README
-%{_datadir}/applications/gnome-gnomine.desktop
-%{_datadir}/applications/gnome-iagno.desktop
-%if %{have_sudoku}
-%{_datadir}/applications/gnome-sudoku.desktop
-%endif
-%{_datadir}/applications/gnome-swell-foop.desktop
-# find-lang should find these
-%doc %{_datadir}/help/*/swell-foop
-%doc %{_datadir}/help/*/gnomine
-%doc %{_datadir}/help/*/iagno
-%doc %{_datadir}/help/*/gnome-sudoku
+%posttrans swell-foop
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
 
-%{_datadir}/iagno
 %if %{have_sudoku}
-%{_datadir}/gnome-sudoku
-%endif
+%post sudoku
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
-%{_datadir}/icons/hicolor/*/apps/iagno.png
-%{_datadir}/icons/hicolor/*/apps/gnomine.*
-%if %{have_sudoku}
-%{_datadir}/icons/hicolor/*/apps/gnome-sudoku.*
+%postun sudoku
+if [ $1 -eq 0 ]; then
+  touch --no-create %{_datadir}/icons/hicolor &> /dev/null
+  gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
+  glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
+fi
 %endif
-%{_datadir}/icons/hicolor/*/apps/swell-foop.*
 
-%verify(not md5 size mtime) %config(noreplace) %attr(664, games, games) /var/lib/games/gnomine.*
+%posttrans sudoku
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
 
-%if %{have_sudoku}
-%{python_sitelib}/gnome_sudoku
-%endif
+%post glchess
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
-# gsettings schemas
-%{_datadir}/glib-2.0/schemas/org.gnome.Games.WindowState.gschema.xml
-%{_datadir}/glib-2.0/schemas/org.gnome.gnomine.gschema.xml
-%{_datadir}/glib-2.0/schemas/org.gnome.iagno.gschema.xml
+%postun glchess
+if [ $1 -eq 0 ]; then
+  touch --no-create %{_datadir}/icons/hicolor &> /dev/null
+  gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
+  glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
+fi
 
-# these are not setgid games
-%if %{have_sudoku}
-%{_bindir}/gnome-sudoku
-%endif
+%posttrans glchess
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
 
-# these are setgid games
-%attr(2551, root, games) %{_bindir}/swell-foop
-%attr(2551, root, games) %{_bindir}/iagno
-%attr(2551, root, games) %{_bindir}/gnomine
+%post glines
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
-%{_mandir}/man6/iagno.6.gz
-%{_mandir}/man6/gnomine.6.gz
-%if %{have_sudoku}
-%{_mandir}/man6/gnome-sudoku.6.gz
-%endif
+%postun glines
+if [ $1 -eq 0 ]; then
+  touch --no-create %{_datadir}/icons/hicolor &> /dev/null
+  gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
+  glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
+fi
 
-%{_datadir}/gnomine
+%posttrans glines
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
 
-%{_datadir}/glib-2.0/schemas/org.gnome.gnome-sudoku.gschema.xml
-%{_datadir}/glib-2.0/schemas/org.gnome.swell-foop.gschema.xml
+%post gnect
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
-%verify(not md5 size mtime) %config(noreplace) %attr(664, games, games) /var/lib/games/swell-foop.*
+%postun gnect
+if [ $1 -eq 0 ]; then
+  touch --no-create %{_datadir}/icons/hicolor &> /dev/null
+  gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
+  glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
+fi
 
-%files extra
-%defattr(-, root, root)
+%posttrans gnect
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
 
-#%{python_sitelib}/glchess
-%{_datadir}/glchess
+%post gnibbles
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
-%{_datadir}/gnotravex
+%postun gnibbles
+if [ $1 -eq 0 ]; then
+  touch --no-create %{_datadir}/icons/hicolor &> /dev/null
+  gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
+  glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
+fi
 
-# gsettings schemas
-%{_datadir}/glib-2.0/schemas/org.gnome.glchess.gschema.xml
-%{_datadir}/glib-2.0/schemas/org.gnome.gnome-mahjongg.gschema.xml
-%{_datadir}/glib-2.0/schemas/org.gnome.glines.gschema.xml
+%posttrans gnibbles
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
 
+%post gnobots2
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
-# %{_datadir}/applications/gnome-freecell.desktop
-%{_datadir}/applications/gnome-glchess.desktop
-%{_datadir}/applications/gnome-glines.desktop
-%{_datadir}/applications/gnome-gnect.desktop
-%{_datadir}/applications/gnome-gnibbles.desktop
-%{_datadir}/applications/gnome-gnobots2.desktop
-%{_datadir}/applications/gnome-gnotravex.desktop
-%{_datadir}/applications/gnome-gnotski.desktop
-%{_datadir}/applications/gnome-gtali.desktop
-%{_datadir}/applications/gnome-lightsoff.desktop
-%{_datadir}/applications/gnome-mahjongg.desktop
-%{_datadir}/applications/gnome-quadrapassel.desktop
+%postun gnobots2
+if [ $1 -eq 0 ]; then
+  touch --no-create %{_datadir}/icons/hicolor &> /dev/null
+  gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
+  glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
+fi
 
-%{_mandir}/man6/glchess.6.gz
-%{_mandir}/man6/glines.6.gz
-%{_mandir}/man6/gnect.6.gz
-%{_mandir}/man6/gnibbles.6.gz
-%{_mandir}/man6/gnobots2.6.gz
-%{_mandir}/man6/quadrapassel.6.gz
-%{_mandir}/man6/gnotravex.6.gz
-%{_mandir}/man6/gnotski.6.gz
-%{_mandir}/man6/gtali.6.gz
-%{_mandir}/man6/gnome-mahjongg.6.gz
+%posttrans gnobots2
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
 
-%verify(not md5 size mtime) %config(noreplace) %attr(664, games, games) /var/lib/games/glines.*
-%verify(not md5 size mtime) %config(noreplace) %attr(664, games, games) /var/lib/games/gnibbles.*
-%verify(not md5 size mtime) %config(noreplace) %attr(664, games, games) /var/lib/games/quadrapassel.*
-%verify(not md5 size mtime) %config(noreplace) %attr(664, games, games) /var/lib/games/gnotravex.*
-%verify(not md5 size mtime) %config(noreplace) %attr(664, games, games) /var/lib/games/gnotski.*
-%verify(not md5 size mtime) %config(noreplace) %attr(664, games, games) /var/lib/games/gtali.*
-%verify(not md5 size mtime) %config(noreplace) %attr(664, games, games) /var/lib/games/gnome-mahjongg.*
-%verify(not md5 size mtime) %config(noreplace) %attr(664, games, games) /var/lib/games/gnobots2*
+%post gnotravex
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
+%postun gnotravex
+if [ $1 -eq 0 ]; then
+  touch --no-create %{_datadir}/icons/hicolor &> /dev/null
+  gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
+  glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
+fi
 
-# these are not setgid games
-%{_bindir}/gnect
-%{_bindir}/glchess
-%{_bindir}/lightsoff
+%posttrans gnotravex
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
+
+%post gnotski
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun gnotski
+if [ $1 -eq 0 ]; then
+  touch --no-create %{_datadir}/icons/hicolor &> /dev/null
+  gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
+  glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
+fi
+
+%posttrans gnotski
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
 
-# these are setgid games
-%attr(2551, root, games) %{_bindir}/gnome-mahjongg
 %if %{build_tali}
-%attr(2551, root, games) %{_bindir}/gtali
+%post gtali
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun gtali
+if [ $1 -eq 0 ]; then
+  touch --no-create %{_datadir}/icons/hicolor &> /dev/null
+  gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
+  glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
+fi
+
+%posttrans gtali
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
 %endif
-%attr(2551, root, games) %{_bindir}/gnobots2
-%attr(2551, root, games) %{_bindir}/quadrapassel
-%attr(2551, root, games) %{_bindir}/gnotravex
-%attr(2551, root, games) %{_bindir}/gnotski
-%attr(2551, root, games) %{_bindir}/gnibbles
-%attr(2551, root, games) %{_bindir}/glines
 
-%{_datadir}/glines
-%{_datadir}/gnect
-%{_datadir}/gnibbles
-%{_datadir}/gnobots2
-%{_datadir}/gnotski
-%{_datadir}/gtali
-%{_datadir}/gnome-mahjongg
-%{_datadir}/quadrapassel
-%{_datadir}/lightsoff
-%{_datadir}/swell-foop
+%post lightsoff
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun lightsoff
+if [ $1 -eq 0 ]; then
+  touch --no-create %{_datadir}/icons/hicolor &> /dev/null
+  gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
+  glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
+fi
+
+%posttrans lightsoff
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
+
+%post mahjongg
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
+%postun mahjongg
+if [ $1 -eq 0 ]; then
+  touch --no-create %{_datadir}/icons/hicolor &> /dev/null
+  gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
+  glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
+fi
+
+%posttrans mahjongg
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
+
+%post quadrapassel
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun quadrapassel
+if [ $1 -eq 0 ]; then
+  touch --no-create %{_datadir}/icons/hicolor &> /dev/null
+  gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
+  glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
+fi
+
+%posttrans quadrapassel
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
+
+
+%files -f translations.lang
+%{_datadir}/glib-2.0/schemas/org.gnome.Games.WindowState.gschema.xml
 %{_datadir}/icons/hicolor/*/actions/teleport*
+
+%files gnomine
+%doc AUTHORS COPYING README
+%{_datadir}/applications/gnome-gnomine.desktop
+%doc %{_datadir}/help/*/gnomine
+%{_datadir}/icons/hicolor/*/apps/gnomine.*
+%verify(not md5 size mtime) %config(noreplace) %attr(664, games, games) /var/lib/games/gnomine.*
+%{_datadir}/glib-2.0/schemas/org.gnome.gnomine.gschema.xml
+# this is a setgid game
+%attr(2551, root, games) %{_bindir}/gnomine
+%{_mandir}/man6/gnomine.6.gz
+%{_datadir}/gnomine
+
+%files iagno
+%doc AUTHORS COPYING README
+%{_datadir}/applications/gnome-iagno.desktop
+%doc %{_datadir}/help/*/iagno
+%{_datadir}/iagno
+%{_datadir}/icons/hicolor/*/apps/iagno.png
+%{_datadir}/glib-2.0/schemas/org.gnome.iagno.gschema.xml
+# this is a setgid game
+%attr(2551, root, games) %{_bindir}/iagno
+%{_mandir}/man6/iagno.6.gz
+
+%files swell-foop
+%doc AUTHORS COPYING README
+%{_datadir}/applications/gnome-swell-foop.desktop
+%doc %{_datadir}/help/*/swell-foop
+%{_datadir}/swell-foop
+%{_datadir}/icons/hicolor/*/apps/swell-foop.*
+# this is a setgid game
+%attr(2551, root, games) %{_bindir}/swell-foop
+%{_datadir}/glib-2.0/schemas/org.gnome.swell-foop.gschema.xml
+%verify(not md5 size mtime) %config(noreplace) %attr(664, games, games) /var/lib/games/swell-foop.*
+
+%if %{have_sudoku}
+%files sudoku
+%doc AUTHORS COPYING README
+%{_datadir}/applications/gnome-sudoku.desktop
+%doc %{_datadir}/help/*/gnome-sudoku
+%{_datadir}/gnome-sudoku
+%{_datadir}/icons/hicolor/*/apps/gnome-sudoku.*
+%{python_sitelib}/gnome_sudoku
+%{_bindir}/gnome-sudoku
+%{_mandir}/man6/gnome-sudoku.6.gz
+%{_datadir}/glib-2.0/schemas/org.gnome.gnome-sudoku.gschema.xml
+%endif
+
+%files glchess
+#%{python_sitelib}/glchess
+%{_datadir}/glchess
+%{_datadir}/glib-2.0/schemas/org.gnome.glchess.gschema.xml
+%{_datadir}/applications/gnome-glchess.desktop
+%{_mandir}/man6/glchess.6.gz
+%{_bindir}/glchess
 %{_datadir}/icons/hicolor/*/apps/glchess.*
+%{_datadir}/help/*/glchess
+
+%files glines
+%{_datadir}/glib-2.0/schemas/org.gnome.glines.gschema.xml
+%{_datadir}/applications/gnome-glines.desktop
+%{_mandir}/man6/glines.6.gz
+%verify(not md5 size mtime) %config(noreplace) %attr(664, games, games) /var/lib/games/glines.*
+# this is a setgid game
+%attr(2551, root, games) %{_bindir}/glines
+%{_datadir}/glines
 %{_datadir}/icons/hicolor/*/apps/glines.*
+%{_datadir}/help/*/glines
+
+%files gnect
+%{_datadir}/applications/gnome-gnect.desktop
+%{_mandir}/man6/gnect.6.gz
+%{_bindir}/gnect
+%{_datadir}/gnect
 %{_datadir}/icons/hicolor/*/apps/gnect.*
+%{_datadir}/glib-2.0/schemas/org.gnome.gnect.gschema.xml
+%{_datadir}/help/*/gnect
+
+%files gnibbles
+%{_datadir}/applications/gnome-gnibbles.desktop
+%{_mandir}/man6/gnibbles.6.gz
+%verify(not md5 size mtime) %config(noreplace) %attr(664, games, games) /var/lib/games/gnibbles.*
+# this is a setgid game
+%attr(2551, root, games) %{_bindir}/gnibbles
+%{_datadir}/gnibbles
 %{_datadir}/icons/hicolor/*/apps/gnibbles.*
+%{_datadir}/glib-2.0/schemas/org.gnome.gnibbles.gschema.xml
+%{_datadir}/help/*/gnibbles
+
+%files gnobots2
+%{_datadir}/applications/gnome-gnobots2.desktop
+%{_mandir}/man6/gnobots2.6.gz
+%verify(not md5 size mtime) %config(noreplace) %attr(664, games, games) /var/lib/games/gnobots2*
+# this is a setgid game
+%attr(2551, root, games) %{_bindir}/gnobots2
+%{_datadir}/gnobots2
 %{_datadir}/icons/hicolor/*/apps/gnobots2.*
-%{_datadir}/icons/hicolor/*/apps/gnotravex.*
-%{_datadir}/icons/hicolor/*/apps/gnotski.*
-%{_datadir}/icons/hicolor/*/apps/gtali.*
-%{_datadir}/icons/hicolor/*/apps/gnome-mahjongg.*
-%{_datadir}/icons/hicolor/*/apps/quadrapassel.*
-%{_datadir}/icons/hicolor/*/apps/lightsoff.*
+%{_datadir}/glib-2.0/schemas/org.gnome.gnobots2.gschema.xml
+%{_datadir}/help/*/gnobots2
 
-# gsettings schemas
+%files gnotravex
+%{_datadir}/gnotravex
+%{_datadir}/applications/gnome-gnotravex.desktop
+%{_mandir}/man6/gnotravex.6.gz
+%verify(not md5 size mtime) %config(noreplace) %attr(664, games, games) /var/lib/games/gnotravex.*
+# this is a setgid game
+%attr(2551, root, games) %{_bindir}/gnotravex
+%{_datadir}/icons/hicolor/*/apps/gnotravex.*
 %{_datadir}/glib-2.0/schemas/org.gnome.gnotravex.gschema.xml
-%{_datadir}/glib-2.0/schemas/org.gnome.gnect.gschema.xml
-%{_datadir}/glib-2.0/schemas/org.gnome.gnibbles.gschema.xml
-%{_datadir}/glib-2.0/schemas/org.gnome.gnobots2.gschema.xml
+%{_datadir}/help/*/gnotravex
+
+%files gnotski
+%{_datadir}/applications/gnome-gnotski.desktop
+%{_mandir}/man6/gnotski.6.gz
+%verify(not md5 size mtime) %config(noreplace) %attr(664, games, games) /var/lib/games/gnotski.*
+# this is a setgid game
+%attr(2551, root, games) %{_bindir}/gnotski
+%{_datadir}/gnotski
+%{_datadir}/icons/hicolor/*/apps/gnotski.*
 %{_datadir}/glib-2.0/schemas/org.gnome.gnotski.gschema.xml
+%{_datadir}/help/*/gnotski
+
+%if %{build_tali}
+%files gtali
+%{_datadir}/applications/gnome-gtali.desktop
+%{_mandir}/man6/gtali.6.gz
+%verify(not md5 size mtime) %config(noreplace) %attr(664, games, games) /var/lib/games/gtali.*
+# this is a setgid game
+%attr(2551, root, games) %{_bindir}/gtali
+%{_datadir}/gtali
+%{_datadir}/icons/hicolor/*/apps/gtali.*
 %{_datadir}/glib-2.0/schemas/org.gnome.gtali.gschema.xml
-%{_datadir}/glib-2.0/schemas/org.gnome.quadrapassel.gschema.xml
+%{_datadir}/help/*/gtali
+%endif
+
+%files lightsoff
+%{_datadir}/applications/gnome-lightsoff.desktop
+%{_bindir}/lightsoff
+%{_datadir}/lightsoff
+%{_datadir}/icons/hicolor/*/apps/lightsoff.*
 %{_datadir}/glib-2.0/schemas/org.gnome.lightsoff.gschema.xml
+%{_datadir}/help/*/lightsoff
 
-%{_datadir}/help/*/glchess
-%{_datadir}/help/*/glines
-%{_datadir}/help/*/gnect
-%{_datadir}/help/*/gnibbles
-%{_datadir}/help/*/gnobots2
-%{_datadir}/help/*/gnotravex
-%{_datadir}/help/*/gnotski
-%{_datadir}/help/*/gtali
+%files mahjongg
+%{_datadir}/glib-2.0/schemas/org.gnome.gnome-mahjongg.gschema.xml
+%{_datadir}/applications/gnome-mahjongg.desktop
+%{_mandir}/man6/gnome-mahjongg.6.gz
+%verify(not md5 size mtime) %config(noreplace) %attr(664, games, games) /var/lib/games/gnome-mahjongg.*
+# this is a setgid game
+%attr(2551, root, games) %{_bindir}/gnome-mahjongg
+%{_datadir}/gnome-mahjongg
+%{_datadir}/icons/hicolor/*/apps/gnome-mahjongg.*
 %{_datadir}/help/*/gnome-mahjongg
+
+%files quadrapassel
+%{_datadir}/applications/gnome-quadrapassel.desktop
+%{_mandir}/man6/quadrapassel.6.gz
+%verify(not md5 size mtime) %config(noreplace) %attr(664, games, games) /var/lib/games/quadrapassel.*
+# this is a setgid game
+%attr(2551, root, games) %{_bindir}/quadrapassel
+%{_datadir}/quadrapassel
+%{_datadir}/icons/hicolor/*/apps/quadrapassel.*
+%{_datadir}/glib-2.0/schemas/org.gnome.quadrapassel.gschema.xml
 %{_datadir}/help/*/quadrapassel
-%{_datadir}/help/*/lightsoff
+
 
 %changelog
+* Wed Aug 08 2012 Mathieu Bridon <bochecha at fedoraproject.org> - 1:3.5.5-2
+- Split each game and its help into its own subpackage.
+  https://bugzilla.redhat.com/show_bug.cgi?id=846274
+
 * Tue Aug 07 2012 Richard Hughes <hughsient at gmail.com> - 1:3.5.5-1
 - Update to 3.5.5
 


More information about the scm-commits mailing list