swt2c / rpms / scorched3d

Forked from rpms/scorched3d 5 years ago
Clone
Blob Blame History Raw
Name:           scorched3d
Version:        39.1
Release:        3%{?dist}
Summary:        Game based loosely on the classic DOS game Scorched Earth

Group:          Amusements/Games
License:        GPL
URL:            http://www.scorched3d.co.uk/
Source0:        http://dl.sf.net/scorched3d/Scorched3D-%{version}-src.tar.gz
Source1:        %{name}.desktop
Patch0:         %{name}-cvs-20050929.patch
Patch1:         %{name}-syslibs.patch
Patch2:         %{name}-aclocal18.patch
Patch3:         %{name}-gcc41.patch
Patch4:         %{name}-64bit.patch
Patch5:         %{name}-openal.patch
Patch6:         %{name}-help.patch
Patch7:         %{name}-sprintf.patch
Patch8:         %{name}-formatstring.patch
Patch9:         %{name}-strxxx.patch
Patch10:        %{name}-negint.patch
Patch11:        %{name}-XML-injection.patch
Patch12:        %{name}-HTML-injection.patch
Patch13:        %{name}-opengl-without-context.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  wxGTK-devel
BuildRequires:  openal-devel
BuildRequires:  freealut-devel
BuildRequires:  SDL_net-devel
BuildRequires:  ImageMagick
BuildRequires:  libGLU-devel
BuildRequires:  desktop-file-utils
BuildRequires:  expat-devel
BuildRequires:  autoconf
BuildRequires:  automake
# Upstream naming compatibility
Provides:       Scorched3D = %{version}-%{release}

%description
Scorched 3D is a game based on the classic DOS game Scorched Earth
"The Mother Of All Games".  Scorched 3D adds amongst other new
features a 3D island environment and LAN and internet play.  At its
lowest level, Scorched 3D is just an artillery game with two+ tanks
taking turns to destroy opponents in an arena.  Choose the angle,
direction and power of each shot, launch your weapon, and try to blow
up other tanks.  But Scorched 3D can be a lot more complex than that,
if you want it to be.  You can earn money from successful battles and
use it to invest in additional weapons and accessories.  You can play
with up to twenty four other players at a time, mixing computer
players with humans.  There's a variety of changing environmental
conditions and terrains to be dealt with.


%prep
%setup -q -n scorched
find . -type d -name CVS | xargs rm -r
rm -r autom4te.cache `find . -name Makefile`
rm -r src/zlib `find src/XML ! -name "X*"`
%patch0 -p1
%patch1 -p1
%patch2 -p0
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
. autogen.sh


%build
%configure \
  --disable-dependency-tracking \
  --datadir=%{_datadir}/games/%{name} \
  --with-docdir=$RPM_DOC_DIR/%{name}-%{version}
make %{?_smp_mflags}
convert data/windows/tank2.ico tank2.png


%install
rm -rf $RPM_BUILD_ROOT __docs
make install DESTDIR=$RPM_BUILD_ROOT

desktop-file-install \
  --vendor fedora \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  --mode 644 \
  --add-category X-Fedora \
  %{SOURCE1}
install -Dpm 644 tank2.png \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/scorched3d.png

mv $RPM_BUILD_ROOT$RPM_DOC_DIR/%{name}-%{version}/documentation __docs


%clean
rm -rf $RPM_BUILD_ROOT


%post
gtk-update-icon-cache -qf %{_datadir}/icons/hicolor &>/dev/null || :

%postun
gtk-update-icon-cache -qf %{_datadir}/icons/hicolor &>/dev/null || :


%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING TODO __docs/*
%{_bindir}/scorched3d
%{_datadir}/games/scorched3d/
%{_datadir}/applications/*scorched3d.desktop
%{_datadir}/icons/hicolor/*/apps/scorched3d.png


%changelog
* Sun Feb 12 2006 <j.w.r.degoede@hhs.nl> - 39.1-3
- fix server crashing with certain landscape types (patch 13)

* Sat Feb 11 2006 <j.w.r.degoede@hhs.nl> - 39.1-2
- upgrade to CVS snapshot of 20050929, as Debian does, but not to
  the newer apoc version as this causes problems playing online (patch 0)
- fix gcc41 compilation (patch 3)
- fix 64 bit compilation (bz 158646) (patch 4)
- fix compile with openal-0.9 (patch 5)
- use htmlview for helpfile viewing instead of hardcoded mozilla,
  run this in background so the game doesn't freeze (patch 6)
- fix all the security issues reported on the fulldisclosure mailinglist:
  http://seclists.org/lists/fulldisclosure/2005/Nov/0079.html
  (bz 161694) (patch 7, 8, 9, 10)
- fix 2 additonal security issues found while fixing the above (patch 11, 12)
- this release also fixes bz 161694

* Sat Oct  8 2005 Ville Skyttä <ville.skytta at iki.fi> - 39.1-1
- 39.1.
- Avoid aclocal >= 1.8 warnings.
- Install icon into icons/hicolor.
- Clean up build dependencies.

* Sun May 22 2005 Jeremy Katz <katzj@redhat.com> - 37.2-3
- rebuild on all arches

* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 37.2-2
- rebuilt

* Mon Aug 16 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:37.2-0.fdr.1
- Update to 37.2.

* Mon Aug  4 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:0.33.9.35-0.fdr.1
- First build.