diff options
author | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2001-10-26 22:19:04 +0000 |
---|---|---|
committer | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2001-10-26 22:19:04 +0000 |
commit | 2fdb7d93fda7cb83075785a788df1018589c285b (patch) | |
tree | d326e15127e8789ef9d867282aaef430c4ac0d6c /games/utserver-asu | |
parent | o make all installation user writable; otherwise, nothing works (diff) |
o asu-main.sh patch
o legacy-asu-script-0.1.sh patch
o ucc.init patch, root can start server with different userid
o remove both netgames-0.8.0 and old CSHP patches
o add CSHP4+ and asu-0.4-redirectfix patches
Submitted by: MAINTAINER
Notes
Notes:
svn path=/head/; revision=49244
Diffstat (limited to 'games/utserver-asu')
-rw-r--r-- | games/utserver-asu/Makefile | 16 | ||||
-rw-r--r-- | games/utserver-asu/distinfo | 2 | ||||
-rw-r--r-- | games/utserver-asu/files/patch-Lib:asu-main.sh | 73 | ||||
-rw-r--r-- | games/utserver-asu/files/ucc.init | 117 | ||||
-rw-r--r-- | games/utserver-asu/pkg-comment | 2 | ||||
-rw-r--r-- | games/utserver-asu/pkg-message | 12 | ||||
-rw-r--r-- | games/utserver-asu/pkg-plist | 4 |
7 files changed, 218 insertions, 8 deletions
diff --git a/games/utserver-asu/Makefile b/games/utserver-asu/Makefile index d21befabdb74..8bb5bba5ee88 100644 --- a/games/utserver-asu/Makefile +++ b/games/utserver-asu/Makefile @@ -7,9 +7,12 @@ PORTNAME= asu PORTVERSION= 0.4 -PORTREVISION= 1 +PORTREVISION= 2 MASTER_SITES= ftp://ftp.abfackeln.com/pub/linux/ut/ -DISTNAME= asu-${PORTVERSION} +DISTFILES= asu-${PORTVERSION}.tar.gz \ + asu-0.4-redirectfix-0.1-patch.tar.gz \ + CSHP-4+-patch.tar.gz +EXTRACT_ONLY= asu-${PORTVERSION}.tar.gz MAINTAINER= matuska@wu-wien.ac.at @@ -18,7 +21,14 @@ RUN_DEPENDS= unzip:${PORTSDIR}/archivers/unzip WRKSRC= ${WRKDIR}/Abfackeln.com DONT_USE_ZIP= yes DO_USE_WRKSUBDIR= yes -EXECUTABLES= pl +EXECUTABLES= pl + +post-extract: + @${GZIP_CMD} -9c ${FILESDIR}/ucc.init > ${WRKSRC}/Lib/ucc.init.gz + @${RM} -f ${WRKSRC}/Patches/* +.for files in ${DISTFILES:S/${EXTRACT_ONLY}//} + @${CP} -f ${DISTDIR}/${files} ${WRKSRC}/Patches +.endfor post-patch: @${SED} -e "s|%%LINUXBASE%%|${LINUXBASE}|" \ diff --git a/games/utserver-asu/distinfo b/games/utserver-asu/distinfo index 5c9752f8ec48..bb4047125af6 100644 --- a/games/utserver-asu/distinfo +++ b/games/utserver-asu/distinfo @@ -1 +1,3 @@ MD5 (asu-0.4.tar.gz) = ea90350dbc7e0d402351abab0070a150 +MD5 (asu-0.4-redirectfix-0.1-patch.tar.gz) = 62ce112f3f39f36babc1d263065b675e +MD5 (CSHP-4+-patch.tar.gz) = 925c71e24881377b799c19efec2f3383 diff --git a/games/utserver-asu/files/patch-Lib:asu-main.sh b/games/utserver-asu/files/patch-Lib:asu-main.sh new file mode 100644 index 000000000000..ee8c3fb15a74 --- /dev/null +++ b/games/utserver-asu/files/patch-Lib:asu-main.sh @@ -0,0 +1,73 @@ +--- Lib/asu-main.sh Thu Oct 18 16:33:54 2001 ++++ Lib/asu-main.sh Thu Oct 18 16:35:01 2001 +@@ -8,6 +8,8 @@ + # + # Copyright (C) 2001 abfackeln@abfackeln.com + # ++# FreeBSD modifications by matuska@wu-wien.ac.at ++# + # This program is free software; you can redistribute it and/or + # modify it under the terms of the GNU General Public License + # as published by the Free Software Foundation; either version 2 +@@ -32,9 +34,9 @@ + Install_Package () + { + if [ -f "$PATCH_DIR/$1-patch.tar.gz" ]; then +- pushd $UT_DIR > /dev/null ++ /bin/csh -c pushd $UT_DIR > /dev/null 2> /dev/null + tar zxpf "$PATCH_DIR/$1-patch.tar.gz" +- popd > /dev/null ++ /bin/csh -c popd > /dev/null 2> /dev/null + if [ -f "$UT_DIR/$1-install.asu" ]; then + TMP=`head -1 "$UT_DIR/$1-install.asu" | sed -n -e "s/#~asu \([0-9.]*\).*$/\\\\1/" -e "t label" -e "d" -e ": label" -e "p"` + if [ -f "$ABF_DIR/legacy-asu-script-$TMP.sh" ]; then +@@ -1545,9 +1547,9 @@ + echo + echo "Zip and Umod files in your game directory:" + echo +- pushd $UT_DIR > /dev/null ++ /bin/csh -c pushd $UT_DIR > /dev/null 2> /dev/null + ls *.[zZ][iI][pP] *.[uU][mM][oO][dD] 2> /dev/null +- popd > /dev/null ++ /bin/csh -c popd > /dev/null 2> /dev/null + echo + echo "Enter the name of the file from the above list" + echo "or enter the full file name if it is located elsewhere." +--- Lib/legacy-asu-script-0.1.sh Sat Jun 23 02:46:49 2001 ++++ Lib/legacy-asu-script-0.1.sh Thu Oct 18 18:01:54 2001 +@@ -1,10 +1,29 @@ + #~asu 0.4 + #~legacy 0.1 ## compatability functions for version 0.1 scripts + +-AddIni () { IniAdd "$1" "$2" "$3" "$4" } +-UnAddIni () { IniUnAdd "$1" "$2" "$3" "$4" } +-SetIni () { IniSet "$1" "$2" "$3" "$4" } +-UnSetIni () { IniUnSet "$1" "$2" "$3" } +-MatchIni () { IniMatch "$1" "$2" "$3" "$4" } +-ReadIni () { IniRead "$1" "$2" "$3" } ++AddIni() ++{ ++ IniAdd "$1" "$2" "$3" "$4" ++} + ++UnAddIni() { ++IniUnAdd "$1" "$2" "$3" "$4" ++} ++ ++SetIni() ++{ ++IniSet "$1" "$2" "$3" "$4" ++} ++ ++UnSetIni() ++{ ++IniUnSet "$1" "$2" "$3" ++} ++ ++MatchIni() { ++IniMatch "$1" "$2" "$3" "$4" ++} ++ ++ReadIni() { ++IniRead "$1" "$2" "$3" ++} diff --git a/games/utserver-asu/files/ucc.init b/games/utserver-asu/files/ucc.init new file mode 100644 index 000000000000..eca6ff670817 --- /dev/null +++ b/games/utserver-asu/files/ucc.init @@ -0,0 +1,117 @@ +#!/bin/sh +# +# standard format startup script for unreal tournament +# +# written by abfackeln@abfackeln.com +# 2001-02-19 +# +# modified (FreeBSD) by matuska@wu-wien.ac.at +# 2001-10-20 +# +###################################################### + +MYNAME="ucc-DM" + +MYGAME="Botpack.DeathMatchPlus" +MYMAP="DM-Barricade" +MYUSERID="nobody" +MYDIR="/usr/games/ut-server" +MYPORT="7777" +MYIP="" +MYMODS="" +MYINI="UnrealTournament.ini" + +MYLOGFILE="$MYDIR/System/$MYNAME.log" +MYLOCKFILE="$MYDIR/System/$MYNAME.lock" + + +# no user servicable parts beyond this point + + +if [ -z "$MYMODS" ]; then + TMP="$MYMAP""\?game=$MYGAME" +else + TMP="$MYMAP""\?game=$MYGAME""\?mutator=$MYMODS" +fi +if [ -n "$MYIP" ]; then + TMP="$TMP multihome=$MYIP" +fi + +MYEXECMD="./ucc server $TMP -nohomedir ini=$MYINI log=$MYLOGFILE" +if [ `whoami` = "root" ]; then + SUID="/usr/bin/su $MYUSERID -c" +else + SUID= +fi + +ulimit -c 0 + +case "$1" in + start) + echo -n "Starting Unreal Tournament: " + if [ -f $MYLOCKFILE ]; then + echo "already running according to $MYLOCKFILE. Not started." + else + cd $MYDIR + if [ -n "$SUID" ]; then + $SUID "$MYEXECMD > /dev/null & echo \$! > $MYLOCKFILE" > /dev/null & + else + /bin/sh -c "$MYEXECMD & echo \$! > $MYLOCKFILE" > /dev/null & + fi + echo "$MYNAME" + fi + ;; + stop) + echo -n "Stopping Unreal Tournament: " + if [ ! -f $MYLOCKFILE ]; then + echo "not found" + exit 2 + fi + kill -TERM `cat $MYLOCKFILE` + rm -f $MYLOCKFILE + echo "$MYNAME" + ;; + restart) + if [ -f $MYLOCKFILE ]; then + $0 stop + fi + $0 start + ;; + check) + ## the next condition was devised by Chris Weiss for his ut-check script + ## ftp://xplug.sourceforge.net/pub/xplug/ut-check.tar.gz + ## i have slightly modified it and integrated it here + + ## usage: call "ucc.init check" from a cron task every 5 minutes or so + ## output will be nothing if it was running + ## else output will be a start message and the server will restart + + if [ -z "$(ps --no-headers -p $(cat $MYLOCKFILE 2>/dev/null) 2>/dev/null)" ]; then + $0 restart + fi + ;; + infinity) + ## infinite loop to ensure that server is always up without use of cron + + echo $$ > $MYLOCKFILE.8 + ## the number 8 is the infinity symbol sideways ;) -abf. + + while [ 1 ]; do + $0 check + sleep 60 + done + ;; + die) + $0 stop + + ## break infinity + kill -TERM `cat $MYLOCKFILE.8` + rm -f $MYLOCKFILE.8 + ;; + *) + echo "Usage: $0 {start|stop|restart|check|infinity|die}" + exit 1 +esac + +exit 0 + diff --git a/games/utserver-asu/pkg-comment b/games/utserver-asu/pkg-comment index b6f5f1512364..74275cec0bed 100644 --- a/games/utserver-asu/pkg-comment +++ b/games/utserver-asu/pkg-comment @@ -1 +1 @@ -Abfackelns Server Utilities (ASU) for Unreal Tournament Server for Linux +Abfackelns Server Utilities (ASU) for Unreal Tournament Server (Linux) diff --git a/games/utserver-asu/pkg-message b/games/utserver-asu/pkg-message index fc2497a7f3cb..db90314c23a7 100644 --- a/games/utserver-asu/pkg-message +++ b/games/utserver-asu/pkg-message @@ -1,4 +1,12 @@ +For configuration options: +Execute the menu script "asu.sh" in your UT main directory. -Menu script: -"asu.sh" in /usr/compat/linux/usr/games/ut-server/asu +Notes: + +- If you intend to start ucc.init as root, the user account + you specify in the configuration requires a valid login shell and + a valid home directory. + +- the netgames-abfackeln-0.8.2 patch is already integrated in + the utserver port 436 revision 2 and modified for FreeBSD diff --git a/games/utserver-asu/pkg-plist b/games/utserver-asu/pkg-plist index 0e6bc26ec904..2fc4345d3130 100644 --- a/games/utserver-asu/pkg-plist +++ b/games/utserver-asu/pkg-plist @@ -1,5 +1,5 @@ -%%UTDIR%%Patches/CSHP-4b-patch.tar.gz -%%UTDIR%%Patches/netgames-abfackeln-0.8-patch.tar.gz +%%UTDIR%%Patches/CSHP-4+-patch.tar.gz +%%UTDIR%%Patches/asu-0.4-redirectfix-0.1-patch.tar.gz %%UTDIR%%Lib/umodpack-abf/Tie/IxHash.pm %%UTDIR%%Lib/umodpack-abf/umod %%UTDIR%%Lib/umodpack-abf/Umod.pm |