#for Patch2 %define _default_patch_fuzz 2 %define version 1.1.0 %define pre 0 %define rel 1 %define subrel 1 %if %{pre} # use lowercase %%pre in %%release # because e.g. RC1 < beta1 (in ASCII R=82 and b=98) %define lpre %(echo %{pre} | tr A-Z a-z) %define release %mkrel -c %{lpre} %{rel} %define source http://binaries.openttd.org/releases/%{version}-%{pre}/%{name}-%{version}-%{pre}-source.tar.xz %define dirn %{name}-%{version}-%{pre} %else %define release %mkrel %{rel} %define source http://binaries.openttd.org/releases/%{version}/%{name}-%{version}-source.tar.xz %define dirn %{name}-%{version} %endif Name: openttd Version: %{version} Release: %{release} Summary: An open source clone of the Microprose game "Transport Tycoon Deluxe" game Group: Games/Strategy License: GPLv2 URL: http://www.openttd.org Source: %{source} Patch0: openttd-1.1.0-CVE-2011-3341.patch Patch1: openttd-1.1.0-CVE-2011-3342.patch Patch2: openttd-1.1.0-CVE-2011-3343.patch BuildRequires: libpng-devel BuildRequires: SDL-devel BuildRequires: libz-devel BuildRequires: liblzma-devel BuildRequires: freetype-devel BuildRequires: fontconfig-devel BuildRequires: liblzo-devel BuildRequires: icu-devel BuildRequires: unzip #BuildRequires: ccache BuildRequires: desktop-file-utils Requires: TiMidity++ Requires: openttd-opengfx Requires: openttd-opensfx Requires: openttd-openmsx %description OpenTTD is an open source clone of the Microprose game "Transport Tycoon Deluxe" game. %prep %setup -q -n %{dirn} %patch0 -p0 -b .CVE-2011-3341 %patch1 -p0 -b .CVE-2011-3342 %patch2 -p0 -b .CVE-2011-3343 %build export CFLAGS="%{optflags}" export CXXFLAGS="%{optflags}" export LDFLAGS="%{ldflags}" ./configure \ --prefix-dir=%{_prefix} \ --install-dir=%{buildroot} # --with-ccache %make VERBOSE=1 %install rm -rf %{buildroot} %makeinstall_std #cleanup rm -rf %{buildroot}%{_datadir}/pixmaps # fix desktop file desktop-file-install --dir=%{buildroot}%{_datadir}/applications \ --add-category=StrategyGame \ --remove-key=Version \ %{buildroot}%{_datadir}/applications/openttd.desktop %clean rm -rf %{buildroot} %files %defattr(-,root,root) %doc *.txt COPYING %{_gamesbindir}/openttd %{_gamesdatadir}/openttd %{_datadir}/applications/openttd.desktop %{_datadir}/icons/hicolor/*/apps/openttd.png %{_mandir}/man6/openttd.* %changelog * Fri Jan 06 2012 wally <wally> 1.1.0-1.1.mga1 + Revision: 192607 - fix multiple vulnerabilities o CVE-2011-3343 (Multiple buffer overflows in validation of external data) o CVE-2011-3342 (Buffer overflows in savegame loading) o CVE-2011-3341 (Denial of service via improperly validated commands) * Fri Apr 01 2011 wally <wally> 1.1.0-1.mga1 + Revision: 79499 - new version 1.1.0 - drop buildroot definition * Sat Mar 19 2011 wally <wally> 1.1.0-0.rc3.1.mga1 + Revision: 74397 - new version 1.1.0 RC3 * Sat Mar 05 2011 wally <wally> 1.1.0-0.rc2.1.mga1 + Revision: 64640 - new version 1.1.0 RC2 * Sat Feb 19 2011 wally <wally> 1.1.0-0.rc1.1.mga1 + Revision: 54128 - new version 1.1.0 RC1 * Wed Feb 16 2011 wally <wally> 1.1.0-0.beta5.1.mga1 + Revision: 52713 - new version 1.1.0-beta5 * Sat Jan 22 2011 wally <wally> 1.1.0-0.beta4.1.mga1 + Revision: 33200 - new version 1.1.0 beta4 - change to xz compressed source - temporarily disable use of ccache on build time - imported package openttd * Sat Jan 01 2011 Jani Välimaa <wally@mandriva.org> 1.1.0-0.beta2.1mdv2011.0 + Revision: 626980 - new version 1.1.0-beta2 * Sat Dec 25 2010 Jani Välimaa <wally@mandriva.org> 1.1.0-0.beta1.1mdv2011.0 + Revision: 625106 - add liblzma-devel BR - new version 1.1.0-beta1 - increase build time verbosity * Sun Nov 21 2010 Jani Välimaa <wally@mandriva.org> 1.0.5-1mdv2011.0 + Revision: 599391 - new version 1.0.5 - fixes CVE-2010-4168 * Mon Nov 15 2010 Jani Välimaa <wally@mandriva.org> 1.0.5-0.RC2.1mdv2011.0 + Revision: 597649 - new pre-release 1.0.5 RC2 * Sun Oct 31 2010 Jani Välimaa <wally@mandriva.org> 1.0.5-0.RC1.1mdv2011.0 + Revision: 591247 - new version 1.0.5 RC1 * Wed Sep 15 2010 Jani Välimaa <wally@mandriva.org> 1.0.4-1mdv2011.0 + Revision: 578682 - new version 1.0.4 * Tue Aug 31 2010 Jani Välimaa <wally@mandriva.org> 1.0.4-0.RC1.1mdv2011.0 + Revision: 574876 - new version 1.0.4 RC1 * Sun Aug 01 2010 Jani Välimaa <wally@mandriva.org> 1.0.3-1mdv2011.0 + Revision: 564216 - new version 1.0.3 - fixes CVE-2010-2534 and other bugs * Wed Jul 21 2010 Jani Välimaa <wally@mandriva.org> 1.0.3-0.RC1.1mdv2011.0 + Revision: 556310 - new version * Sat Jul 10 2010 Jani Välimaa <wally@mandriva.org> 1.0.2-1mdv2011.0 + Revision: 550024 - new version 1.0.2 - use upstream provided desktop file * Sat May 01 2010 Jani Välimaa <wally@mandriva.org> 1.0.1-1mdv2010.1 + Revision: 541417 - the final version of bugfix release 1.0.1 * Thu Apr 22 2010 Jani Välimaa <wally@mandriva.org> 1.0.1-0.RC2.1mdv2010.1 + Revision: 537951 - new bugfix pre-release 1.0.1 RC2 * Sun Apr 18 2010 Jani Välimaa <wally@mandriva.org> 1.0.1-0.RC1.1mdv2010.1 + Revision: 536493 - new bugfix pre-release 1.0.1 RC1 - improve .spec to ease building pre-releases * Fri Apr 16 2010 Jani Välimaa <wally@mandriva.org> 1.0.0-3mdv2010.1 + Revision: 535648 - fix compiler flags - build with ccache * Wed Apr 14 2010 Jani Välimaa <wally@mandriva.org> 1.0.0-2mdv2010.1 + Revision: 534888 - clean and improve .spec a little bit - fix BRs, remove unneeded and add needed - opengfx, opensfx and openmsx are now in a separate packages - fix .desktop file * Tue Apr 06 2010 Jani Välimaa <wally@mandriva.org> 1.0.0-1mdv2010.1 + Revision: 532112 - update opengfx and opensfx - add openmsx and require TiMidity++ for sounds - fix license - add missing BR - use compiler flags on build time + Olivier Faurax <ofaurax@mandriva.org> - New release: 1.0.0 + Sandro Cazzaniga <kharec@mandriva.org> - fix mixed use of spaces and tabs - fix %%prep * Mon Dec 28 2009 Gustavo Pichorim Boiko <boiko@mandriva.com> 1.0.0-0.beta1mdv2010.1 + Revision: 483120 - Update to 1.0.0-beta 1 in order to completelly remove the dependency on the original game data files * Sat Dec 12 2009 trem <trem@mandriva.org> 0.7.4-2mdv2010.1 + Revision: 477848 - add missing file opengfx and opensfx * Tue Aug 11 2009 Frederik Himpe <fhimpe@mandriva.org> 0.7.2-1mdv2010.0 + Revision: 415138 - update to new version 0.7.2 * Wed Jun 10 2009 Frederik Himpe <fhimpe@mandriva.org> 0.7.1-1mdv2010.0 + Revision: 384928 - Update to new version 0.7.1 * Wed Mar 18 2009 Zombie Ryushu <ryushu@mandriva.org> 0.6.3-2mdv2009.1 + Revision: 357539 - Fix pixmap paths in the install stage * Mon Dec 08 2008 Zombie Ryushu <ryushu@mandriva.org> 0.6.3-1mdv2009.1 + Revision: 311782 - Fix pixmap paths in the install stage - Fix pixmap paths - Version bump to 0.6.3 - Version bump to 0.6.3 * Sun Aug 03 2008 Frederik Himpe <fhimpe@mandriva.org> 0.6.2-1mdv2009.0 + Revision: 262435 - update to new version 0.6.2 * Thu Apr 10 2008 Gustavo Pichorim Boiko <boiko@mandriva.com> 0.6.0-1mdv2009.0 + Revision: 192551 - New upstream release: 0.6.0 + Thierry Vignaud <tv@mandriva.org> - fix description-line-too-long - kill re-definition of %%buildroot on Pixel's request + Olivier Blin <oblin@mandriva.com> - restore BuildRoot * Tue Oct 23 2007 Jérôme Soyer <saispo@mandriva.org> 0.5.3-1mdv2008.1 + Revision: 101456 - New release - New release + Thierry Vignaud <tv@mandriva.org> - fix summary-ended-with-dot * Mon Jun 11 2007 Gustavo Pichorim Boiko <boiko@mandriva.com> 0.5.2-1mdv2008.0 + Revision: 38038 - new upstream release: 0.5.2 * Thu May 03 2007 Gustavo Pichorim Boiko <boiko@mandriva.com> 0.5.1-1mdv2008.0 + Revision: 21468 - Import openttd * Thu May 03 2007 Gustavo Pichorim Boiko <boiko@mandriva.com> 0.5.1-1mdv2008.0 - Initial package for OpenTTD