File tremulous.spec of Package tremulous22
#
# spec file for package tremulous
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: tremulous
Version: 1.1.0
Release: 0
Summary: First Person Shooter game based on the Quake 3 engine
License: GPL-2.0+
Group: Amusements/Games/Action/Shoot
Url: http://tremulous.net/
# this is %%{name}-%%{version}-src.tar.gz as containted in:
# http://downloads.sourceforge.net/%%{name}/%%{name}-%%{version}.zip
# with the src/tools/lcc dir removed as that contains non Free software
Source0: %{name}-%{version}-src-nolcc.tar.bz2
Source1: %{name}.desktop
Source2: %{name}.png
# PATCH-FIX-OPENSUSE tremulous-1.1.0-syslibs.patch
Patch0: %{name}-%{version}-syslibs.patch
# PATCH-FIX-OPENSUSE tremulous-1.1.0-overflow.patch
Patch1: %{name}-%{version}-overflow.patch
# PATCH-FIX-UPSTREAM fix-x86-with-new-gcc.patch -- Fix build on x86 with new gcc versions
Patch2: fix-x86-with-new-gcc.patch
BuildRequires: Mesa-devel
BuildRequires: SDL-devel
BuildRequires: libjpeg-devel
BuildRequires: libvorbis-devel
BuildRequires: openal-soft-devel
BuildRequires: update-desktop-files
Requires: opengl-games-utils
Requires: tremulous-data = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} <= 1220
BuildRequires: libopenal1
%endif
%description
Tremulous is a free, open source game that blends a team based FPS
with elements of an RTS.
Players can choose from 2 unique races, aliens and humans.
Players on both teams are able to build working structures in-game like an RTS.
These structures provide many functions, the most important being spawning.
The designated builders must ensure there are spawn structures or
other players will not be able to rejoin the game after death.
Other structures provide automated base defense (to some degree),
healing functions and much more...
Player advancement is different depending on which team you are on.
As a human, players are rewarded with credits for each alien kill.
These credits may be used to purchase new weapons and upgrades from the Armoury
The alien team advances quite differently. Upon killing a human foe,
the alien is able to evolve into a new class.
The more kills gained the more powerful the classes available.
The overall objective behind Tremulous is to eliminate the opposing team.
This is achieved by not only killing the opposing players but also
removing their ability to respawn by destroying their spawn structures.
%prep
%setup -q -n %{name}-%{version}-src
%patch0 -p1
%patch1
%patch2 -p1
# Rip out the jpeg sources and the SDL and freealut headers and use the
# system versions instead
mv src/jpeg-6/jmemnobs.c .; rm -f src/jpeg-6/*; mv jmemnobs.c src/jpeg-6
rm -rf src/SDL12 src/AL
%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="%{optflags} -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
mkdir -p %{buildroot}%{_bindir}
install -m 0755 build/release-linux-*/tremded.* \
%{buildroot}%{_bindir}/tremded
install -m 0755 build/release-linux-*/tremulous.* \
%{buildroot}%{_bindir}/%{name}
ln -s opengl-game-wrapper.sh %{buildroot}%{_bindir}/%{name}-wrapper
%suse_update_desktop_file -i %{name} Game ActionGame
%files
%defattr(-,root,root,-)
%doc ChangeLog COPYING GPL
%{_bindir}/%{name}*
%{_bindir}/tremded
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%changelog