File kdegames3.spec of Package kdegames3

#
# spec file for package kdegames3 (Version 3.5.10)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/

Name:           kdegames3
BuildRequires:  kdelibs3-devel
License:        GPL-2.0+
Group:          System/GUI/KDE
Summary:        Games for KDE
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Version:        3.5.10
Release:        1
Url:            http://www.kde.org
Source:         kdegames-%{version}.tar.bz2
Patch0:         3_5_BRANCH.diff
Patch1:         kdegames-trinity-fix-highscore.diff

%description
The base libraries for kdegames as well as the games Solitaire and
Minesweeper. The other games are in:

kdegames3-arcade kdegames3-board kdegames3-card kdegames3-tactic

%package arcade
License:        GPL-2.0+
# usesubdirs kasteroids ksirtet ksmiletris ksnake kspaceduel ktron kbounce ktuberling kolf kfouleggs
Provides:       kdegames3:/opt/kde3/bin/ktron
Summary:        Arcade games for KDE
Group:          Amusements/Games/Action/Arcade

%description arcade
Several arcade style games. Hunting asteroids, the famous Tetris, and
Tron are just an example of what is included.

%package board
License:        GPL-2.0+
# usesubdirs atlantik kbackgammon kbattleship kblackbox kenolaba kmahjongg kreversi kshisen kwin4 klickety
Provides:       kdegames3:/opt/kde3/bin/kmahjongg
Provides:       kdegames3-card:/opt/kde3/bin/klickety
Summary:        KDE board games
Group:          Amusements/Games/Board/Other

%description board
Board games like Backgammon, battleship, Mahjongg, and 4 wins.

%package card
License:        GPL-2.0+
# usesubdirs megami kpoker lskat
Provides:       kdegames3:/opt/kde3/bin/kpat
Summary:        Card games for KDE
Group:          Amusements/Games/Board/Card

%description card
Card games for KDE. Poker and Skat.

%package tactic
License:        GPL-2.0 and GPL-2.0+
# usesubdirs katomic kjumpingcube klines konquest ksame ksokoban
Provides:       kdegames3:/opt/kde3/bin/ksame
Summary:        Tactic and logic games for KDE
Group:          Amusements/Games/Strategy/Other

%description tactic
Famous games for the time you should spend working: Sokoban, Same, and
more.

%package devel
License:        GPL-2.0+
Summary:        Games for KDE: Build Environment
Group:          Amusements/Games/Other
Requires:       kdegames3 = %{version} kdegames3-arcade kdegames3-board kdelibs3-devel

%description devel
This package contains all necessary include files needed to develop
applications that require these.

%prep
%setup -n kdegames-%{version} -q
%patch0
%patch1 -p1
. /etc/opt/kde3/common_options
update_admin

%build
. /etc/opt/kde3/common_options
export CXXFLAGS="$CXXFLAGS -Wl,--add-needed"
./configure $configkde --disable-setgid
#--enable-highscore-dir=/var/games
make %{?jobs:-j%jobs}

%install
. /etc/opt/kde3/common_options
make DESTDIR=$RPM_BUILD_ROOT $INSTALL_TARGET
%suse_update_desktop_file -r kasteroids      Game ArcadeGame
%suse_update_desktop_file -r KGoldrunner     Game ArcadeGame
%suse_update_desktop_file -r ksnake          Game ArcadeGame
%suse_update_desktop_file -r kspaceduel      Game ArcadeGame
%suse_update_desktop_file -r ktron           Game ArcadeGame
%suse_update_desktop_file -r kfouleggs       Game BlocksGame
%suse_update_desktop_file -r ksirtet         Game BlocksGame
%suse_update_desktop_file -r klickety        Game BoardGame
%suse_update_desktop_file -r ksmiletris      Game BlocksGame
%suse_update_desktop_file -r ktuberling      Game KidsGame
%suse_update_desktop_file -r atlantik        Game BoardGame
%suse_update_desktop_file -r kbackgammon     Game BoardGame
%suse_update_desktop_file -r kbattleship     Game BoardGame
%suse_update_desktop_file -r kblackbox       Game BoardGame
%suse_update_desktop_file -r kenolaba        Game BoardGame
%suse_update_desktop_file -r kmahjongg       Game BoardGame
%suse_update_desktop_file -r kreversi        Game BoardGame
%suse_update_desktop_file -r kshisen         Game BoardGame
%suse_update_desktop_file -r kwin4           Game BoardGame
%suse_update_desktop_file -r kpat            Game CardGame
%suse_update_desktop_file -r kpoker          Game CardGame
%suse_update_desktop_file -r lskat           Game CardGame
%suse_update_desktop_file -r katomic         Game LogicGame
%suse_update_desktop_file -r kjumpingcube    Game LogicGame
%suse_update_desktop_file -r klines          Game LogicGame
%suse_update_desktop_file -r -G "Tactical Game" knetwalk Game LogicGame
%suse_update_desktop_file -r kmines          Game LogicGame
%suse_update_desktop_file -r konquest        Game LogicGame
%suse_update_desktop_file -r ksame           Game LogicGame
%suse_update_desktop_file -r ksokoban        Game LogicGame
%suse_update_desktop_file -r kbounce         Game LogicGame
%suse_update_desktop_file -r kolf            Game SportsGame
kde_post_install

%post
%run_ldconfig

%post arcade
%run_ldconfig

%post board
%run_ldconfig

%postun
%run_ldconfig

%postun arcade
%run_ldconfig

%postun board
%run_ldconfig

%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog README
%dir /opt/kde3/share/icons/*/*
%dir /opt/kde3/share/icons/*/*/*
%dir /opt/kde3/share/config.kcfg
/opt/kde3/bin/kpat
/opt/kde3/bin/kmines
/opt/kde3/share/applications/kde/kmines.desktop
/opt/kde3/share/applications/kde/kpat.desktop
/opt/kde3/%_lib/libkdegames.so.*
/opt/kde3/share/apps/carddecks
/opt/kde3/share/apps/kdegames
/opt/kde3/share/apps/kmines
/opt/kde3/share/apps/kpat
%doc %lang(en) /opt/kde3/share/doc/HTML/en/kmines
%doc %lang(en) /opt/kde3/share/doc/HTML/en/kpat
/opt/kde3/share/icons/*/*/*/endturn.*
/opt/kde3/share/icons/*/*/*/highscore.*
/opt/kde3/share/icons/*/*/*/kmines.*
/opt/kde3/share/icons/*/*/*/kpat.*
/opt/kde3/share/icons/*/*/*/roll.*

%files arcade
%defattr(-,root,root)
/opt/kde3/bin/kasteroids
/opt/kde3/bin/kbounce
/opt/kde3/bin/kolf
/opt/kde3/bin/kgoldrunner
/opt/kde3/bin/ksirtet
/opt/kde3/bin/ksmiletris
/opt/kde3/bin/ksnake
/opt/kde3/bin/kspaceduel
/opt/kde3/bin/kt*
/opt/kde3/bin/kfouleggs
/opt/kde3/%_lib/kde3/kolf.*
/opt/kde3/%_lib/libkolf.so.*
/opt/kde3/%_lib/libkdeinit_kolf.*
/opt/kde3/share/applications/kde/KGoldrunner.desktop
/opt/kde3/share/applications/kde/kasteroids.desktop
/opt/kde3/share/applications/kde/kbounce.desktop
/opt/kde3/share/applications/kde/kolf.desktop
/opt/kde3/share/applications/kde/ksirtet.desktop
/opt/kde3/share/applications/kde/ksmiletris.desktop
/opt/kde3/share/applications/kde/ksnake.desktop
/opt/kde3/share/applications/kde/kspaceduel.desktop
/opt/kde3/share/applications/kde/ktron.desktop
/opt/kde3/share/applications/kde/ktuberling.desktop
/opt/kde3/share/applications/kde/kfouleggs.desktop
/opt/kde3/share/apps/kgoldrunner
/opt/kde3/share/apps/kfouleggs
/opt/kde3/share/apps/kasteroids
/opt/kde3/share/apps/kbounce
/opt/kde3/share/apps/kolf
/opt/kde3/share/apps/ksirtet
/opt/kde3/share/apps/ksmiletris
/opt/kde3/share/apps/ksnake
/opt/kde3/share/apps/kspaceduel
/opt/kde3/share/apps/ktron
/opt/kde3/share/apps/ktuberling
%config /opt/kde3/share/config/magic
/opt/kde3/share/config.kcfg/kasteroids.kcfg
/opt/kde3/share/config.kcfg/ktron.kcfg
/opt/kde3/share/config.kcfg/kjumpingcube.kcfg
/opt/kde3/share/config.kcfg/kfouleggs.kcfg
/opt/kde3/share/config.kcfg/ksirtet.kcfg
/opt/kde3/share/config.kcfg/kspaceduel.kcfg
/opt/kde3/share/config.kcfg/ksnake.kcfg
/opt/kde3/share/mimelnk/application/x-tuberling.desktop
/opt/kde3/share/icons/*/*/*/kasteroids.*
/opt/kde3/share/icons/*/*/*/kbounce.*
/opt/kde3/share/icons/*/*/*/kgoldrunner.*
/opt/kde3/share/icons/*/*/*/kolf.*
/opt/kde3/share/icons/*/*/*/ksirtet.*
/opt/kde3/share/icons/*/*/*/ksmiletris.*
/opt/kde3/share/icons/*/*/*/ksnake.*
/opt/kde3/share/icons/*/*/*/kspaceduel.*
/opt/kde3/share/icons/*/*/*/ktron.*
/opt/kde3/share/icons/*/*/*/ktuberling.*
/opt/kde3/share/icons/*/*/*/kfouleggs.*
/opt/kde3/share/mimelnk/application/x-ko*
%doc /opt/kde3/share/doc/HTML/en/kasteroids
%doc /opt/kde3/share/doc/HTML/en/kbounce
%doc /opt/kde3/share/doc/HTML/en/kfouleggs
%doc /opt/kde3/share/doc/HTML/en/kjumpingcube
%doc /opt/kde3/share/doc/HTML/en/kolf
%doc /opt/kde3/share/doc/HTML/en/ksirtet
%doc /opt/kde3/share/doc/HTML/en/ksnake
%doc /opt/kde3/share/doc/HTML/en/kspaceduel
%doc /opt/kde3/share/doc/HTML/en/ktron
%doc /opt/kde3/share/doc/HTML/en/ktuberling
%doc /opt/kde3/share/doc/HTML/en/kgoldrunner
%doc /opt/kde3/share/doc/HTML/en/ksmiletris

%files board
%defattr(-,root,root)
%dir /opt/kde3/share/apps/zeroconf
/opt/kde3/bin/atlantik
/opt/kde3/bin/kba*
/opt/kde3/bin/kblackbox
/opt/kde3/bin/kenolaba
/opt/kde3/bin/kmahjongg
/opt/kde3/bin/kreversi
/opt/kde3/bin/kshisen
/opt/kde3/bin/kwin4*
/opt/kde3/bin/klickety
/opt/kde3/%_lib/kde3/kio_atlantik.*
/opt/kde3/%_lib/libatlantikui.so.*
/opt/kde3/%_lib/libatlantikclient.so.*
/opt/kde3/%_lib/libatlantic.so.*
/opt/kde3/share/applications/kde/atlantik.desktop
/opt/kde3/share/applications/kde/kbackgammon.desktop
/opt/kde3/share/applications/kde/kbattleship.desktop
/opt/kde3/share/applications/kde/kblackbox.desktop
/opt/kde3/share/applications/kde/kenolaba.desktop
/opt/kde3/share/applications/kde/kmahjongg.desktop
/opt/kde3/share/applications/kde/kreversi.desktop
/opt/kde3/share/applications/kde/kshisen.desktop
/opt/kde3/share/applications/kde/kwin4.desktop
/opt/kde3/share/applications/kde/klickety.desktop
/opt/kde3/share/apps/atlantik
/opt/kde3/share/apps/kba*
/opt/kde3/share/apps/kblackbox
/opt/kde3/share/apps/kenolaba
/opt/kde3/share/apps/kmahjongg
/opt/kde3/share/apps/kreversi
/opt/kde3/share/apps/kshisen
/opt/kde3/share/apps/kwin4
/opt/kde3/share/apps/klickety
/opt/kde3/share/config.kcfg/kmahjongg.kcfg
/opt/kde3/share/config.kcfg/kreversi.kcfg
/opt/kde3/share/config.kcfg/kshisen.kcfg
/opt/kde3/share/config.kcfg/kwin4.kcfg
/opt/kde3/share/icons/*/*/*/atlantik.*
/opt/kde3/share/icons/*/*/*/kbackgammon.*
/opt/kde3/share/icons/*/*/*/kbackgammon_engine.*
/opt/kde3/share/icons/*/*/*/kbattleship.*
/opt/kde3/share/icons/*/*/*/kblackbox.*
/opt/kde3/share/icons/*/*/*/kenolaba.*
/opt/kde3/share/icons/*/*/*/kmahjongg.*
/opt/kde3/share/icons/*/*/*/kreversi.*
/opt/kde3/share/icons/*/*/*/kshisen.*
/opt/kde3/share/icons/*/*/*/kwin4.*
/opt/kde3/share/icons/*/*/*/klickety.*
/opt/kde3/share/icons/*/*/*/lastmoves*
/opt/kde3/share/icons/*/*/*/legalmoves*
/opt/kde3/share/services/atlantik.protocol
/opt/kde3/share/apps/zeroconf/_kbattleship._tcp
%doc %lang(en) /opt/kde3/share/doc/HTML/en/atlantik
%doc /opt/kde3/share/doc/HTML/en/kbackgammon
%doc /opt/kde3/share/doc/HTML/en/kbattleship
%doc /opt/kde3/share/doc/HTML/en/kblackbox
%doc /opt/kde3/share/doc/HTML/en/kenolaba
%doc /opt/kde3/share/doc/HTML/en/kreversi
%doc /opt/kde3/share/doc/HTML/en/klickety
%doc /opt/kde3/share/doc/HTML/en/kshisen
%doc /opt/kde3/share/doc/HTML/en/kwin4
%doc /opt/kde3/share/doc/HTML/en/kmahjongg

%files card
%defattr(-,root,root)
/opt/kde3/bin/kpoker
/opt/kde3/bin/lskat*
/opt/kde3/share/applications/kde/kpoker.desktop
/opt/kde3/share/applications/kde/lskat.desktop
/opt/kde3/share/apps/kpoker
/opt/kde3/share/apps/lskat
/opt/kde3/share/icons/*/*/*/kpoker.*
/opt/kde3/share/icons/*/*/*/lskat.*
%doc %lang(en) /opt/kde3/share/doc/HTML/en/kpoker
%doc %lang(en) /opt/kde3/share/doc/HTML/en/lskat

%files tactic
%defattr(-,root,root)
/opt/kde3/bin/katomic
/opt/kde3/bin/kjumpingcube
/opt/kde3/bin/klines
/opt/kde3/bin/konquest
/opt/kde3/bin/ksame
/opt/kde3/bin/ksokoban
/opt/kde3/share/applications/kde/katomic.desktop
/opt/kde3/share/applications/kde/kjumpingcube.desktop
/opt/kde3/share/applications/kde/klines.desktop
/opt/kde3/share/applications/kde/konquest.desktop
/opt/kde3/share/applications/kde/ksame.desktop
/opt/kde3/share/applications/kde/ksokoban.desktop
/opt/kde3/share/applications/kde/knetwalk.desktop
/opt/kde3/share/apps/katomic
/opt/kde3/share/apps/kjumpingcube
/opt/kde3/share/apps/klines
/opt/kde3/share/apps/konquest
/opt/kde3/share/apps/ksame
/opt/kde3/share/config.kcfg/klines.kcfg
/opt/kde3/share/icons/*/*/*/katomic*
/opt/kde3/share/icons/*/*/*/kjumpingcube*
/opt/kde3/share/icons/*/*/*/konquest*
/opt/kde3/share/icons/*/*/*/ksame*
/opt/kde3/share/icons/*/*/*/ksokoban*
/opt/kde3/share/icons/*/*/*/klines*
/opt/kde3/bin/knetwalk
/opt/kde3/share/apps/knetwalk
/opt/kde3/share/icons/*/*/*/knetwalk*
%doc /opt/kde3/share/doc/HTML/en/katomic
%doc /opt/kde3/share/doc/HTML/en/klines
%doc /opt/kde3/share/doc/HTML/en/konquest
%doc /opt/kde3/share/doc/HTML/en/ksame
%doc /opt/kde3/share/doc/HTML/en/ksokoban

%files devel
%defattr(-,root,root)
/opt/kde3/include/*
/opt/kde3/%_lib/libkolf.so
/opt/kde3/%_lib/libkdegames.so
/opt/kde3/%_lib/libatlantikui.so
/opt/kde3/%_lib/libatlantikclient.so
/opt/kde3/%_lib/libatlantic.so
/opt/kde3/%_lib/libatlantic.la
/opt/kde3/%_lib/libatlantikclient.la
/opt/kde3/%_lib/libatlantikui.la
/opt/kde3/%_lib/libkdegames.la
/opt/kde3/%_lib/libkolf.la

%changelog