From 447378d17fb6b79cd5a022605bd15c5d10cedeffef8c65b324ca9036c0897cf4 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Fri, 19 Mar 2010 09:36:38 +0000 Subject: [PATCH] Accepting request 35180 from games Copy from games/bzflag based on submit request 35180 from user coolo OBS-URL: https://build.opensuse.org/request/show/35180 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bzflag?expand=0&rev=11 --- ...ff => bzflag-1.10.4-ncursespollution.patch | 0 ...tch => bzflag-2.0.10-array-subscript.patch | 0 bzflag-decl.diff => bzflag-decl.patch | 0 bzflag.changes | 5 + bzflag.desktop | 1 + bzflag-icon.png => bzflag.png | 0 bzflag.spec | 424 ++---------------- rc.bzflagserver | 134 +++--- sysconfig.bzflagserver-bzflag | 18 +- 9 files changed, 114 insertions(+), 468 deletions(-) rename bzflag-1.10.4-ncursespollution.diff => bzflag-1.10.4-ncursespollution.patch (100%) rename bzflag-2.0.10_array-subscript2.patch => bzflag-2.0.10-array-subscript.patch (100%) rename bzflag-decl.diff => bzflag-decl.patch (100%) rename bzflag-icon.png => bzflag.png (100%) diff --git a/bzflag-1.10.4-ncursespollution.diff b/bzflag-1.10.4-ncursespollution.patch similarity index 100% rename from bzflag-1.10.4-ncursespollution.diff rename to bzflag-1.10.4-ncursespollution.patch diff --git a/bzflag-2.0.10_array-subscript2.patch b/bzflag-2.0.10-array-subscript.patch similarity index 100% rename from bzflag-2.0.10_array-subscript2.patch rename to bzflag-2.0.10-array-subscript.patch diff --git a/bzflag-decl.diff b/bzflag-decl.patch similarity index 100% rename from bzflag-decl.diff rename to bzflag-decl.patch diff --git a/bzflag.changes b/bzflag.changes index c053fed..d9ba74b 100644 --- a/bzflag.changes +++ b/bzflag.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 18 12:13:15 UTC 2010 - prusnak@novell.com + +- cleanup spec file + ------------------------------------------------------------------- Mon Sep 8 13:53:30 CEST 2008 - hvogel@suse.de diff --git a/bzflag.desktop b/bzflag.desktop index 86a9624..703c647 100644 --- a/bzflag.desktop +++ b/bzflag.desktop @@ -13,3 +13,4 @@ GenericName[es]=Juego de guerra de tanques 3D multijugador en red Name[hu]=3D-s hálózati többjátékos tankcsata játék GenericName[hu]=3D-s hálózati többjátékos tankcsata játék GenericName[cs]=3D síťová tanková bitva pro více hráčů +Categories=Game;ActionGame; diff --git a/bzflag-icon.png b/bzflag.png similarity index 100% rename from bzflag-icon.png rename to bzflag.png diff --git a/bzflag.spec b/bzflag.spec index f36d987..35535fa 100644 --- a/bzflag.spec +++ b/bzflag.spec @@ -1,7 +1,7 @@ # # spec file for package bzflag (Version 2.0.12) # -# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 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 @@ -20,23 +20,22 @@ Name: bzflag BuildRequires: bc curl-devel freeglut-devel gcc-c++ libcares-devel libdrm-devel ncurses-devel update-desktop-files -License: GPL v2 or later +License: GPLv2+ Group: Amusements/Games/3D/Shoot -AutoReqProv: on Version: 2.0.12 -Release: 1 +Release: 5 Summary: 3D Networked Multiplayer Tank Battle Game Url: http://BZFlag.org/ -Source: %name-%version.tar.bz2 +Source: %{name}-%{version}.tar.bz2 Source2: rc.bzflagserver -Source3: bzflag-maps.tar.bz2 +Source3: %{name}-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 +Source5: %{name}.desktop +Source6: %{name}.png +Patch: %{name}-1.10.4-ncursespollution.patch +Patch1: %{name}-decl.patch +Patch3: %{name}-char-signedness.patch +Patch5: %{name}-2.0.10-array-subscript.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %insserv_prereq %fillup_prereq @@ -46,7 +45,7 @@ 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. +Find server maps in /usr/share/bzflag/maps. @@ -67,9 +66,8 @@ 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 \ - --with-pic +%configure \ + --with-pic make %{?jobs:-j %jobs} all %preun @@ -84,18 +82,15 @@ make %{?jobs:-j %jobs} all %install #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 +install -D -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/bzflagserver +mkdir -p $RPM_BUILD_ROOT%{_sbindir} +ln -s %{_sysconfdir}/init.d/bzflagserver $RPM_BUILD_ROOT%{_sbindir}/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 +install -D -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_localstatedir}/adm/fillup-templates/sysconfig.bzflagserver-bzflag +mkdir -p $RPM_BUILD_ROOT%{_datadir}/bzflag/maps +install -m 644 maps/*bzmap $RPM_BUILD_ROOT%{_datadir}/bzflag/maps +install -D -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_datadir}/pixmaps/bzflag.png +%suse_update_desktop_file -i %{name} %clean rm -rf $RPM_BUILD_ROOT @@ -104,370 +99,15 @@ rm -rf $RPM_BUILD_ROOT %defattr(-, root, root) %doc AUTHORS BUGS COPYING PORTING README DEVINFO README.UNIX %doc RELNOTES TODO README.Linux misc/bzfs.conf -/etc/init.d/bzflagserver -/usr/sbin/rcbzflagserver -/usr/bin/* -/usr/share/games/bzflag -/usr/share/applications/bzflag.desktop -/usr/share/pixmaps/bzflag.png -%_mandir/man6/* -%_mandir/man5/* -/var/adm/fillup-templates/sysconfig.bzflagserver-bzflag +%{_sysconfdir}/init.d/bzflagserver +%{_sbindir}/rcbzflagserver +%{_bindir}/* +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/* +%{_datadir}/applications/%{name}.desktop +%{_datadir}/pixmaps/%{name}.png +%{_mandir}/man5/* +%{_mandir}/man6/* +%{_localstatedir}/adm/fillup-templates/sysconfig.bzflagserver-bzflag %changelog -* Mon Sep 08 2008 hvogel@suse.de -- 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 hvogel@suse.de -- update to latest 2.0 branch svn to fix various c-ares bugs - [bnc#378717] -- add short description to init script -- build against ncurses for bzadmin -* Mon Apr 07 2008 crrodriguez@suse.de -- 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 hvogel@suse.de -- 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 pgajdos@suse.cz -- added missing includes according to new gcc - * missing-includes.patch -* Mon Apr 16 2007 pgajdos@suse.cz -- fixed 'warning: array subscript is below array bounds' [#229908] -- array_subscript2.patch -* Tue Mar 13 2007 pgajdos@suse.cz -- fixed 'warning: array subscript is below array bounds' -- array_subscript.patch -* Wed Jan 10 2007 hvogel@suse.de -- fix make install issue with mkdir -* Fri Jun 30 2006 duwe@suse.de -- 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 - routers - * 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 mmj@suse.de -- 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/bzfquery.pl to handle MsgGameTime - o Simple server list searching - o Added GUI option for email display length -* Wed Feb 01 2006 hvogel@suse.de -- fix BZFlag NULL Byte callsign DOS bug [#141121] -* Wed Jan 25 2006 mls@suse.de -- converted neededforbuild to BuildRequires -* Mon Jan 23 2006 mmj@suse.de -- Build without SDL support for now, since it's broken [#143932] -* Tue Nov 08 2005 mmj@suse.de -- 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 schwab@suse.de -- Add SDL-devel-packages to neededforbuild. -* Fri Sep 30 2005 stbinner@suse.de -- fixed .desktop file -* Mon Aug 22 2005 hvogel@suse.de -- fix data type comparison [Bug #104607] -* Fri Jul 15 2005 hvogel@suse.de -- 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 schwab@suse.de -- Build with -fno-strict-aliasing [#85848]. -* Wed Jun 08 2005 mmj@suse.de -- Add sysconfig variable for newbies -* Mon May 23 2005 schwab@suse.de -- Fix missing declaration. -* Wed Mar 30 2005 mmj@suse.de -- Update to 2.0.2 which is a bugfix release -* Tue Jan 18 2005 mmj@suse.de -- 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 mmj@suse.de -- Update urbancombat map to fit newer BZFlag versions -* Mon Oct 11 2004 mmj@suse.de -- 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 mmj@suse.de -- 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 mmj@suse.de -- Add missing sample bzflagserver configuration file to the docu- - mentation -* Tue Jan 27 2004 mmj@suse.de -- Update to 1.10.4 -- Undefine bool after ncurses include -* Tue Jan 20 2004 mmj@suse.de -- Add std::streamoff() wrapper (gcc 3.4) -- It's CPPFLAGS and CFLAGS now -* Tue Dec 30 2003 mmj@suse.de -- Run the bzflagserver as nobody:nobody -* Sun Dec 28 2003 mmj@suse.de -- 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 mmj@suse.de -- Adjust the sysconfig file settings -* Thu Dec 11 2003 mmj@suse.de -- 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 mmj@suse.de -- Don't build as root -* Sat Sep 13 2003 sndirsch@suse.de -- fixed icon name in desktop file -* Thu Sep 11 2003 adrian@suse.de -- make the menu texts a bit nicer -- remove unneeded X-SuSE before Categories -* Thu Aug 14 2003 mmj@suse.de -- Add sysconfig activation metadata -* Mon Aug 11 2003 mmj@suse.de -- Add a desktop file and an icon -* Wed Jul 30 2003 mmj@suse.de -- Use new macros for stop/restart of services on rpm update/removal -* Thu Jun 19 2003 mmj@suse.de -- Don't package the stuff in /usr/share/games/bzflag/bzflag -* Wed Jun 18 2003 mmj@suse.de -- Update to 1.7g2 -* Mon Jun 02 2003 mmj@suse.de -- Fix typo -* Fri Feb 07 2003 mmj@suse.de -- Add /etc/sysconfig/bzflagserver with parameters for the bzflag - server. -- Tiny specfile cleanup -* Mon Dec 09 2002 mmj@suse.de -- 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 mmj@suse.de -- Added some maps -* Thu Nov 14 2002 mmj@suse.de -- Make neededforbuild more current -* Tue Sep 17 2002 ro@suse.de -- removed bogus self-provides -* Thu Aug 15 2002 mmj@suse.de -- Add PreReq for insserv. -* Thu Aug 01 2002 mmj@suse.de -- Remove insserv call -* Sun Jul 28 2002 mmj@suse.de -- Fix specfile for ppc64 -* Tue Jul 16 2002 mmj@suse.de -- 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 schwab@suse.de -- Fix typo in spec file. -* Sat May 18 2002 mmj@suse.de -- Fixed the startup script. -* Fri May 17 2002 mmj@suse.de -- Added a startup script for the BZFlag server, also changed - Bzflag to BZFlag in all descriptions -* Fri May 10 2002 mmj@suse.de -- Introduce lib64 configure option for the platforms using 64 bit - libraries. -* Wed Apr 24 2002 schwab@suse.de -- Fix for gcc 3.1. -* Fri Jan 11 2002 ro@suse.de -- no subdirs in /usr/games -* Wed Jan 02 2002 adrian@suse.de -- fix build for mips and arm -* Fri Dec 07 2001 grimmer@suse.de -- update to 1.7e4 -* Thu Nov 08 2001 ro@suse.de -- use mesa-devel-packages in neededforbuild -* Wed Jul 11 2001 grimmer@suse.de -- update to 1.7e2 -* Mon Jul 09 2001 sndirsch@suse.de -- xdevel3 for #neededforbuild not required any more -* Tue May 08 2001 mfabian@suse.de -- bzip2 sources -* Mon Mar 19 2001 grimmer@suse.de -- Update to version 1.7e1 -- created new patch, added wrapper script as separate source - file -- spec file fixes / cleanups -- removed hard coded requirement on mesa (RPM can take care of that) -* Thu Mar 15 2001 ro@suse.de -- changed neededforbuild to -- changed neededforbuild to -* Wed Mar 07 2001 ro@suse.de -- changed neededforbuild to -* Mon Nov 13 2000 ro@suse.de -- don't redeclare inet_aton -* Tue Aug 01 2000 grimmer@suse.de -- replaced #neededforbuild xdevel with xdevel3 -* Mon Jun 05 2000 ro@suse.de -- added mesadev to neededforbuild -* Fri Apr 14 2000 schwab@suse.de -- Use generic linux configuration for ia64. -* Thu Mar 16 2000 grimmer@suse.de -- Update to 1.7d.9 -- Added BuildRoot -- added bzfrelay and bzfls (incl. manpages) -* Mon Jan 24 2000 uli@suse.de -- added -D__linux to PC*FLAGS (needed for gcc 2.95) -* Fri Jan 21 2000 grimmer@suse.de -- spec file cleanups (added URL, Group and version macro) -* Fri Jan 21 2000 ro@suse.de -- use _GNU_SOURCE -* Mon Dec 20 1999 kukuk@suse.de -- fixed for SPARC -* Mon Sep 13 1999 bs@suse.de -- ran old prepare_spec on spec file to switch to new prepare_spec. -* Tue Aug 31 1999 uli@suse.de -- fixed for PPC -* Tue Jun 22 1999 grimmer@suse.de -- initial package (Version 1.7c) diff --git a/rc.bzflagserver b/rc.bzflagserver index b960657..5933e73 100644 --- a/rc.bzflagserver +++ b/rc.bzflagserver @@ -11,7 +11,7 @@ # /usr/sbin/rcbzflagserver # # LSB compliant service control script; see http://www.linuxbase.org/spec/ -# +# # System startup script for the BZFlag gameserver # ### BEGIN INIT INFO @@ -22,9 +22,9 @@ # Default-Stop: 0 1 2 6 # Short-Description: bzflag server daemon # Description: Start bzflagserver to provide a server for the popular -# tank game BZFlag, http://www.bzflag.org +# tank game BZFlag, http://www.bzflag.org ### END INIT INFO -# +# # Note on Required-Start: It does specify the init script ordering, # not real dependencies. Depencies have to be handled by admin # resp. the configuration tools (s)he uses. @@ -34,12 +34,12 @@ rc_reset if [ -f /etc/sysconfig/bzflagserver ]; then - . /etc/sysconfig/bzflagserver + . /etc/sysconfig/bzflagserver else - echo "Could not find /etc/sysconfig/bzflagserver" - echo "Please start the bzflagserver manually" - rc_failed 1 - rc_status -v + echo "Could not find /etc/sysconfig/bzflagserver" + echo "Please start the bzflagserver manually" + rc_failed 1 + rc_status -v fi # Check for missing binaries (stale symlinks should not happen) @@ -48,85 +48,85 @@ test -x $BZFLAGSERVER_BIN || exit 5 # See /etc/sysconfig/bzflagserver for options to the bzfs if [ "$BZFLAGSERVER_PUBLIC" = "yes" ] ; then - PUBLIC="-public" + PUBLIC="-public" fi if [ "$BZFLAGSERVER_NEWBIE" = "yes" ] ; then - HANDICAP="-handicap" + HANDICAP="-handicap" fi case "$1" in start) - echo -n "Starting bzflagserver" + echo -n "Starting bzflagserver" - if [ "$BZFLAGSERVER_SRVMSG" ] ; then - startproc -u nobody -g nobody $BZFLAGSERVER_BIN \ - $BZFLAGSERVER_OPTS $PUBLIC -p "$BZFLAGSERVER_PORT" \ - -world "/usr/share/games/bzflag/maps/$BZFLAGSERVER_WORLD" \ - -srvmsg "$BZFLAGSERVER_SRVMSG" $HANDICAP - else - startproc -u nobody -g nobody $BZFLAGSERVER_BIN \ - $BZFLAGSERVER_OPTS $PUBLIC -p "$BZFLAGSERVER_PORT" \ - -world "/usr/share/games/bzflag/maps/$BZFLAGSERVER_WORLD" \ - $HANDICAP - fi - # Remember status and be verbose - rc_status -v - ;; + if [ "$BZFLAGSERVER_SRVMSG" ] ; then + startproc -u nobody -g nobody $BZFLAGSERVER_BIN \ + $BZFLAGSERVER_OPTS $PUBLIC -p "$BZFLAGSERVER_PORT" \ + -world "/usr/share/games/bzflag/maps/$BZFLAGSERVER_WORLD" \ + -srvmsg "$BZFLAGSERVER_SRVMSG" $HANDICAP + else + startproc -u nobody -g nobody $BZFLAGSERVER_BIN \ + $BZFLAGSERVER_OPTS $PUBLIC -p "$BZFLAGSERVER_PORT" \ + -world "/usr/share/games/bzflag/maps/$BZFLAGSERVER_WORLD" \ + $HANDICAP + fi + # Remember status and be verbose + rc_status -v + ;; stop) - echo -n "Shutting down bzflagserver" - ## Stop daemon with killproc(8) and if this fails - ## set echo the echo return value. + echo -n "Shutting down bzflagserver" + ## Stop daemon with killproc(8) and if this fails + ## set echo the echo return value. - killproc -TERM $BZFLAGSERVER_BIN + killproc -TERM $BZFLAGSERVER_BIN - # Remember status and be verbose - rc_status -v - ;; + # Remember status and be verbose + rc_status -v + ;; try-restart) - ## Stop the service and if this succeeds (i.e. the - ## service was running before), start it again. - ## Note: try-restart is not (yet) part of LSB (as of 0.7.5) - $0 status >/dev/null && $0 restart + ## Stop the service and if this succeeds (i.e. the + ## service was running before), start it again. + ## Note: try-restart is not (yet) part of LSB (as of 0.7.5) + $0 status >/dev/null && $0 restart - # Remember status and be quiet - rc_status - ;; + # Remember status and be quiet + rc_status + ;; restart) - ## Stop the service and regardless of whether it was - ## running or not, start it again. - $0 stop - $0 start + ## Stop the service and regardless of whether it was + ## running or not, start it again. + $0 stop + $0 start - # Remember status and be quiet - rc_status - ;; + # Remember status and be quiet + rc_status + ;; force-reload) - $0 stop && $0 start - rc_status - ;; + $0 stop && $0 start + rc_status + ;; reload) - rc_failed 3 - rc_status -v - ;; + rc_failed 3 + rc_status -v + ;; status) - echo -n "Checking for service bzflagserver: " - ## Check status with checkproc(8), if process is running - ## checkproc will return with exit status 0. + echo -n "Checking for service bzflagserver: " + ## Check status with checkproc(8), if process is running + ## checkproc will return with exit status 0. - # Return value is slightly different for the status command: - # 0 - service running - # 1 - service dead, but /var/run/ pid file exists - # 2 - service dead, but /var/lock/ lock file exists - # 3 - service not running + # Return value is slightly different for the status command: + # 0 - service running + # 1 - service dead, but /var/run/ pid file exists + # 2 - service dead, but /var/lock/ lock file exists + # 3 - service not running - # NOTE: checkproc returns LSB compliant status values. - checkproc $BZFLAGSERVER_BIN - rc_status -v - ;; + # NOTE: checkproc returns LSB compliant status values. + checkproc $BZFLAGSERVER_BIN + rc_status -v + ;; *) - echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}" - exit 1 - ;; + echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}" + exit 1 + ;; esac rc_exit diff --git a/sysconfig.bzflagserver-bzflag b/sysconfig.bzflagserver-bzflag index 667f0c2..40123d5 100644 --- a/sysconfig.bzflagserver-bzflag +++ b/sysconfig.bzflagserver-bzflag @@ -1,8 +1,8 @@ -## Path: Applications/Games/BZFlagserver -## Description: Configuration of the BZFlag server -## Type: string -## Default: "teleport.bzmap" -## ServiceRestart: bzflagserver +## Path: Applications/Games/BZFlagserver +## Description: Configuration of the BZFlag server +## Type: string +## Default: "teleport.bzmap" +## ServiceRestart: bzflagserver # # The map to use on the server. Have a look at the available maps in # /usr/share/games/bzflag/maps for available maps. @@ -17,28 +17,28 @@ BZFLAGSERVER_WORLD="teleport.bzmap" # BZFLAGSERVER_OPTS="+f good -st 15 +s 5" -## Type: string +## Type: string ## Default: "" # # Define a server welcome message # BZFLAGSERVER_SRVMSG="" -## Type: yesno +## Type: yesno ## Default: off # # Define whether the server should be public for other players on the internet # BZFLAGSERVER_PUBLIC="no" -## Type: integer +## Type: integer ## Default: 5155 # # What port should the server listen to? The BZFlag game standard is 5155. # BZFLAGSERVER_PORT="5155" -## Type: yesno +## Type: yesno ## Default: off # # Define whether the server should punish people who are too good players