pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/teamspeak-server Import teamspeak-server-2.0.23.15...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/644cd58dd10f
branches:  trunk
changeset: 528358:644cd58dd10f
user:      abs <abs%pkgsrc.org@localhost>
date:      Mon Apr 30 15:33:27 2007 +0000

description:
Import teamspeak-server-2.0.23.15 into pkgsrc:

TeamSpeak is a quality, scalable application which enables people
to speak with one another over the Internet. TeamSpeak consists of
both client and server software. The server acts as a host to
multiple client connections, capable of handling literally thousands
of simultaneous users. This results in an Internet based teleconferencing
solution that works in a variety of applications such as team mates
speaking with one another while playing their favorite online game,
small businesses cutting costs on long distance charges, or for
personal communication with friends and family.

This package contains the TeamSpeak server for Linux/i386

diffstat:

 net/teamspeak-server/DESCR              |   11 ++
 net/teamspeak-server/Makefile           |   88 +++++++++++++++++++++++
 net/teamspeak-server/PLIST              |    2 +
 net/teamspeak-server/distinfo           |    8 ++
 net/teamspeak-server/files/teamspeak.sh |  119 ++++++++++++++++++++++++++++++++
 5 files changed, 228 insertions(+), 0 deletions(-)

diffs (248 lines):

diff -r d8cd9d4c617b -r 644cd58dd10f net/teamspeak-server/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/teamspeak-server/DESCR        Mon Apr 30 15:33:27 2007 +0000
@@ -0,0 +1,11 @@
+TeamSpeak is a quality, scalable application which enables people
+to speak with one another over the Internet. TeamSpeak consists of
+both client and server software. The server acts as a host to
+multiple client connections, capable of handling literally thousands
+of simultaneous users. This results in an Internet based teleconferencing
+solution that works in a variety of applications such as team mates
+speaking with one another while playing their favorite online game,
+small businesses cutting costs on long distance charges, or for
+personal communication with friends and family.
+
+This package contains the TeamSpeak server for Linux/i386
diff -r d8cd9d4c617b -r 644cd58dd10f net/teamspeak-server/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/teamspeak-server/Makefile     Mon Apr 30 15:33:27 2007 +0000
@@ -0,0 +1,88 @@
+# $NetBSD: Makefile,v 1.1.1.1 2007/04/30 15:33:27 abs Exp $
+
+PKGNAME=               teamspeak-server-2.0.23.15
+DISTNAME=              ts2_server_rc2_20201
+CATEGORIES=            net audio
+MASTER_SITES=          ftp://ftp.freenet.de/pub/4players/teamspeak.org/releases/
+SITES.server_linux=    ftp://ftp.freenet.de/pub/4players/teamspeak.org/developer/server/202315/
+EXTRACT_SUFX=          .tar.bz2
+DISTFILES=             ${DISTNAME}${EXTRACT_SUFX} server_linux
+DIST_SUBDIR=           teamspeak
+EXTRACT_ONLY=          ${DISTNAME}${EXTRACT_SUFX}
+
+MAINTAINER=            abs%NetBSD.org@localhost
+HOMEPAGE=              http://www.goteamspeak.com/
+COMMENT=               Teamspeak group VoIP server
+
+.include "../../emulators/suse_linux/Makefile.application"
+
+.if !defined(USE_NATIVE_LINUX)
+DEPENDS+=      suse_base-[0-9]*:../../emulators/${SUSE_DIR_PREFIX}_base
+.endif
+
+ONLY_FOR_PLATFORM=     *-*-i386
+
+RCD_SCRIPTS=           teamspeak
+NO_CONFIGURE=          yes
+USE_LANGUAGES=
+
+PLIST_SRC=             ${WRKDIR}/PLIST
+
+RESTRICTED=             Redistribution to third parties is expressly prohibited
+NO_SRC_ON_CDROM=        ${RESTRICTED}
+NO_BIN_ON_FTP=          ${RESTRICTED}
+NO_BIN_ON_CDROM=        ${RESTRICTED}
+LICENSE=                teamspeak-license
+
+WRKSRC=                ${WRKDIR}/tss2_rc2
+EGDIR=         ${PREFIX}/share/examples
+LIB_DIR=       ${PREFIX}/lib/teamspeak-server
+DOC_DIR=       ${PREFIX}/share/doc/teamspeak-server
+SHARE_DIR=     ${PREFIX}/share/teamspeak-server
+HOMEBASE?=     ${VARBASE}
+
+# TSUSER       username of the teamspeak server user
+# TSGROUP      group of the teamspeak server user
+# TSHOME       home directory for the teamspeak server data
+#
+TSUSER?=               teamspeak
+TSGROUP?=              teamspeak
+TSHOME?=               ${HOMEBASE}/${TSUSER}
+
+BUILD_DEFS+=           TSUSER TSGROUP TSHOME
+
+PKG_GROUPS=            ${TSGROUP}
+PKG_USERS=             ${TSUSER}:${TSGROUP}
+PKG_GECOS.${TSUSER}=   Teamspeak server user
+PKG_HOME.${TSUSER}=    ${TSHOME}
+PKG_SHELL.${TSUSER}=   ${SH}
+
+FILES_SUBST+=          TSUSER=${TSUSER}
+
+do-build:
+       ${MV} ${WRKSRC}/Manual/_TeamSpeak\ RC2\ Server\ manual-1.png \
+             ${WRKSRC}/Manual/_TeamSpeak_RC2_Server_manual-1.png
+
+do-install:
+       ${INSTALL_DATA_DIR} ${LIB_DIR}
+       ${INSTALL_PROGRAM} ${DISTDIR}/${DIST_SUBDIR}/server_linux ${LIB_DIR}/teamspeak-server
+       ${INSTALL_LIB} ${WRKSRC}/*.so* ${LIB_DIR}
+       ${INSTALL_SCRIPT} -m 644 ${FILESDIR}/teamspeak.sh ${PREFIX}/share/examples/rc.d/teamspeak
+       for d in httpdocs tcpquerydocs mysql_sql sqlite_sql ; do \
+       ${INSTALL_DATA_DIR} ${SHARE_DIR}/$$d;\
+       cd ${WRKSRC}/$$d && ${PAX} -rw . ${SHARE_DIR}/$$d;\
+       ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${SHARE_DIR}/$$d;\
+       ${FIND} ${SHARE_DIR}/$$d -type f -print | ${XARGS} ${CHMOD} ${SHAREMODE};\
+       done
+       ${INSTALL_DATA_DIR} ${DOC_DIR}/Manual
+       ${INSTALL_DATA} -m 644 ${WRKSRC}/Manual/* ${DOC_DIR}/Manual
+       ${INSTALL_DATA} -m 644 ${WRKSRC}/changelog.txt ${DOC_DIR}
+       ${INSTALL_DATA} -m 644 ${WRKSRC}/manual.html ${DOC_DIR}
+       ${INSTALL_DATA} -m 644 ${WRKSRC}/README ${DOC_DIR}
+       ${INSTALL_DATA} -m 644 ${WRKSRC}/INSTALL ${DOC_DIR}
+       ${INSTALL_DATA} -m 644 ${WRKSRC}/INSTALL.mysql ${DOC_DIR}
+       ${CAT} ${PKGDIR}/PLIST > ${PLIST_SRC}
+       (cd ${PREFIX}; ${FIND} lib/teamspeak-server share/doc/teamspeak-server share/teamspeak-server -type f -print ) >> ${PLIST_SRC}
+       (cd ${PREFIX}; ${FIND} lib/teamspeak-server share/doc/teamspeak-server share/teamspeak-server -type d -print ) | ${SED} 's/^/@dirrm /' | ${SORT} -r >> ${PLIST_SRC}
+
+.include "../../mk/bsd.pkg.mk"
diff -r d8cd9d4c617b -r 644cd58dd10f net/teamspeak-server/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/teamspeak-server/PLIST        Mon Apr 30 15:33:27 2007 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2007/04/30 15:33:27 abs Exp $
+share/examples/rc.d/teamspeak
diff -r d8cd9d4c617b -r 644cd58dd10f net/teamspeak-server/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/teamspeak-server/distinfo     Mon Apr 30 15:33:27 2007 +0000
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1.1.1 2007/04/30 15:33:27 abs Exp $
+
+SHA1 (teamspeak/server_linux) = 7434d4240864b74a3628fdfa960f395d3bb8cfc2
+RMD160 (teamspeak/server_linux) = f4fa7f1d9781af33554e49d154639db3cd0e10ee
+Size (teamspeak/server_linux) = 947480 bytes
+SHA1 (teamspeak/ts2_server_rc2_20201.tar.bz2) = bb53e9ed76b3364d046ac7a709853161bfdb35a5
+RMD160 (teamspeak/ts2_server_rc2_20201.tar.bz2) = 7fbafd77bcd1b0765de97ae1401e8ac30740a6aa
+Size (teamspeak/ts2_server_rc2_20201.tar.bz2) = 1112816 bytes
diff -r d8cd9d4c617b -r 644cd58dd10f net/teamspeak-server/files/teamspeak.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/teamspeak-server/files/teamspeak.sh   Mon Apr 30 15:33:27 2007 +0000
@@ -0,0 +1,119 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: teamspeak.sh,v 1.1.1.1 2007/04/30 15:33:27 abs Exp $
+#
+# PROVIDE: teamspeak
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# You will need to set the following in /etc/rc.conf to start Teamspeak:
+#
+# teamspeak=YES
+
+if [ -f /etc/rc.subr ]
+then
+       . /etc/rc.subr
+fi
+
+name="teamspeak"
+rcvar=$name
+teamspeak_user="@TSUSER@"
+eval teamspeak_home="~$teamspeak_user"
+extra_commands="passwords status"
+start_cmd="teamspeak_doit start"
+status_cmd="teamspeak_doit status"
+stop_cmd="teamspeak_doit stop"
+passwords_cmd="teamspeak_doit passwords"
+pidfile="$teamspeak_home/tsserver2.pid"
+logfile=$teamspeak_home/server.log
+
+SHARE=@PREFIX@/share/teamspeak-server
+SERVER=@PREFIX@/lib/teamspeak-server/teamspeak-server
+SERVER_ARGS="-ini=$teamspeak_home/server.ini -sql=$SHARE/sqlite_sql/ -httpdocs=$SHARE/httpdocs/ -tcpquerydocs=$SHARE/tcpquerydocs/ -db=$teamspeak_home/server.dbs -log=$logfile -pid=$pidfile 
-badnames=$teamspeak_home/badnames.txt"
+
+teamspeak_doit()
+{
+       case $1 in
+       start)
+           if [ ! -d "$teamspeak_home" -o ! -w "$teamspeak_home" ] ; then
+               echo "Unable to write to $teamspeak_home"
+               exit 1
+           fi
+           if [ -e $pidfile ]; then
+                   echo "$pidfile already exists...server already started ?";
+                   echo "If you are sure the server is not running, delete $pidfile"
+                   exit 1
+           else
+                   echo "starting the teamspeak2 server"
+                   doit_command="$SERVER $SERVER_ARGS"
+                   doit="@SU@ -m $teamspeak_user -c '${doit_command}'"
+                   eval $doit
+           fi
+           ;;
+       stop)
+           if [ -e $pidfile ]; then
+                   echo -n "stopping the teamspeak2 server"
+                   if ( kill -TERM `cat $pidfile` ); then
+                           for c in $(seq 1 300); do
+                                   if [ -e $pidfile ]; then
+                                           echo -n "."
+                                           sleep 1
+                                   fi
+                           done
+                   fi
+                   if [ -e $pidfile ]; then
+                           echo "server does not shutdown cleanly - killing"
+                           kill -KILL `cat $pidfile`
+                           rm $pidfile
+                           sleep 5
+                   else
+                           echo "done"
+                   fi
+           else
+                   echo "$pidfile is missing, no started server ?"
+                   exit 7
+           fi
+           ;;
+       status)
+           if [ -e $pidfile ]; then
+                   pid=`cat $pidfile`
+                   if kill -0 "$pid" ; then
+                       echo "the server seems to be running: pid $pid"
+                       exit 0
+                   else
+                       echo "the server seems to be stopped: pid $pid"
+                       exit 3
+                   fi
+           else
+                   echo "the server seems to be stopped"
+                   exit 3
+           fi
+           ;;
+       passwords)
+           if [ -e $logfile ]; then
+                   date=$(cat $logfile | grep "admin account info: username: admin" | tail -n 1 | sed "s/^\([0-9]\+-[0-9]\+-[0-9]\+ [0-9]\+:[0-9]\+:[0-9]\+\).*$/\1/")
+                   spass=$(cat $logfile | grep "superadmin account info: username: superadmin" | tail -n 1 | sed "s/^.*username: superadmin password: \([a-z0-9]\+\).*$/\1/")
+                   pass=$(cat $logfile | grep "admin account info: username: admin" | tail -n 1 | sed "s/^.*username: admin password: \([a-z0-9]\+\).*$/\1/")
+                   echo "Following passwords were generated on $date"
+                   echo "superadmin = \"$spass\""
+                   echo "admin      = \"$pass\""
+           else
+                   echo "$logfile not found, maybe you did not start the server yet ?"
+                   exit 1
+           fi
+           ;;
+       esac
+}
+
+
+if [ -f /etc/rc.subr -a -f /etc/rc.conf -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]
+then
+       load_rc_config $name
+       run_rc_command "$1"
+else
+       teamspeak_doit "$1"
+fi
+
+
+#      restart)
+#              $0 stop && $0 start || exit 1



Home | Main Index | Thread Index | Old Index