Blob Blame History Raw
# Copyright (c) 2007 oc2pus <>
# Copyright (c) 2007 Hans de Goede <>
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.

Name:           8Kingdoms
Version:        1.1.0
Release:        3%{?dist}
Summary:        8 Kingdoms is a 3D turn-based fantasy strategic game
Group:          Amusements/Games
License:        GPL+
# This is:
# With external/extgl.h removed, as that contains parts of Windows gl.h and
# parts of a version of glext.h which falls under the "SGI Free Software
# License B", neither which are Free software.
Source0:        %{name}-%{version}.tar.gz
# This is a Free replacement file with the troublesome parts replaced with
# parts from Mesa's gl.h and from The Kronos Group glext.h .
Source1:        extgl.h
Source2:        %{name}.desktop
Source3:        %{name}.png
Patch0:         8Kingdoms-1.1.0-64bit.patch
Patch1:         8Kingdoms-1.1.0-locking.patch
Patch2:         8Kingdoms-1.1.0-crash.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  expat-devel SDL_mixer-devel tcl-devel desktop-file-utils
Requires:       hicolor-icon-theme opengl-games-utils

8 Kingdoms is a 3D turn-based fantasy strategic game in which
players become kings, build their empires and conquer enemy

Theme of the game 8 Kingdoms is inspirated by the world of fantasy.
Players play on a fully 3D hex map. They construct buildings,
recruit units including infantry, mounted units, mages, catapults
and finally they attack enemy or help allies. Units gain experiences
during the battle, each unit can get some abilities upgraded to be
stronger. Data are stored in XML and freely accessible - from
language versions to units' attributes, moreover map editor with
random map generator is included for comfortable map editing.

%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
cp -a %{SOURCE1} external
chmod -x doc/gui/gui_img1.png
# configure won't recognize --datadir ...
sed -i 's|games/8Kingdoms|share/8Kingdoms|g' configure

make %{?_smp_mflags}

# And here we must explicitly set pkgdatadir despite our earlier sed!
make install DESTDIR=$RPM_BUILD_ROOT pkgdatadir=%{_datadir}/%{name}
ln -s $RPM_BUILD_ROOT%{_bindir}/%{name}-wrapper

# below is the desktop file and icon stuff.
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --vendor fedora            \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/96x96/apps
install -p -m 644 %{SOURCE3} \


touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :

touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :


* Thu Jan  3 2008 Hans de Goede <> 1.1.0-3
- Fix crash undercertain conditions (bz 425799)

* Sun Dec  2 2007 Hans de Goede <> 1.1.0-2
- Replace BuildRequires expat with expat-devel (oops)
- Add a patch which stops 8Kingdoms from hanging in certain cases
- Use opengl-games-utils wrapper to show error dialog when DRI is missing

* Sat Nov 24 2007 Hans de Goede <> 1.1.0-1
- Adapted Packman specfile for Fedora

* Fri Aug 10 2007 Toni Graffy <> -
- initial build 1.1.0