swt2c / rpms / scorched3d

Forked from rpms/scorched3d 5 years ago
Clone
Blob Blame History Raw
Name:           scorched3d
Version:        41.3
Release:        3%{?dist}
Summary:        Game based loosely on the classic DOS game Scorched Earth
Group:          Amusements/Games
License:        GPLv2+
URL:            http://www.scorched3d.co.uk/
# this is
# http://downloads.sourceforge.net/%{name}/Scorched3D-%{version}-src.tar.gz
# with the included glew removed as that contains files under the non free
# SGI Free license B. Instead the system version is used, which has the
# troublesome glew parts replaced
Source0:        Scorched3D-%{version}-src.tar.gz
Source1:        %{name}.desktop
Patch1:         %{name}-syslibs.patch
Patch2:         %{name}-help.patch
Patch3:         %{name}-41.1-gcc43.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  wxGTK-devel freealut-devel SDL_net-devel libGLU-devel
BuildRequires:  expat-devel libvorbis-devel glew-devel fftw-devel libjpeg-devel
BuildRequires:  ImageMagick desktop-file-utils
Requires:       hicolor-icon-theme opengl-games-utils
# 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
rm `find . -name Makefile`
rm `find src/XML ! -name "X*"`
%patch1 -p1 -z .syslibs
%patch2 -p1 -z .help
%patch3 -p1 -z .gcc43
iconv -f ISO-8859-1 -t UTF8 AUTHORS > AUTHORS.tmp
mv AUTHORS.tmp AUTHORS
# make rpmlint happy with debuginfo package
chmod -x src/GLEXT/*
# stop autoxxx from running
touch aclocal.m4
touch configure
touch `find -name Makefile.in`


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


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
ln -s opengl-game-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/%{name}-wrapper
rm -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}

# 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 \
  %{SOURCE1}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
install -p -m 644 %{name}.png \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/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 COPYING TODO
%{_bindir}/%{name}*
%{_datadir}/%{name}
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png


%changelog
* Sun Sep  7 2008 Hans de Goede <hdegoede@redhat.com> 41.3-3
- Fix patch fuzz build failure

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 41.3-2
- Autorebuild for GCC 4.3

* Mon Jan 21 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 41.3-1
- New upstream release 41.3
- Rebuild for new glew

* Wed Jan 16 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 41.2-1
- New upstream release 41.2
- No longer uses ode so stop BuildRequiring and linking to it

* Fri Jan 11 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 41.1-2
- Fix compilation with gcc 4.3

* Tue Nov  6 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 41.1-1
- New upstream release 41.1

* Mon Sep 24 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 40.1d-6
- Use opengl-games-utils wrapper to show error dialog when DRI is missing

* Tue Aug 28 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 40.1d-5
- Rebuild for new expat 2.0

* Wed Aug 15 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 40.1d-4
- Update License tag for new Licensing Guidelines compliance

* Wed Apr 18 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 40.1d-3
- Fix build with new ODE, scorched3d tries to force a double build of (its own
  included version of) ODE, however we use the system version which is compiled
  with single precision. With the new ODE the header files throw an #error
  because this causes both dSINGLE and dDOUBLE to be defined. This is fixed by
  patching scorched3d's configure to not add -DdDOUBLE to the CFLAGS

* Wed Dec 20 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 40.1d-2
- Rebuild for new wxGTK 2.8

* Sat Nov 18 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 40.1d-1
- New upstream release 40.1d

* Fri Nov  3 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 40.1c-2
- Add libvorbis-devel BR so that ogg/vorbis support gets build in

* Thu Nov  2 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 40.1c-1
- New upstream release 40.1c
- Drop 64 bit patch (integrated upstream)
- Don't install our data files in /usr/share/games, but in /usr/share
- Some minor specfile cleanups

* Tue Aug 29 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 40-2
- FE6 Rebuild

* Sun Jul 15 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 40-1
- New upstream release 40
- Drop many upstreamed patches
- Use system ode library instead of included one

* Thu Feb 23 2006 Hans de Goede <j.w.r.degoede@hhs.nl> - 39.1-5
- Patch included apoc mod version 3.1 to the 3.1 version as distributed by
  the ApocHQ servers for a smooth (no download required) experience joining
  apoc-mod using games on the internet. Also not entirely unimportant this
  fixes bz 182166, making the apoc mod actually usuable for local games.

* Mon Feb 13 2006 Hans de Goede <j.w.r.degoede@hhs.nl> - 39.1-4
- Bump release and rebuild for new gcc4.1 and glibc.

* 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.