Skip to content

Commit

Permalink
Merge branch 'debian'
Browse files Browse the repository at this point in the history
Conflicts:
	CMakeLists.txt
	debian/changelog
  • Loading branch information
Darren Salt committed May 3, 2012
2 parents d0ca6bb + d6f1cf5 commit 87007fd
Show file tree
Hide file tree
Showing 18 changed files with 316 additions and 12 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
# #


cmake_minimum_required( VERSION 2.8 ) cmake_minimum_required( VERSION 2.8 )
cmake_policy( SET CMP0017 NEW ) if( POLICY CMP0017 )
cmake_policy( SET CMP0017 NEW )
endif()


set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ) set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" )
set( CMAKE_C_FLAGS "-msse2 -pipe" CACHE STRING "" ) set( CMAKE_C_FLAGS "-msse2 -pipe" CACHE STRING "" )
Expand Down
23 changes: 23 additions & 0 deletions debian/changelog
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,6 +4,29 @@ unvanquished (0.3.5+git-0) unstable; urgency=low


-- Darren Salt <linux@youmustbejoking.demon.co.uk> Tue, 01 May 2012 23:07:32 +0100 -- Darren Salt <linux@youmustbejoking.demon.co.uk> Tue, 01 May 2012 23:07:32 +0100


unvanquished (0.3.5-2) unstable; urgency=low

* Separate package for the dedicated server.
- Uses files from tremulous-server (Debian).
* fs_libpath should be in the search path.
* Fixed a typo which prevented use of xvid for demo video encoding.
* Silence CMP0017 warnings.

-- Darren Salt <linux@youmustbejoking.demon.co.uk> Thu, 03 May 2012 22:22:21 +0100

unvanquished (0.3.5-1) unstable; urgency=low

* Patch pulled in from the master branch:
- Walking dretches had footsteps.

-- Darren Salt <linux@youmustbejoking.demon.co.uk> Wed, 02 May 2012 02:49:32 +0100

unvanquished (0.3.5-0) unstable; urgency=low

* Release of alpha 3.

-- Darren Salt <linux@youmustbejoking.demon.co.uk> Tue, 01 May 2012 20:10:43 +0100

unvanquished (0.3.0-3) unstable; urgency=low unvanquished (0.3.0-3) unstable; urgency=low


* Tidy up Build-Depends. * Tidy up Build-Depends.
Expand Down
25 changes: 25 additions & 0 deletions debian/config/maprotation.cfg
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,25 @@
rotation1
{
Eden-b3
arachnid2
atcshd
atcszalpha-b2
bluedragon2_b3
citadel
cruz-b6
karith
methane-beta1
nano
nexus6
niveus
perseus-b3
plat23-b3
procyon-r1
sirius
spacetracks-r1
station15-r1
transit
tremor
veddak-final
wrecktify_b2
}
41 changes: 41 additions & 0 deletions debian/config/server.cfg
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,41 @@
//Example Unvanquished alpha release decicated server config

// Impure for the moment.
set sv_pure 0

//passwords
set g_needpass 0
//set g_password password //server password
//set rconPassword password //rcon password

//loading screen
set sv_hostname "Unvanquished Alpha Server"
set g_motd "http://unvanquished.net/"

//disallow downloads from the server
set sv_allowdownload 0

//maximum number of clients
//greater than 24 is not recommended from a gameplay point of view
set sv_maxclients 24

//These settings are used on the official Trem 1.2 & Unv public servers
//after 30 minutes, all build points are removed
set g_suddenDeathTime 30
//after 45 minutes, the game will end as a draw
set timelimit 45

//forces each team to have a similar number of players
set g_teamForceBalance 1

//following the first map, start this rotation
set g_initialMapRotation rotation1

//misc settings
set pmove_fixed 0
set sv_minRate 5000
set sv_maxRate 15000
set sv_minSnaps 10

//start this map first
map niveus
28 changes: 27 additions & 1 deletion debian/control
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -29,11 +29,37 @@ Vcs-Browser: http://github.com/Unvanquished/Unvanquished


Package: unvanquished Package: unvanquished
Architecture: any Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, curl Depends: ${shlibs:Depends}, ${misc:Depends}, curl,
unvanquished-common (= ${binary:Version})
Suggests: unvanquished-server
Description: Team-based FPS game, aliens v. humans Description: Team-based FPS game, aliens v. humans
Build a base, defend it against the other team, gain credits for better Build a base, defend it against the other team, gain credits for better
weapons or more advanced aliens, try to wipe them out. weapons or more advanced aliens, try to wipe them out.


Package: unvanquished-server
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends},
unvanquished-common (= ${binary:Version})
Suggests: unvanquished
Conflicts: unvanquished (<< 0.3.5-2)
Replaces: unvanquished (<< 0.3.5-2)
Description: Team-based FPS game, aliens v. humans - dedicated server
Build a base, defend it against the other team, gain credits for better
weapons or more advanced aliens, try to wipe them out.
.
This package contains the dedicated server for Unvanquished.

Package: unvanquished-common
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Conflicts: unvanquished (<< 0.3.5-2)
Replaces: unvanquished (<< 0.3.5-2)
Description: Team-based FPS game, aliens v. humans - shared resources
Build a base, defend it against the other team, gain credits for better
weapons or more advanced aliens, try to wipe them out.
.
This package contains resources used by both client and server.

Package: unvanquished-dbg Package: unvanquished-dbg
Architecture: any Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends} Depends: ${shlibs:Depends}, ${misc:Depends}
Expand Down
6 changes: 2 additions & 4 deletions debian/rules
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -23,15 +23,14 @@ override_dh_auto_configure:
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_SKIP_RPATH=ON \ -DCMAKE_SKIP_RPATH=ON \
-DNO_UNTRUSTED_PLUGINS=ON \ -DNO_UNTRUSTED_PLUGINS=ON \
$(shell test -f /usr/include/xvid.f || echo -DUSE_CIN_XVID=OFF) \ $(shell test -f /usr/include/xvid.h || echo -DUSE_CIN_XVID=OFF) \
$(shell test -d /usr/include/webp || echo -DUSE_WEBP=OFF) $(shell test -d /usr/include/webp || echo -DUSE_WEBP=OFF)


override_dh_auto_install: override_dh_auto_install:


override_dh_install: override_dh_install:
dh_install dh_install
sed -i -e 's/@ARCH@/'${DEB_HOST_GNU_CPU}'/' debian/unvanquished/usr/games/unvanquished*.sh rename "s/daemon/unvanquished/; s%\\.[^./]+$$%%" '{}' ';' debian/unvanquished*/usr/lib/games/unvanquished/daemon*
rename 's/\.*$$//' debian/unvanquished/usr/lib/games/unvanquished/daemon*


override_dh_strip: override_dh_strip:
dh_strip --dbg-package=unvanquished-dbg dh_strip --dbg-package=unvanquished-dbg
Expand All @@ -49,7 +48,6 @@ override_dh_installemacsen:
override_dh_installifupdown: override_dh_installifupdown:
override_dh_installinfo: override_dh_installinfo:
override_dh_pysupport: override_dh_pysupport:
override_dh_installinit:
override_dh_installmime: override_dh_installmime:
override_dh_installmodules: override_dh_installmodules:
override_dh_installlogcheck: override_dh_installlogcheck:
Expand Down
1 change: 1 addition & 0 deletions debian/unvanquished-common.install
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1 @@
obj-*-*-*/main/qagame*.so usr/lib/games/unvanquished/main/
15 changes: 15 additions & 0 deletions debian/unvanquished-server.default
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,15 @@
# Defaults for unvanquished-server initscript
# sourced by /etc/init.d/unvanquished-server
# installed at /etc/default/unvanquished-server by the maintainer scripts

# set to 1 to enable
START_DAEMON=0

# DNS name or IP address of your internet interface.
# Change it if you're setting up an internet server.
NET_IP="localhost"

# Additional options that are passed to the Daemon.
# Add "+set dedicated 2" if you want your server advertised on the public
# server list.
DAEMON_OPTS="+set net_ip ${NET_IP}"
86 changes: 86 additions & 0 deletions debian/unvanquished-server.init
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,86 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: unvanquished-server
# Required-Start: $remote_fs $network
# Required-Stop: $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start Unvanquished game server
# Description: Start Unvanquished game server
### END INIT INFO

PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
DAEMON="/usr/games/unvanquished-server.sh"
NAME="unvanquished-server"
DESC="Unvanquished dedicated server"
PIDFILE="/var/run/$NAME.pid"
BINARY="/usr/lib/games/unvanquished/unvanquishedded"

# Exit cleanly if the package has been removed
test -x $DAEMON || exit 0

. /lib/lsb/init-functions

# Include unvanquished defaults if available
if [ -f /etc/default/unvanquished-server ] ; then
. /etc/default/unvanquished-server
fi

unvanquished_start() {
if [ -f $PIDFILE ]; then
return 2
fi
if [ "$START_DAEMON" != 1 ]; then
echo -n " (not starting - disabled in /etc/default/unvanquished-server)"
return 0
fi
start-stop-daemon --start --quiet --pidfile $PIDFILE --oknodo \
--background --exec $BINARY --startas $DAEMON \
--make-pidfile --chuid unvanquished-server \
-- $DAEMON_OPTS > /dev/null 2>&1 || return 1
return 0
}

unvanquished_stop() {
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
--oknodo --exec $BINARY || return 1
rm -f $PIDFILE
return 0
}

case "$1" in
start)
log_begin_msg "Starting $DESC: $NAME"
unvanquished_start
log_end_msg $?
;;
stop)
log_begin_msg "Stopping $DESC: $NAME"
unvanquished_stop
log_end_msg $?
;;
#reload)
# If the daemon can reload its config files on the fly
# for example by sending it SIGHUP, do it here.
# If the daemon responds to changes in its config file
# directly anyway, make this a do-nothing entry.
# echo "Reloading $DESC configuration files."
# start-stop-daemon --stop --signal 1 --quiet --pidfile \
# /var/run/$NAME.pid --exec $DAEMON
#;;
restart|force-reload)
# If the "reload" option is implemented, move the "force-reload"
# option to the "reload" entry above. If not, "force-reload" is
# just the same as "restart".
log_begin_msg "Restarting $DESC: $NAME"
unvanquished_stop && sleep 1 && unvanquished_start
log_end_msg $?
;;
*)
# echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $0 {start|stop|restart|force-reload}" >&2
exit 1
;;
esac

exit 0
3 changes: 3 additions & 0 deletions debian/unvanquished-server.install
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,3 @@
debian/unvanquished-server.sh usr/games/
obj-*-*-*/daemonded.* usr/lib/games/unvanquished/
debian/config/*.cfg etc/unvanquished-server
2 changes: 2 additions & 0 deletions debian/unvanquished-server.links
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,2 @@
etc/unvanquished-server/server.cfg usr/lib/games/unvanquished/base/server.cfg
etc/unvanquished-server/maprotation.cfg usr/lib/games/unvanquished/base/maprotation.cfg
43 changes: 43 additions & 0 deletions debian/unvanquished-server.postinst
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/sh
# postinst script for unvanquished

set -e

# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package

UNV_SERVER_HOME=/var/games/unvanquished-server
UNV_SERVER_DATA=$UNV_SERVER_HOME/.Unvanquished/main

case "$1" in
configure)
if ! getent passwd unvanquished-server >/dev/null; then
adduser --disabled-password --quiet --system \
--home $UNV_SERVER_HOME --no-create-home \
--gecos "Unvanquished dedicated server" --ingroup games unvanquished-server
fi
install -d /var/games
install -d -o unvanquished-server -g games $UNV_SERVER_DATA
if ! test -s $UNV_SERVER_DATA/default.cfg; then
echo >$UNV_SERVER_DATA/default.cfg
chown unvanquished-server:games $UNV_SERVER_DATA/default.cfg
fi
ln -fs /etc/unvanquished-server/maprotation.cfg /etc/unvanquished-server/server.cfg $UNV_SERVER_DATA/
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac

#DEBHELPER#
9 changes: 9 additions & 0 deletions debian/unvanquished-server.postrm
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

set -e

#DEBHELPER#

if [ "$1" = "purge" ] ; then
deluser --quiet --system unvanquished-server > /dev/null || true
fi
23 changes: 23 additions & 0 deletions debian/unvanquished-server.prerm
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,23 @@
#! /bin/sh
# prerm script for unvanquished-server

set -e

case "$1" in
remove)
# Remove links
rm -f /usr/lib/games/unvanquished/base/server.cfg /usr/lib/games/unvanquished/base/maprotation.cfg
;;

upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;

*)
echo "prerm called with unknown argument \`$1'" >&2
exit 0
;;
esac

#DEBHELPER#

exit 0
4 changes: 2 additions & 2 deletions debian/unvanquished-server.sh
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
cd /usr/lib/games/unvanquished cd /var/games/unvanquished-server
exec ./daemonded.@ARCH@ +set fs_libpath "$PWD" +set fs_basepath /var/lib/games/unvanquished "$@" exec /usr/lib/games/unvanquished/unvanquishedded +set fs_libpath /usr/lib/games/unvanquished +set fs_basepath /var/lib/games/unvanquished +exec server.cfg "$@"
6 changes: 3 additions & 3 deletions debian/unvanquished.install
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,7 @@
obj-*-*-*/daemon* usr/lib/games/unvanquished/ obj-*-*-*/daemon.* usr/lib/games/unvanquished/
obj-*-*-*/*.so usr/lib/games/unvanquished/ obj-*-*-*/*.so usr/lib/games/unvanquished/
obj-*-*-*/main/*.so usr/lib/games/unvanquished/main/ obj-*-*-*/main/cgame*.so usr/lib/games/unvanquished/main/
obj-*-*-*/main/ui*.so usr/lib/games/unvanquished/main/


#src/gamelogic/base/ui usr/share/games/unvanquished/base/ #src/gamelogic/base/ui usr/share/games/unvanquished/base/
#main usr/share/games/unvanquished/ #main usr/share/games/unvanquished/
Expand All @@ -10,7 +11,6 @@ obj-*-*-*/main/*.so usr/lib/games/unvanquished/main/
#src/gamelogic/gpp/ui usr/lib/games/unvanquished/gpp/ #src/gamelogic/gpp/ui usr/lib/games/unvanquished/gpp/


debian/unvanquished.sh usr/games/ debian/unvanquished.sh usr/games/
debian/unvanquished-server.sh usr/games/
debian/unvanquished-download-paks.sh usr/sbin/ debian/unvanquished-download-paks.sh usr/sbin/
download-pk3.sh usr/lib/games/unvanquished/ download-pk3.sh usr/lib/games/unvanquished/


Expand Down
2 changes: 1 addition & 1 deletion debian/unvanquished.sh
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,3 @@
#! /bin/sh #! /bin/sh
cd /usr/lib/games/unvanquished cd /usr/lib/games/unvanquished
exec ./daemon.@ARCH@ +set fs_libpath "$PWD" +set fs_basepath /var/lib/games/unvanquished "$@" exec ./unvanquished +set fs_libpath "$PWD" +set fs_basepath /var/lib/games/unvanquished "$@"
Loading

0 comments on commit 87007fd

Please sign in to comment.