Name: sumwars Version: 0.5.6 Release: 4%{?dist} Summary: Hack and slash top-down view RPG game Group: Amusements/Games # Also includes "nlfg" networking layer licensed as MIT, # the effective license of GPLv3+ and MIT is GPLv3+ License: GPLv3+ URL: http://sumwars.org Source0: http://sourceforge.net/projects/sumwars/files/%{version}/%{name}-%{version}-src.tar.bz2 Source1: sumwars.desktop BuildRequires: gettext, cmake, ogre-devel, cegui-devel, ois-devel, lua-devel, BuildRequires: libXrandr-devel, desktop-file-utils BuildRequires: freealut-devel, libogg-devel, libvorbis-devel, physfs-devel BuildRequires: tinyxml-devel, enet-devel # runtime plugin, doesn't get picked up automatically Requires: cegui-libxml-xmlparser Requires: %{name}-data = %{version} %description Summoning Wars is an open source role-playing game, featuring both a single-player and a multiplayer mode for about 2 to 8 players. %package data Summary: %{summary} Group: Amusements/Games Requires: %{name} = %{version} BuildArch: noarch License: CC-BY-SA Requires: dejavu-sans-fonts, dejavu-serif-fonts %description data This package contains the data files for Summoning Wars. %prep %setup -q # http://sumwars.org/mantis/view.php?id=63 for file in AUTHORS; do sed 's|\r||' $file > $file.tmp iconv -f ISO-8859-1 -t UTF8 $file.tmp > $file.tmp2 touch -r $file $file.tmp2 mv -f $file.tmp2 $file done rm -rf src/enet rm -rf src/tinyxml rm -rf tools/* %build # we don't build developer tools into the application as users won't need that # do not use the bundled TinyXML, use the system one # do not use the bundled enet, use the system one %cmake -DSUMWARS_BUILD_TOOLS:BOOL=OFF -DSUMWARS_NO_TINYXML:BOOL=ON -DSUMWARS_NO_ENET:BOOL=ON make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT # remove bundled but unused OgreCore.zip rm $RPM_BUILD_ROOT/%{_datadir}/%{name}/resources/packs/OgreCore.zip # use system-wide dejavu sans and serif fonts rm $RPM_BUILD_ROOT/%{_datadir}/%{name}/resources/gui/fonts/DejaVuSans.ttf ln -s /%{_datadir}/fonts/dejavu/DejaVuSans.ttf \ $RPM_BUILD_ROOT/%{_datadir}/%{name}/resources/gui/fonts rm $RPM_BUILD_ROOT/%{_datadir}/%{name}/resources/gui/fonts/DejaVuSerif.ttf ln -s /%{_datadir}/fonts/dejavu/DejaVuSerif.ttf \ $RPM_BUILD_ROOT/%{_datadir}/%{name}/resources/gui/fonts # upstream doesn't want to install .desktop file and icons because distros # keep them at different locations, lets install both manually for i in 16 24 32 48 64 128 do install -D "share/icon/SumWarsIcon_${i}x${i}.png" \ "$RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png" done desktop-file-install --dir $RPM_BUILD_ROOT/%{_datadir}/applications \ --mode="0644" \ %{SOURCE1} %post /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %postun if [ $1 -eq 0 ] ; then /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi %posttrans /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files %doc COPYING AUTHORS README %{_bindir}/%{name} %dir %{_datadir}/%{name}/translation/ %lang(de) %{_datadir}/%{name}/translation/de/ %lang(en) %{_datadir}/%{name}/translation/en/ %lang(it) %{_datadir}/%{name}/translation/it/ %lang(pl) %{_datadir}/%{name}/translation/pl/ %lang(pt) %{_datadir}/%{name}/translation/pt/ %lang(ru) %{_datadir}/%{name}/translation/ru/ %lang(uk) %{_datadir}/%{name}/translation/uk/ %files data %dir %{_datadir}/%{name}/ %{_datadir}/%{name}/data/ %{_datadir}/%{name}/resources/ %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/*/apps/%{name}.png %changelog * Fri Mar 16 2012 Martin Preisler 0.5.6-4 - ensure consistent usage of %%{name} - use 80 characters per line where possible * Wed Mar 14 2012 Martin Preisler 0.5.6-3 - separate License fields for main package and the data subpackage - moved dejavu font Requires to data * Wed Mar 14 2012 Martin Preisler 0.5.6-2 - use system TinyXML and enet - remove unused OgreCore.zip - desktop file reworked - use system dejavu-{sans,serif} * Wed Mar 07 2012 Martin Preisler 0.5.6-1 - new package