%global buildno 17 %global buildid build%{buildno} %global build_id build-%{buildno} Name: widelands Version: 0 Release: 0.39.%{buildid}%{?dist} Summary: Open source realtime-strategy game Group: Amusements/Games License: GPLv2+ URL: http://www.widelands.org Source0: http://launchpad.net/widelands/%{buildid}/%{build_id}/+download/widelands-%{buildid}-src.tar.bz2 # Reported upstream: https://bugs.launchpad.net/widelands/+bug/1017497 # https://bugzilla.redhat.com/show_bug.cgi?id=718130 Patch0: widelands-build17-src-crash-on-messagebox.patch # Build issue with gcc 4.7, already fixed upstream Patch1: widelands-build17-src-includes.patch BuildRequires: SDL-devel >= 1.2.11 BuildRequires: SDL_gfx-devel BuildRequires: SDL_image-devel BuildRequires: SDL_mixer-devel >= 1.2.6 BuildRequires: SDL_net-devel BuildRequires: SDL_sound-devel BuildRequires: SDL_ttf-devel >= 2.0.0 BuildRequires: boost-devel >= 1.47.0 BuildRequires: boost-static >= 1.47.0 BuildRequires: cmake BuildRequires: ctags BuildRequires: desktop-file-utils BuildRequires: gettext BuildRequires: ggz-base-libs-devel BuildRequires: glew-devel BuildRequires: libjpeg-devel BuildRequires: libpng-devel BuildRequires: libtiff-devel BuildRequires: optipng %if 0%{?fedora} >= 20 BuildRequires: compat-lua-devel %else BuildRequires: lua-devel %endif Requires: drehatlas-widelands-fonts Requires: gnu-free-serif-fonts Requires: gnu-free-sans-fonts Requires: hicolor-icon-theme %description Widelands is an open source (GPLed), realtime-strategy game, using SDL and other free libraries, which is still under development. Widelands is inspired by Settlers II (Bluebyte) and is partly similar to it, so if you know it, you perhaps will have a thought, what Widelands is all about. %prep %setup -q -n widelands-%{buildid}-src %patch0 -p1 -b .crash-on-messagebox %patch1 -p1 -b .includes %build mkdir -p build/compile pushd build/compile # We need to set CMAKE_INCLUDE_PATH to /usr for FindLua51.cmake %cmake \ -DCMAKE_INCLUDE_PATH=%{_prefix} \ -DWL_INSTALL_PREFIX=%{_prefix} \ -DWL_INSTALL_BINDIR=%{_bindir} \ -DWL_INSTALL_DATADIR=share/%{name} \ ../.. make %{?_smp_mflags} popd %install pushd build/compile make install DESTDIR=$RPM_BUILD_ROOT popd mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps cp -a pics/wl-logo-64.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps/%{name}.png mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications cat > widelands.desktop < %{_builddir}/widelands-%{buildid}-src/%{name}.files find usr/share/widelands/locale/ -maxdepth 1 -type d ! -name "*_*" | sed -n -e 's#\(usr/share/widelands/locale/\(.\+\)\)#%lang(\2) /\1#p' >> %{_builddir}/widelands-%{buildid}-src/%{name}.files find usr/share/widelands/ -mindepth 1 -maxdepth 1 -not -name locale | sed -n 's#\(usr/share/widelands/*\)#/\1#p' >> %{_builddir}/widelands-%{buildid}-src/%{name}.files popd %pre # preparing system before update cat << EOF | while read name; do rm -rf "%{_datadir}/widelands/maps/${name}.wmf"; done Checkmate Dry Riverbed Elven Forests Enemy in sight Finlakes Firegames Four Castles Glacier Lake Golden Peninsula Lake of tranquility Plateau Riverlands The Oasis Triangle The big lake The long way Two frontiers War of the Valleys EOF %post touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %postun if [ $1 -eq 0 ] ; then touch --no-create %{_datadir}/icons/hicolor &>/dev/null gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi %posttrans gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files -f %{name}.files %doc ChangeLog COPYING CREDITS %{_bindir}/%{name} %{_datadir}/icons/hicolor/64x64/apps/%{name}.png %{_datadir}/applications/%{name}.desktop %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}/locale %changelog * Mon Nov 18 2013 Dave Airlie - 0-0.39.build17 - rebuilt for GLEW 1.10 * Sun Aug 04 2013 Hans de Goede - 0-0.38.build17 - Build with compat-lua on f20+ * Sun Aug 04 2013 Fedora Release Engineering - 0-0.37.build17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Tue Jul 30 2013 Petr Machata - 0-0.36.build17 - Rebuild for boost 1.54.0 * Sat Feb 09 2013 Parag Nemade - 0-0.35.build17 - Remove vendor tag from desktop file as per https://fedorahosted.org/fesco/ticket/1077 - Cleanup spec as per recently changed packaging guidelines * Thu Dec 13 2012 Adam Jackson - 0-0.34.build17 - Rebuild for glew 1.9.0 * Sat Jul 28 2012 Hans de Goede - 0-0.33.build17 - Rebuilt for new GLEW * Sun Jul 22 2012 Fedora Release Engineering - 0-0.32.build17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Mon Jun 25 2012 Nils Philippsen - 0-0.31.build17 - Rebase to new upstream release build17 - Unclutter, versionize requirements * Tue Feb 28 2012 Fedora Release Engineering - 0-0.30.build16 - Rebuilt for c++ ABI breakage * Tue Jan 10 2012 Nils Philippsen - 0-0.29.build16 - rebuild for gcc 4.7 * Tue Dec 06 2011 Hans de Goede - 0-0.28.build16 - Fix building with libpng-1.5 * Tue Dec 06 2011 Adam Jackson - 0-0.27.build16 - Rebuild for new libpng * Sat Jul 16 2011 Hans de Goede - 0-0.26.build16 - Rebuild for new SDL_gfx - Require and link to drehatlas-widelands-fonts instead of shipping a private copy (#477483) - Fix a patch on toplevel messageboxes (#718130) * Mon Jun 20 2011 ajax@redhat.com - 0-0.25.build16 - Rebuild for new glew soname * Wed Apr 27 2011 Hans de Goede - 0-0.24.build16 - Rebase to new upstream release build16 - This also fixes a security vulnerability in internet play (#684924) * Tue Feb 15 2011 Hans de Goede - 0-0.23.build15 - Rebase to new upstream release build15 - Fix compilation with gcc-4.6 * Mon Feb 07 2011 Fedora Release Engineering - 0-0.22.Build14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Sun Feb 06 2011 Thomas Spura - 0-0.21.Build14 - rebuild for new boost * Mon Aug 2 2010 Hans de Goede - 0-0.20.Build14 - Fix compilation with gcc-4.5 * Sat Jul 31 2010 Hans de Goede - 0-0.19.Build14 - Rebuild for Boost soname bump * Sat Jan 23 2010 Hans de Goede - 0-0.18.Build14 - Fixup %%build_id, which accidentally got bumped in the previous rebuild attempt (#558041) * Fri Jan 22 2010 Rahul Sundaram - 0-0.17.Build15 - Rebuild for Boost soname bump * Fri Jan 15 2010 Hans de Goede - 0-0.16.Build14 - Rebase to new upstream release Build14 - Fix FTBFS (#511430) * Mon Jul 27 2009 Fedora Release Engineering - 0-0.15.Build13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Wed Feb 25 2009 Fedora Release Engineering - 0-0.14.Build13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Thu Dec 04 2008 Karol Trzcionka - 0-0.13.Build13 - Update to Build13 * Sun Nov 16 2008 Karol Trzcionka - 0-0.12.Build13rc - Update to Build13rc - Add %%{?_smp_mflags} * Thu Apr 10 2008 Karol Trzcionka - 0-0.11.build12 - Fix BRs * Wed Apr 09 2008 Karol Trzcionka - 0-0.10.build12 - Update to build12 * Sun Feb 10 2008 Karol Trzcionka - 0-0.9.build11 - Fix building with gcc43 * Sat Feb 09 2008 Karol Trzcionka - 0-0.8.build11 - Rebuild for gcc43 - Changes in desktop file * Mon Sep 17 2007 Karol Trzcionka - 0-0.7.build11 - Fix update problems * Mon Sep 10 2007 Karol Trzcionka - 0-0.6.build11 - Upgrade to build-11 * Sat Aug 25 2007 Karol Trzcionka - 0-0.5.build10 - Patching for compatibility with scons 0.97 * Tue May 08 2007 Karol Trzcionka - 0-0.4.build10 - Change BRs for ppc64 * Sun May 06 2007 Karol Trzcionka - 0-0.3.build10 - Changes in .desktop and icon-dir - Changes in %%postun and %%post sections - Merge -data subpackage with core package * Tue May 01 2007 Karol Trzcionka - 0-0.2.build10 - Return to first method of versioning - Some changes in summary and GenericName - Make spec-file more clear * Mon Apr 30 2007 Karol Trzcionka - 0-0.10.1.build10 - Flagfix - Change versions numerating * Sat Apr 28 2007 Karol Trzcionka - 0-0.1.build10 - Initial Release