# 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+ URL: http://kralovstvi.sourceforge.net/ # This is: # http://downloads.sourceforge.net/kralovstvi/%{name}-%{version}.tar.gz # 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 %description 8 Kingdoms is a 3D turn-based fantasy strategic game in which players become kings, build their empires and conquer enemy kingdoms. 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. %prep %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 %build %configure make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT # And here we must explicitly set pkgdatadir despite our earlier sed! make install DESTDIR=$RPM_BUILD_ROOT pkgdatadir=%{_datadir}/%{name} ln -s opengl-game-wrapper.sh $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 \ %{SOURCE2} mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/96x96/apps install -p -m 644 %{SOURCE3} \ $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/96x96/apps %clean rm -rf $RPM_BUILD_ROOT %post touch --no-create %{_datadir}/icons/hicolor || : if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : fi %postun touch --no-create %{_datadir}/icons/hicolor || : if [ -x %{_bindir}/gtk-update-icon-cache ]; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : fi %files %defattr(-,root,root,-) %doc AUTHORS ChangeLog COPYING README doc/* %{_bindir}/%{name}* %{_datadir}/%{name} %{_datadir}/applications/fedora-%{name}.desktop %{_datadir}/icons/hicolor/96x96/apps/%{name}.png %changelog * 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 - 1.1.0-0.pm.1 - initial build 1.1.0