From Fedora Project Wiki

< SIGs‎ | KDE‎ | Meetings‎ | 2010-01-19

Proposal of a split of kdegames

kdegames should be split into a main package with only a few games (5 max) and a -extra subpkg with the rest of the games. This was also proposed by upstream: http://websvn.kde.org/trunk/KDE/kdegames/README.PACKAGERS?revision=885625&view=markup

Why?

The current kdegames package is quite big (~59M) and contains many games (34). The space on the live images is limited (as usual) and would benefit from the additional free'd space when excluding kdegames-extra.

The main package would contain these games (the chosen games needs to be discussed):

  • kfourinline
  • kmahjongg
  • kmines
  • kpat
  • ksudoku

The additional kdegames-extra subpackage would contain the rest of the games:

  • bomber
  • bovo
  • kapman
  • katomic
  • kblackbox
  • kblocks
  • kbounce
  • kbreakout
  • kdiamond
  • kgoldrunner
  • killbots
  • kiriki
  • kjumpingcube
  • klines
  • knetwalk
  • kolf
  • kollision
  • konquest
  • kreversi
  • ksame
  • kshisen
  • ksinkships
  • ksirk
  • kspaceduel
  • ksquares
  • ktron
  • ktuberling
  • kubrick
  • lskat

Result

https://fedoraproject.org/w/index.php?title=SebastianVahl/CurrentPackageList&oldid=146591

16M     repo/i386/kdegames-4.3.90-2.fc13.i686.rpm
67M     repo/i386/kdegames-4.3.90-2.fc13.src.rpm
27M     repo/i386/kdegames-debuginfo-4.3.90-2.fc13.i686.rpm
148K    repo/i386/kdegames-devel-4.3.90-2.fc13.i686.rpm
44M     repo/i386/kdegames-extra-4.3.90-2.fc13.i686.rpm
1,1M    repo/i386/kdegames-libs-4.3.90-2.fc13.i686.rpm


Patch

--- kdegames.spec	2010-01-19 14:16:45.065136754 +0100
+++ kdegames.spec.new	2010-01-19 14:16:22.930134636 +0100
@@ -3,7 +3,7 @@
 Summary: KDE Games
 Epoch:   6
 Version: 4.3.90
-Release: 1%{?dist}
+Release: 2%{?dist}
 
 License: GPLv2
 URL:     http://www.kde.org/
@@ -42,14 +42,19 @@
 %{?_kde4_macros_api:Requires: kde4-macros(api) = %{_kde4_macros_api} }
 Requires: %{name}-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
 
-%if "%{?_ggz_version}" < "0.99.5"
-%define _skip_ggzconfig -DSKIP_GGZCONFIG=1
-Requires(post): ggz-client-libs
-Requires(preun): ggz-client-libs
-%endif
-
 %description
 Games for KDE 4, including:
+* kfourinline
+* kmahjongg
+* kmines
+* kpat
+* ksudoku
+
+%package extra
+Summary: Additional KDE games 
+Requires: %{name}-%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
+%description extra
+Additional games for KDE 4, including:
 * bomber
 * bovo
 * granatier
@@ -60,20 +65,16 @@
 * kbounce
 * kbreakout
 * kdiamond
-* kfourinline
 * kgoldrunner
 * kigo
 * killbots
 * kiriki
 * kjumpingcube
 * klines
-* kmahjongg
-* kmines
 * knetwalk
 * kolf
 * kollision
 * konquest
-* kpat
 * kreversi
 * ksame
 * kshisen
@@ -84,12 +85,17 @@
 %endif
 * kspaceduel
 * ksquares
-* ksudoku
 * ktuberling
 * kubrick
 * lskat
 * palapeli
 
+%if "%{?_ggz_version}" < "0.99.5"
+%define _skip_ggzconfig -DSKIP_GGZCONFIG=1
+Requires(post): ggz-client-libs
+Requires(preun): ggz-client-libs
+%endif
+
 %package libs
 Summary: Runtime libraries for %{name}
 Group:   System Environment/Libraries
@@ -153,6 +159,12 @@
 
 
 %post
+touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null || :
+touch --no-create %{_kde4_iconsdir}/locolor &> /dev/null || :
+touch --no-create %{_kde4_iconsdir}/oxygen &> /dev/null || :
+update-mime-database %{_datadir}/mime &> /dev/null || :
+
+%post extra
 %if 0%{?_skip_ggzconfig:1}
 %if 0%{?fedora}
 %{_ggz_config} --install --force --modfile=%{_ggz_datadir}/kbattleship.dsc ||:
@@ -171,6 +183,12 @@
 gtk-update-icon-cache %{_kde4_iconsdir}/oxygen &> /dev/null || :
 update-desktop-database -q &> /dev/null ||:
 
+%posttrans extra
+gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || :
+gtk-update-icon-cache %{_kde4_iconsdir}/locolor &> /dev/null || :
+gtk-update-icon-cache %{_kde4_iconsdir}/oxygen &> /dev/null || :
+update-desktop-database -q &> /dev/null ||:
+
 %postun
 update-mime-database %{_datadir}/mime &> /dev/null || :
 if [ $1 -eq 0 ] ; then
@@ -183,6 +201,18 @@
 update-desktop-database -q &> /dev/null ||:
 fi
 
+%postun extra
+update-mime-database %{_datadir}/mime &> /dev/null || :
+if [ $1 -eq 0 ] ; then
+touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null || :
+touch --no-create %{_kde4_iconsdir}/locolor &> /dev/null || :
+touch --no-create %{_kde4_iconsdir}/oxygen &> /dev/null || :
+gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || :
+gtk-update-icon-cache %{_kde4_iconsdir}/locolor &> /dev/null || :
+gtk-update-icon-cache %{_kde4_iconsdir}/oxygen &> /dev/null || :
+update-desktop-database -q &> /dev/null ||:
+fi
+
 %if 0%{?_skip_ggzconfig:1}
 %preun
 if [ $1 -eq 0 ]; then
@@ -206,6 +236,88 @@
 %files
 %defattr(-,root,root,-)
 %doc AUTHORS README
+%{_kde4_appsdir}/carddecks/
+%{_kde4_appsdir}/kdegames/
+# kfourinline
+%{_kde4_bindir}/kfourinline*
+%{_kde4_appsdir}/kfourinline/
+%{_kde4_datadir}/applications/kde4/kfourinline.desktop
+%{_kde4_datadir}/config.kcfg/kwin4.kcfg
+%{_kde4_docdir}/HTML/en/kfourinline/
+%{_kde4_iconsdir}/hicolor/*/*/kfourinline.*
+# kmahjongg
+%{_kde4_bindir}/kmahjongg
+%{_kde4_appsdir}/kmahjongg/
+%{_kde4_appsdir}/kmahjongglib/
+%{_kde4_datadir}/applications/kde4/kmahjongg.desktop
+%{_kde4_datadir}/config.kcfg/kmahjongg.kcfg
+%{_kde4_docdir}/HTML/en/kmahjongg
+%{_kde4_iconsdir}/hicolor/*/*/kmahjongg.*
+# kmines
+%{_kde4_bindir}/kmines
+%{_kde4_appsdir}/kmines/
+%{_kde4_configdir}/kmines.knsrc
+%{_kde4_datadir}/applications/kde4/kmines.desktop
+%{_kde4_docdir}/HTML/en/kmines/
+%{_kde4_iconsdir}/hicolor/*/*/kmines.*
+#kpat
+%{_kde4_bindir}/kpat
+%{_kde4_appsdir}/kconf_update/kpat_update_cardwidth.upd
+%{_kde4_appsdir}/kpat/
+%{_kde4_datadir}/applications/kde4/kpat.desktop
+%{_kde4_docdir}/HTML/en/kpat/
+%{_kde4_iconsdir}/hicolor/*/*/kpat.*
+# ksudoku
+%{_kde4_bindir}/ksudoku
+%{_kde4_appsdir}/ksudoku/
+%{_kde4_configdir}/ksudokurc
+%{_kde4_datadir}/applications/kde4/ksudoku.desktop
+%{_kde4_docdir}/HTML/en/ksudoku/
+%{_kde4_iconsdir}/hicolor/*/*/ksudoku.*
+
+
+%files extra
+%defattr(-,root,root,-)
+%doc AUTHORS README
+%exclude %{_kde4_appsdir}/carddecks/
+%exclude %{_kde4_appsdir}/kdegames/
+# kfourinline
+%exclude %{_kde4_bindir}/kfourinline*
+%exclude %{_kde4_appsdir}/kfourinline/
+%exclude %{_kde4_datadir}/applications/kde4/kfourinline.desktop
+%exclude %{_kde4_datadir}/config.kcfg/kwin4.kcfg
+%exclude %{_kde4_docdir}/HTML/en/kfourinline/
+%exclude %{_kde4_iconsdir}/hicolor/*/*/kfourinline.*
+# kmahjongg
+%exclude %{_kde4_bindir}/kmahjongg
+%exclude %{_kde4_appsdir}/kmahjongg/
+%exclude %{_kde4_appsdir}/kmahjongglib/
+%exclude %{_kde4_datadir}/applications/kde4/kmahjongg.desktop
+%exclude %{_kde4_datadir}/config.kcfg/kmahjongg.kcfg
+%exclude %{_kde4_docdir}/HTML/en/kmahjongg
+%exclude %{_kde4_iconsdir}/hicolor/*/*/kmahjongg.*
+# kmines
+%exclude %{_kde4_bindir}/kmines
+%exclude %{_kde4_appsdir}/kmines/
+%exclude %{_kde4_configdir}/kmines.knsrc
+%exclude %{_kde4_datadir}/applications/kde4/kmines.desktop
+%exclude %{_kde4_docdir}/HTML/en/kmines/
+%exclude %{_kde4_iconsdir}/hicolor/*/*/kmines.*
+#kpat
+%exclude %{_kde4_bindir}/kpat
+%exclude %{_kde4_appsdir}/kconf_update/kpat_update_cardwidth.upd
+%exclude %{_kde4_appsdir}/kpat/
+%exclude %{_kde4_datadir}/applications/kde4/kpat.desktop
+%exclude %{_kde4_docdir}/HTML/en/kpat/
+%exclude %{_kde4_iconsdir}/hicolor/*/*/kpat.*
+# ksudoku
+%exclude %{_kde4_bindir}/ksudoku
+%exclude %{_kde4_appsdir}/ksudoku/
+%exclude %{_kde4_configdir}/ksudokurc
+%exclude %{_kde4_datadir}/applications/kde4/ksudoku.desktop
+%exclude %{_kde4_docdir}/HTML/en/ksudoku/
+%exclude %{_kde4_iconsdir}/hicolor/*/*/ksudoku.*
+
 %{_kde4_bindir}/*
 %{_kde4_appsdir}/*
 %exclude %{_kde4_appsdir}/cmake/
@@ -248,6 +360,10 @@
 
 
 %changelog
+* Tue Jan 19 2010 Sebastian Vahl <svahl@fedoraproject.org> - 4.3.90-2
+- split kdegames into a main packages with only a few games
+  and an -extra subpkg with additional games
+
 * Wed Jan 06 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.3.90-1
 - kde-4.3.90 (4.4rc1)