File bzflag.spec of Package bzflag

# spec file for package bzflag (Version 2.0.12)
# Copyright (c) 2008 SUSE LINUX Products 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

# norootforbuild

Name:           bzflag
BuildRequires:  bc curl-devel freeglut-devel gcc-c++ libcares-devel libdrm-devel ncurses-devel update-desktop-files
License:        GPL v2 or later
Group:          Amusements/Games/3D/Shoot
AutoReqProv:    on
Version:        2.0.12
Release:        1
Summary:        3D Networked Multiplayer Tank Battle Game
Source:         %name-%version.tar.bz2
Source2:        rc.bzflagserver
Source3:        bzflag-maps.tar.bz2
Source4:        sysconfig.bzflagserver-bzflag
Source5:        bzflag.desktop
Source6:        bzflag-icon.png
Patch:          bzflag-1.10.4-ncursespollution.diff
Patch1:         bzflag-decl.diff
Patch3:         bzflag-char-signedness.patch
Patch5:         %{name}-2.0.10_array-subscript2.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         %insserv_prereq %fillup_prereq

BZFlag is a 3D multiplayer tank battle game that allows users to play
against each other in a networked environment. Because it makes heavy
use of 3D graphics (OpenGL), a fast CPU or a supported 3D video card is
heavily recommended.

Find server maps in /usr/share/games/bzflag/maps.

    Chris Schoeneman <>
    Tim Riker <>

%setup -q -a 3
%patch -p1
%patch3 -p1
cp %SOURCE2 .

autoreconf -fiv
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure	\
		--datadir=/usr/share/games \
make %{?jobs:-j %jobs} all

%stop_on_removal bzflagserver

%fillup_only -an bzflagserver

%restart_on_update bzflagserver

#Init script for the BZFlag server
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install -m 755 rc.bzflagserver $RPM_BUILD_ROOT/etc/init.d/bzflagserver
mkdir -p $RPM_BUILD_ROOT/usr/sbin
ln -s ../../etc/init.d/bzflagserver $RPM_BUILD_ROOT/usr/sbin/rcbzflagserver
make MKDIR_P="mkdir -p --" DESTDIR=$RPM_BUILD_ROOT install
install -d -m 755 $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 %{S:4} $RPM_BUILD_ROOT/var/adm/fillup-templates
mkdir -p $RPM_BUILD_ROOT/usr/share/games/bzflag/maps
install -m 644 maps/*bzmap $RPM_BUILD_ROOT/usr/share/games/bzflag/maps
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps/
install -m 644 %{S:6} $RPM_BUILD_ROOT/usr/share/pixmaps/bzflag.png
%suse_update_desktop_file -i %name Game ActionGame


%defattr(-, root, root)
%doc RELNOTES TODO README.Linux misc/bzfs.conf

* Mon Sep 08 2008
- Update to 2.0.12
  * Fix for memory leaks
  * Remove extra dir separator from cache entries
  * Configurable "defaultFOV" (60 deg) for widescreen users
  * Queue spawns after flag captures
  * Fix kill callback when is coming from server
  * Various permission fixes
  * gcc-4.3 fixes
* Mon Apr 21 2008
- update to latest 2.0 branch svn to fix various c-ares bugs
- add short description to init script
- build against ncurses for bzadmin
* Mon Apr 07 2008
- bzflag no longer uses adns but a bundled copy of libcares,
  update the spec file to use system c-ares instead.
* Wed Jan 16 2008
- Update to bzflag-2.0.10:
  * Add /modcount command
  * Add -adminlagannounce and -lagannounce
  * First map no longer ignored in Start Server menu
  * Add packet loss kick and related admin commands
  * Plugins get flag resets/spawns/grab/drop/transfer
  * Added more info for observers
  * Optionally use mesh position and height for radar
  * Add various new plugins (rabidRabbit, rabbitTimer torBlock regFlag, etc.)
  * Add favorite server
  * Some API changes
  * Adding jitter kick and related admin commands
  * Ability to change the killer in a PlayerDieEvent
  * Backport the record stop function from 2.1
  * Backported WW GMs from 2.1
* Tue Oct 16 2007
- added missing includes according to new gcc
  * missing-includes.patch
* Mon Apr 16 2007
- fixed 'warning: array subscript is below array bounds' [#229908]
- array_subscript2.patch
* Tue Mar 13 2007
- fixed 'warning: array subscript is below array bounds'
- array_subscript.patch
* Wed Jan 10 2007
- fix make install issue with mkdir
* Fri Jun 30 2006
- update to upstream version 2.0.8:
  * Add a plugin to record matches
  * Add an option to send out a UDP heartbeat message for observers behind flakey
  * Replaced admin message sound
  * Client and server now close http connections correctly
  * Fixed crash when rogue autopilot picks up a team flag
  * Fixed spawnpoint selection regression
* Fri May 05 2006
- Devel package is gone
- Update to bzflag-2.0.6:
  o game variables no longer accept invalid values.
  o Special Effects use tank (was team) color
  o /reset uses the values from the config and the map as default
  o Sreenshots now remember where they left off
  o Have windows dump std::error out to a file
  o Various API enhancmentes
  o Not applauding when capturing his own flag
  o Fixing crash on invalid captured flag
  o Fixed bots on a public server
  o Don't send admin the server password when wrong
  o Client config file can be saved on request
  o Allow for longer help files (50 lines)
  o Allow selective /reload of databases
  o Fix wrong kick if pausing having V and moving
  o Prevent long distance tank warping through walls
  o Display paused state when screen capturing while playing
  o Added new logDetail plugin
  o Fixed issue with denial-of-service message attacks
  o Support for -window on Mac command line executions
  o Show slot numbers in lagstats (if admin)
  o FPS limit energy saver option for laptops
  o Send admin channel warning if /password fails
  o Known players not authenticated are detected
  o Added /checkip command
  o "Enable Local Shot/Spawn Effects" affects "Driving with"
  o Show shot reload indicators when driving with a tank
  o Fix misc/ to handle MsgGameTime
  o Simple server list searching
  o Added GUI option for email display length
* Wed Feb 01 2006
- fix BZFlag NULL Byte callsign DOS bug [#141121]
* Wed Jan 25 2006
- converted neededforbuild to BuildRequires
* Mon Jan 23 2006
- Build without SDL support for now, since it's broken [#143932]
* Tue Nov 08 2005
- Split -devel package off for plugin stuff
- Update to 2.0.4 including:
  o Automatic team icon
  o Fixed server join bug when cached worlds disappear
  o Prevent phantom zoned players from pausing
  o Implemented multiple player hunt
  o Directional keys pressing works, even in joy/mouse mode
  o Jitter compensation removed. Too bad behaviour on ME players
  o Put spawn params in BZDB to let server owners mod them as needed
  o Fixed ban admin bug
  o Added /sendhelp command
  o /ban /hostban take time keywords (short ...) too
  o Inertia style indicatio no more used
  o No more restriction on M (Momentum) flag
  o Fixing authentication when changing callsign/password
  o Fixing authentication when joining from command-line
  o Executing abbreviated server command '*' terminated
  o Getting one-line-help on server command '?' terminated
  o Fixing bzflag use of system-wide regex (--without-regex)
  o Adding destination info to chat message log
  o Adding syntax check to duration parameter of ban cmds
  o Hud outlines go transparent with the hud panel
  o Better progress info when downloading textures
  o Add Quake3 BSP import to modeltool
  o Exit BZFS if -g is used with -mts or -mps
  o Experimental server colorizing in server list
  o Added sort options to "/replay list" and "/record list"
  o Map mismatch fixed
  o Quick server command key works better
  o Default server side plugins added to windows build
  o Include web token verification script
  o Fix texture cache on windows.
  o Disallow + or @ as first char of callsign (bzfs)
  o Wait for reverse DNS and authentication to enter game
  o Antiban works even on IP number
  o Sort lagstat to have non-observer at the bottom
  o Authentication credential are requested asap
  o Allow the use of game device sliders as axes on Windows
  o Directional force feedback support
  o New icon and menu arrow
  o Special effects for many events
  o Server-side plugin API and plugins
  o Join menu displays team icon
  o Implemented "-advertise" option for bzfs
  o The url now does not contain the password (sent with POST)
  o Fixing Tiny tank shooting from the world edge
  o Fixing client requesting lan server on some systems
  o Observer are no more hunted
  o Added 'Always Show Team Scores' option (GUI Options Menu)
  o Added beautify scores
  o Added scoreboard sort option
  o Shots fired over the boundary wall end at the wall
  o Increase range of radar size setting in GUI Option menu
  o Fixed Menu rendering when radar size is great
  o Fixed Linux name resolution (server list) problem
  o Fixed Jitter problem on Windows, clock was wrong
  o Windows platform can switch from SDL to native
  o Instruction for X-build from linux to windows
  o bzflag is much less blocking with libcurl
  o Using c-ares instead of adns for DNS resolving
  o Added CTF capture event trigger for world weapons
  o FlipZ on meshpyrs behaves as expected (like pyramids)
  o Fixed /set and /reset command case bug
  o Fixed crash on /ban without -banfile
  o Shot reload timer on the HUD
  o Added timestamp to bzfs DEBUG output, and new CL option (-ts)
  o Players without TALK can send to the Admin group
  o Fixed bzfs crash because poll kick/ban
  o Allow additional group modify permission lines
  o bzfs creates default groups before parsing groupdb file
  o +ALL and -ALL adds/removes all perms from a group in groupdb
  o Support for +,- and ! operators in bzfs' groupdb file
* Tue Oct 04 2005
- Add SDL-devel-packages to neededforbuild.
* Fri Sep 30 2005
- fixed .desktop file
* Mon Aug 22 2005
- fix data type comparison [Bug #104607]
* Fri Jul 15 2005
- Don't compile with -f-signed-char [#93873]
- add curl for MOTD, global bans, etc. (needs bc for the configure
  check *shrug*)
- add libadns for hostmask based bans (needs ssl)
* Thu Jun 23 2005
- Build with -fno-strict-aliasing [#85848].
* Wed Jun 08 2005
- Add sysconfig variable for newbies
* Mon May 23 2005
- Fix missing declaration.
* Wed Mar 30 2005
- Update to 2.0.2 which is a bugfix release
* Tue Jan 18 2005
- Update to 2.0.0 which introduces a slew of major new features
  making this probably the "biggest" release in BZFlag's history
  in terms of development time put into it and features being
  added since the last publicly released version. Major new
  features include support for vastly more complex worlds,
  physics drivers, graphics improvements, weather (rain, snow,
  frogs), tank treads and tracks, animations, record and
  playback, new flags, new commands, optimizations and much more.
  There is a new central registration system, global ban list
  support, network, new cheat preventions, and network
  optimizations in place as well.
* Tue Nov 02 2004
- Update urbancombat map to fit newer BZFlag versions
* Mon Oct 11 2004
- Update to 1.10.8 which is a maintenance release:
  o New list server URL
  o Added admin message sounds
  o Throw away bad or early links in world files
* Sat May 22 2004
- Update to 1.10.6 including:
  o Fixed the little hop on spawn at some sites
  o Fixed issue of players add/removing others from groups
  o Fixed false positive filter matches involving apostrophes
  o Curing ghost/duplicated/ungetable flag
  o Fixed 0 height flag, no more flags inside buildings
  o Observers see Masquerade tank with their true color
  o Password file now supports callsigns with non alphanumerics
  o Correctly read PNG textures with multiple IDAT chunks
  o bans based on hostmask (/hostban, ...) when adns is available
  o Fixed bug that allowed empty callsigns
  o server option to disallow autopilot
  o Bots drive around corners faster
  o Bots aim better, try to evade shots
* Thu Apr 29 2004
- Add missing sample bzflagserver configuration file to the docu-
* Tue Jan 27 2004
- Update to 1.10.4
- Undefine bool after ncurses include
* Tue Jan 20 2004
- Add std::streamoff() wrapper (gcc 3.4)
- It's CPPFLAGS and CFLAGS now
* Tue Dec 30 2003
- Run the bzflagserver as nobody:nobody
* Sun Dec 28 2003
- Update to 1.10.2 with a number of bugfixes including the one
  where Guided Missile was not capable of hitting ring 0 players.
* Fri Dec 12 2003
- Adjust the sysconfig file settings
* Thu Dec 11 2003
- Update to 1.10.0 which is incompatible with older versions of
  BZFlag, and brings a tremendous amount of new stuff, including
  new flags.
* Wed Oct 15 2003
- Don't build as root
* Sat Sep 13 2003
- fixed icon name in desktop file
* Thu Sep 11 2003
- make the menu texts a bit nicer
- remove unneeded X-SuSE before Categories
* Thu Aug 14 2003
- Add sysconfig activation metadata
* Mon Aug 11 2003
- Add a desktop file and an icon
* Wed Jul 30 2003
- Use new macros for stop/restart of services on rpm update/removal
* Thu Jun 19 2003
- Don't package the stuff in /usr/share/games/bzflag/bzflag
* Wed Jun 18 2003
- Update to 1.7g2
* Mon Jun 02 2003
- Fix typo
* Fri Feb 07 2003
- Add /etc/sysconfig/bzflagserver with parameters for the bzflag
- Tiny specfile cleanup
* Mon Dec 09 2002
- Update to 1.7g0 which include world file caching, team killers
  die, tank labels on roaming, new GUI options including a
  smaller display for slow systems (set opacity all the way up),
  and much more!
* Thu Nov 14 2002
- Added some maps
* Thu Nov 14 2002
- Make neededforbuild more current
* Tue Sep 17 2002
- removed bogus self-provides
* Thu Aug 15 2002
- Add PreReq for insserv.
* Thu Aug 01 2002
- Remove insserv call
* Sun Jul 28 2002
- Fix specfile for ppc64
* Tue Jul 16 2002
- Update to 1.7e6 which includes:
  o udp request fix for later clients
  o MsgEnter should not be patched for ID
  o Removed superfluous buffer copies in bzfs buffer sends
  o Better pack/unpack code for vectors [3]
  o Fix Teamflag drop over building when building at 0,0,0
  o Fix flags spawning in pyramids
  o Fix client crashes with UNKNOWNS
  o fix patchMessage for MsgAlive
  o fix find closest flag (ID) with flags on buildings
  o scale flags bases on elevation
  o don't scale radar based on screen res
  o flag radar updated
  o new admin commands
  o -pr for reconnect port (two port tcp)
* Sun May 19 2002
- Fix typo in spec file.
* Sat May 18 2002
- Fixed the startup script.
* Fri May 17 2002
- Added a startup script for the BZFlag server, also changed
  Bzflag to BZFlag in all descriptions
* Fri May 10 2002
- Introduce lib64 configure option for the platforms using 64 bit
* Wed Apr 24 2002
- Fix for gcc 3.1.
* Fri Jan 11 2002
- no subdirs in /usr/games
* Wed Jan 02 2002
- fix build for mips and arm
* Fri Dec 07 2001
- update to 1.7e4
* Thu Nov 08 2001
- use mesa-devel-packages in neededforbuild
* Wed Jul 11 2001
- update to 1.7e2
* Mon Jul 09 2001
- xdevel3 for #neededforbuild not required any more
* Tue May 08 2001
- bzip2 sources
* Mon Mar 19 2001
- Update to version 1.7e1
- created new patch, added wrapper script as separate source
- spec file fixes / cleanups
- removed hard coded requirement on mesa (RPM can take care of that)
* Thu Mar 15 2001
- changed neededforbuild <mesaglu> to <xf86glu>
- changed neededforbuild <mesaglu-devel> to <xf86glu-devel>
* Wed Mar 07 2001
- changed neededforbuild <mesadev> to <mesa-devel>
* Mon Nov 13 2000
- don't redeclare inet_aton
* Tue Aug 01 2000
- replaced #neededforbuild xdevel with xdevel3
* Mon Jun 05 2000
- added mesadev to neededforbuild
* Fri Apr 14 2000
- Use generic linux configuration for ia64.
* Thu Mar 16 2000
- Update to 1.7d.9
- Added BuildRoot
- added bzfrelay and bzfls (incl. manpages)
* Mon Jan 24 2000
- added -D__linux to PC*FLAGS (needed for gcc 2.95)
* Fri Jan 21 2000
- spec file cleanups (added URL, Group and version macro)
* Fri Jan 21 2000
* Mon Dec 20 1999
- fixed for SPARC
* Mon Sep 13 1999
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Tue Aug 31 1999
- fixed for PPC
* Tue Jun 22 1999
- initial package (Version 1.7c)