Blob Blame History Raw
%define prever rc4

Name:           quake3
Version:        1.34
Release:        0.10.%{prever}%{?dist}
Summary:        Quake 3 Arena engine (ioquake3 version)
Group:          Amusements/Games
License:        GPLv2+
URL:            http://ioquake3.org/
# to regenerate (note included systemlib copies are removed for size, lcc
# is removed as it is not Free software):
# svn co svn://svn.icculus.org/quake3/tags/%{version}-%{prever} %{name}-%{version}-%{prever}
# pushd %{name}-%{version}-%{prever}
# rm -fr `find -name .svn` code/AL code/SDL12 code/libcurl code/libs
# mv code/jpeg-6/jmemnobs.c .; rm code/jpeg-6/*; mv jmemnobs.c code/jpeg-6
# rm -fr code/tools/lcc
# popd
# tar cvfj %{name}-%{version}-%{prever}.tar.bz2 %{name}-%{version}-%{prever}
Source0:        %{name}-%{version}-%{prever}.tar.bz2
Source1:        %{name}-demo.sh
Source2:        %{name}.autodlrc
Source3:        %{name}.desktop
Source4:        %{name}.png
Source5:        %{name}-update.sh
Source6:        %{name}-update.autodlrc
Source7:        urbanterror.sh
Source8:        urbanterror.autodlrc
Source9:        urbanterror.desktop
Source10:       urbanterror.png
Source11:       worldofpadman.sh
Source12:       worldofpadman.autodlrc
Source13:       worldofpadman.desktop
Source14:       wop.png
Patch0:         quake3-1.34-syslibs.patch
Patch1:         quake3-1.34-configurable-client-masterserver.patch
Patch2:         quake3-1.34-fix-empty-fs_game-from-server.patch
Patch3:         quake3-1.34-dont-ask-openarena-cdkey.patch
Patch4:         quake3-1.34-no-pak0-check.patch
Patch5:         quake3-1.34-rc4-demo-pak.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  SDL-devel libXt-devel openal-devel libjpeg-devel
BuildRequires:  libvorbis-devel curl-devel desktop-file-utils
%ifarch %{ix86} x86_64
BuildRequires:  nasm
%endif
# for quake3-update
Requires:       autodownloader tar

%description
This package contains the enhanced opensource ioquake3 version of the Quake 3
Arena engine. This engine can be used to play a number of games based on this
engine, below is an (incomplete list):

* OpenArena Free, Open Source Quake3 like game, recommended!
  (packagename: openarena)

* Urban Terror, gratis, but not Open Source FPS best be described as a
  Hollywood tactical shooter, a downloader and installer including an
  application menu entry is available in the urbanterror package.

* World of Padman, gratis, but not Open Source Comic FPS, a downloader and
  installer including an application menu entry is available in the
  worldofpadman package.

* Quake3 Arena, the original! A downloader and installer for the gratis, but
  not Open Source demo, including an application menu entry is available in
  the quake3-demo package.
  
  If you own a copy of quake 3, you will need to copy pak0.pk3 from the
  original CD-ROM and your q3key to /usr/share/quake3/baseq3 or ~/.q3a/baseq3.
  Also copy the pak?.pk3 files from the original 1.32 Quake 3 Arena point
  release there if you have them available or run quake3-update to download
  them for you.


%package demo
Summary:        Quake 3 Arena tournament 3D shooter game demo installer
Group:          Amusements/Games
Requires:       quake3 hicolor-icon-theme opengl-games-utils unzip
# quake3-demo used to be part of the quake3 package, make sure that people
# who have the old version with the demo included don't all of a sudden have
# the demo menu entry disappear.
Obsoletes:      quake3 <= 1.34-0.4.rc4.fc9

%description demo
Quake 3 Arena tournament 3D shooter game demo installer. The Quake3 engine is
Open Source and as such is available as part of Fedora. The original Quake3
datafiles however are not Open Source and thus are not available as part of
Fedora. There is a gratis, but not Open Source demo available on the internet.

This package installs an applications menu entry for playing the Quake3 Arena
demo. The first time you click this menu entry, it will offer to download and
install the Quake 3 demo datafiles for you.


%package -n urbanterror
Summary:        FPS best be described as a Hollywood tactical shooter
Group:          Amusements/Games
URL:            http://www.urbanterror.net/
Requires:       quake3 hicolor-icon-theme opengl-games-utils unzip

%description -n urbanterror
Urban Terror could best be described as a Hollywood tactical shooter; it is
realism based to a certain extent (environments/weapons/player models), but
also goes by the motto "fun over realism" (fast gameplay and lots of action).
This combination of reality and action results in a very unique, enjoyable
and addictive game.

Urban Terror uses the GPL licensed ioquake3 engine, however the Urban Terror
datafiles are not freely redistributable. This package will install an Urban
Terror menu entry, which will automatically download the necessary datafiles
(700 MB!) the first time you start Urban Terror.


%package -n worldofpadman
Summary:        World Of Padman - Comic 3D-Shooter
Group:          Amusements/Games
URL:            http://padworld.myexp.de/
Requires:       quake3 hicolor-icon-theme opengl-games-utils tar gzip

%description -n worldofpadman
World of Padman (WoP) is a first-person shooter computer game available in
both English and German. The idea is based on the Padman comic strip for the
magazine PlayStation Games created by the professional cartoon artist Andreas
'ENTE' Endres, who is also the man who made many of the maps included with the
game in 1998. Most of the maps in the game are lilliput style.

World of Padman uses the GPL licensed ioquake3 engine, however the Wop data-
files are not freely redistributable. This package will install a World of
Padman menu entry, which will automatically download the necessary datafiles
(600 MB!) the first time you start World of Padman.


%prep
%setup -q -n %{name}-%{version}-%{prever}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1


%build
# the CROSS_COMPILING=1 is a hack to not build q3cc and qvm files
# since we've stripped out q3cc as this is not Free Software.
make %{?_smp_mflags} \
    OPTIMIZE="$RPM_OPT_FLAGS -fno-strict-aliasing -ffast-math" \
    DEFAULT_BASEDIR=%{_datadir}/%{name} USE_CODEC_VORBIS=1 \
    USE_LOCAL_HEADERS=0 BUILD_GAME_SO=0 GENERATE_DEPENDENCIES=0 \
    CROSS_COMPILING=1


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}

install -m 755 build/release-linux-*/ioquake3.* \
  $RPM_BUILD_ROOT%{_bindir}/quake3
install -m 755 build/release-linux-*/ioquake3-smp.* \
  $RPM_BUILD_ROOT%{_bindir}/quake3-smp
install -m 755 build/release-linux-*/ioq3ded.* \
  $RPM_BUILD_ROOT%{_bindir}/q3ded
install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/quake3-demo
install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/%{name}

install -p -m 755 %{SOURCE5} $RPM_BUILD_ROOT%{_bindir}/quake3-update
install -p -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_datadir}/%{name}

install -p -m 755 %{SOURCE7} $RPM_BUILD_ROOT%{_bindir}/urbanterror
install -p -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_datadir}/%{name}

install -p -m 755 %{SOURCE11} $RPM_BUILD_ROOT%{_bindir}/worldofpadman
install -p -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_datadir}/%{name}

# 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 \
  %{SOURCE3}
desktop-file-install --vendor fedora            \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  %{SOURCE9}
desktop-file-install --vendor fedora            \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  %{SOURCE13}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps
install -p -m 644 %{SOURCE4} \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps
install -p -m 644 %{SOURCE10} \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps
install -p -m 644 %{SOURCE14} \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps


%clean
rm -rf $RPM_BUILD_ROOT


%post demo
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 demo
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%post -n urbanterror
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 -n urbanterror
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%post -n worldofpadman
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 -n worldofpadman
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 BUGS ChangeLog COPYING.txt id-readme.txt md4-readme.txt NOTTODO README
%doc TODO code/jpeg-6/README
%{_bindir}/%{name}
%{_bindir}/%{name}-smp
%{_bindir}/%{name}-update
%{_bindir}/q3ded
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/%{name}-update.autodlrc

%files demo
%defattr(-,root,root,-)
%{_bindir}/%{name}-demo
%{_datadir}/%{name}/%{name}.autodlrc
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/64x64/apps/%{name}.png

%files -n urbanterror
%defattr(-,root,root,-)
%{_bindir}/urbanterror
%{_datadir}/%{name}/urbanterror.autodlrc
%{_datadir}/applications/fedora-urbanterror.desktop
%{_datadir}/icons/hicolor/128x128/apps/urbanterror.png

%files -n worldofpadman
%defattr(-,root,root,-)
%{_bindir}/worldofpadman
%{_datadir}/%{name}/worldofpadman.autodlrc
%{_datadir}/applications/fedora-worldofpadman.desktop
%{_datadir}/icons/hicolor/32x32/apps/wop.png


%changelog
* Tue Jan 27 2009 Hans de Goede <hdegoede@redhat.com> 1.34-0.10.rc4
- Update (fix) autodlrc mirror URL's (rh 481592)

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

* Thu Jan 17 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 1.34-0.8.rc4
- Properly recognize the demo pak0 file instead of complaining that no valid
  pak0 was found

* Fri Jan 11 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 1.34-0.7.rc4
- Various patches to make openarena work with the generic ioquake3 we ship
- Update urbanterror launcher script to set a much bigger com_hunkMegs,
  otherwise urbanterror will abort when loading bigger levels

* Sun Dec 23 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.34-0.6.rc4
- Update urbanterror autodlrc file to refer to version 4.1 (was 4.0)

* Sun Dec 23 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.34-0.5.rc4
- Split of the demo launcher into a quake3-demo package, so that when for
  example openarena requires quake3 for the engine people don't automatically
  get the demo launcher installed
- Add installer / launcher for Urban Terror in an urbanterror subpackage
  (bz 385771)
- Add installer / launcher for World of Padman in a worldofpadman subpackage

* Wed Dec 12 2007 Alexey Kuznetsov <kuznetsov.alexey@gmail.com> 1.34-0.4.rc4
- Add quake3-update srcipt.

* Thu Sep 27 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.34-0.3.rc4
- Update autodlrc file to use fast mirrors instead of the slow and unreliable
  official ID software site

* Tue Sep 25 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.34-0.2.rc4
- Use autodownloader to download demo files, thus making the game playable
  without the original CD
- Submit for Fedora inclusion now that the game is playable without the CD
- Update to 1.34-rc4
- Use system libjpeg, system SDL, OpenAL and curl headers

* Mon Sep 18 2006 Matthias Saou <http://freshrpms.net/> 1.34-0.1.rc2.svn908
- Update to today's svn code (rev. 908), rc2 from the 1.34 branch.

* Mon May 29 2006 Matthias Saou <http://freshrpms.net/> 1.34-0.1.rc1.svn792
- Update to today's svn code (rev. 792).
- Update the nostrip patch.
- Fix wrapper script since the binary has been renamed from quake3 to
  ioquake3.<arch>, which we rename to plain ioquake3 (in the patch).
- Include new documentation.

* Fri Mar 17 2006 Matthias Saou <http://freshrpms.net/> 1.34-0.1.rc1.svn649
- Update to today's svn code (rev. 649).
- Update nostrip patch, now pass OPTFLAGS to the build too.
- Build requires subversion (required for make dist).

* Fri Jan 13 2006 Matthias Saou <http://freshrpms.net/> 1.33-0.2.svn470
- Update to today's svn sode (rev. 470).
- Add modular xorg build conditional.
- Revisit nostrip patch for the new code.
- Add (new?) openal-devel build requirement.
- Update %%doc files.

* Sun Nov 13 2005 Matthias Saou <http://freshrpms.net/> 1.33-0.1.svn338
- Update to GPL'ed 1.33 and spec file cleanup.

* Sun Oct 15 2000 Matthias Saou <http://freshrpms.net/> 1.17-1
- Initial RPM based on Loki's 1.17 point release