diff options
author | pav <pav@FreeBSD.org> | 2006-10-07 05:26:09 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2006-10-07 05:26:09 +0800 |
commit | ccc3963232450c0825449ef15feee29ff13da711 (patch) | |
tree | 31303d447481dd4a591d98d5c4d748a7cf1d00ee /audio/ventrilo-server | |
parent | 4924932dd179dcfb055cc7bf9194b731af0bb295 (diff) | |
download | freebsd-ports-graphics-ccc3963232450c0825449ef15feee29ff13da711.tar.gz freebsd-ports-graphics-ccc3963232450c0825449ef15feee29ff13da711.tar.zst freebsd-ports-graphics-ccc3963232450c0825449ef15feee29ff13da711.zip |
The server for Ventrilo is a voice chat program which supports multiple
channels with different rate codecs and several people on each channel.
Primarily aimed at team gamers but can be used as an IP phone as well.
WWW: http://www.ventrilo.com/
PR: ports/95071
Submitted by: Anish Mistry <amistry@am-productions.biz>
Diffstat (limited to 'audio/ventrilo-server')
-rw-r--r-- | audio/ventrilo-server/Makefile | 67 | ||||
-rw-r--r-- | audio/ventrilo-server/distinfo | 3 | ||||
-rw-r--r-- | audio/ventrilo-server/files/pkg-message.in | 10 | ||||
-rw-r--r-- | audio/ventrilo-server/files/ventrilo-server.sh.in | 44 | ||||
-rw-r--r-- | audio/ventrilo-server/pkg-descr | 5 | ||||
-rw-r--r-- | audio/ventrilo-server/pkg-install | 67 | ||||
-rw-r--r-- | audio/ventrilo-server/pkg-plist | 9 |
7 files changed, 205 insertions, 0 deletions
diff --git a/audio/ventrilo-server/Makefile b/audio/ventrilo-server/Makefile new file mode 100644 index 00000000000..d50250f0eb9 --- /dev/null +++ b/audio/ventrilo-server/Makefile @@ -0,0 +1,67 @@ +# New ports collection makefile for: ventrilo-server +# Date created: 29 March 2006 +# Whom: Anish Mistry +# +# $FreeBSD$ +# + +PORTNAME= ventrilo +PORTVERSION= 2.3.1 +CATEGORIES= audio net +MASTER_SITES= # http://www.ventrilo.com/download.php +PKGNAMESUFFIX= -server +DISTNAME= ventrilo_srv-${PORTVERSION}-FreeBSD-i386 + +MAINTAINER= amistry@am-productions.biz +COMMENT= Server side of the Ventrilo group voice chat system + +FETCH_DEPENDS= ${LOCALBASE}/bin/wget:${PORTSDIR}/ftp/wget +LIB_DEPENDS= c.4:${PORTSDIR}/misc/compat4x + +ONLY_FOR_ARCHS= i386 +NO_BUILD= yes +RESTRICTED= Redistribution of pre-compiled binaries is not permitted +NO_CDROM= Redistribution of pre-compiled binaries is not permitted +INSTALL_DIR= ${PREFIX}/ventrilo-server +USE_RC_SUBR= ${PORTNAME}${PKGNAMESUFFIX}.sh +VENT_USER= ${PORTNAME} +FETCH_CMD= ${LOCALBASE}/bin/wget +SUB_FILES= pkg-message + +.include <bsd.port.pre.mk> + +do-fetch: +.if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}) + ${FETCH_CMD} --post-data "Download=Download" "http://download1.ventrilo.com/dl.php?server_freebsd_i386&2332415189" -O "${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}" +.endif + +do-extract: + @${MKDIR} ${WRKSRC} + @${TAR} -C ${WRKSRC} -zxf ${DISTDIR}/${DISTFILES} + +do-install: + @ ${SETENV} PKG_PREFIX=${PREFIX} \ + ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL + @${MKDIR} ${INSTALL_DIR} + @${CHOWN} ${VENT_USER} ${INSTALL_DIR} + ${INSTALL_PROGRAM} ${WRKSRC}/ventrilo_srv ${INSTALL_DIR} + ${INSTALL_PROGRAM} ${WRKSRC}/ventrilo_status ${INSTALL_DIR} + ${INSTALL_DATA} ${WRKSRC}/ventrilo_srv.htm ${INSTALL_DIR} + ${INSTALL_DATA} ${WRKSRC}/LICENSE ${INSTALL_DIR} + ${INSTALL_DATA} ${WRKSRC}/ventrilo_srv.ini ${PREFIX}/etc/ventrilo_srv.ini.sample + @if [ ! -f ${PREFIX}/etc/ventrilo_srv.ini ]; then \ + ${CP} -p ${PREFIX}/etc/ventrilo_srv.ini.sample ${PREFIX}/etc/ventrilo_srv.ini ; \ + ${CHMOD} 0640 ${PREFIX}/etc/ventrilo_srv.ini ; \ + ${CHGRP} ${VENT_USER} ${PREFIX}/etc/ventrilo_srv.ini ; \ + fi + ${LN} -s ${PREFIX}/etc/ventrilo_srv.ini ${INSTALL_DIR}/ventrilo_srv.ini + +post-install: + @${CAT} ${PKGMESSAGE} + +post-deinstall: + @ ${SETENV} PKG_PREFIX=${PREFIX} \ + ${SH} ${PKGDEINSTALL} ${PORTNAME} POST-DEINSTALL + +PKGDEINSTALL= ${PKGINSTALL} +.include <bsd.port.post.mk> diff --git a/audio/ventrilo-server/distinfo b/audio/ventrilo-server/distinfo new file mode 100644 index 00000000000..2b1a9a16215 --- /dev/null +++ b/audio/ventrilo-server/distinfo @@ -0,0 +1,3 @@ +MD5 (ventrilo_srv-2.3.1-FreeBSD-i386.tar.gz) = 5f521245c5fef2ff96f4218e718c7906 +SHA256 (ventrilo_srv-2.3.1-FreeBSD-i386.tar.gz) = f949899a8d82ba99c56278d26af095925bced646b50ab49fe386b7d5c50d1590 +SIZE (ventrilo_srv-2.3.1-FreeBSD-i386.tar.gz) = 119690 diff --git a/audio/ventrilo-server/files/pkg-message.in b/audio/ventrilo-server/files/pkg-message.in new file mode 100644 index 00000000000..dd1b11a4fe2 --- /dev/null +++ b/audio/ventrilo-server/files/pkg-message.in @@ -0,0 +1,10 @@ +Ventrilo Hints: + +You can retrieve server status information for any servers, provided +that you know the password using the RC script. +Examples: +For the localhost's status information: +%%PREFIX%%/etc/rc.d/ventrilo-server info + +Query a remote server on a different port: +%%PREFIX%%/etc/rc.d/ventrilo-server info remote.example.org 4000 diff --git a/audio/ventrilo-server/files/ventrilo-server.sh.in b/audio/ventrilo-server/files/ventrilo-server.sh.in new file mode 100644 index 00000000000..36f24266039 --- /dev/null +++ b/audio/ventrilo-server/files/ventrilo-server.sh.in @@ -0,0 +1,44 @@ +#!/bin/sh + +# PROVIDE: ventrilo +# REQUIRE: NETWORKING +# KEYWORD: FreeBSD shutdown + +[ -z "${ventrilo_enable}" ] && ventrilo_enable="NO" +[ -z "${ventrilo_port}" ] && ventrilo_port="3784" +[ -z "${ventrilo_srv}" ] && ventrilo_srv="localhost" + +. %%RC_SUBR%% + +prefix=%%PREFIX%% + +name=ventrilo +homedir="${prefix}/ventrilo-server" +pidfile="${homedir}/ventrilo_srv.pid" +ventrilo_user=${name} +command="${homedir}/ventrilo_srv" +command_args="'-f${homedir}/ventrilo_srv' -d >/dev/null" +extra_commands="info" +info_cmd="ventrilo_info" + +rcvar=`set_rcvar` + +load_rc_config $name + +ventrilo_info() +{ + if [ "$1" != "" ]; then + ventrilo_srv="$1" + fi + if [ "$2" != "" ]; then + ventrilo_port="$2" + fi + echo -n "Password []: " + oldttymodes=`stty -g` + stty -echo + read ventrilo_passwd + stty $oldttymodes + ${homedir}/ventrilo_status -c2 "-t${ventrilo_srv}:${ventrilo_port}:${ventrilo_passwd}" +} + +run_rc_command $* diff --git a/audio/ventrilo-server/pkg-descr b/audio/ventrilo-server/pkg-descr new file mode 100644 index 00000000000..524d1b5acb9 --- /dev/null +++ b/audio/ventrilo-server/pkg-descr @@ -0,0 +1,5 @@ +The server for Ventrilo is a voice chat program which supports multiple +channels with different rate codecs and several people on each channel. +Primarily aimed at team gamers but can be used as an IP phone as well. + +WWW: http://www.ventrilo.com/ diff --git a/audio/ventrilo-server/pkg-install b/audio/ventrilo-server/pkg-install new file mode 100644 index 00000000000..e4ae65b108d --- /dev/null +++ b/audio/ventrilo-server/pkg-install @@ -0,0 +1,67 @@ +#! /bin/sh + +PATH=/bin:/usr/sbin +HOMEDIR=${PKG_PREFIX}/ventrilo-server +NAME="Ventrilo" + +USER=ventrilo +UID=117 +GROUP=${USER} +GID=117 + +case $2 in +PRE-INSTALL) + if pw group show "${GROUP}" 2>/dev/null; then + echo "You already have a group \"${GROUP}\", so I will use it." + else + if pw groupadd ${GROUP} -g ${GID}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi + fi + + if pw user show "${USER}" 2>/dev/null; then + echo "You already have a user \"${USER}\", so I will use it." + else + if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ + -d ${HOMEDIR} -s /sbin/nologin -c "${NAME} Server" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi + fi + + if ! [ -x ~${USER} ] ; then + mkdir -p "${HOMEDIR}" + chown ${USER}:${GROUP} "${HOMEDIR}" + fi + ;; + +POST-DEINSTALL) + if pw group show "${GROUP}" 2>/dev/null; then + if pw groupdel ${GROUP}; then + echo "Removed group \"${GROUP}\"." + else + echo "Removing group \"${GROUP}\" failed..." + exit 1 + fi + else + echo "Group \"${GROUP}\" doesn't exist!" + fi + + if pw user show "${USER}" 2>/dev/null; then + if pw userdel ${USER}; then + echo "Removed user \"${USER}\"." + else + echo "Removing user \"${USER}\" failed..." + exit 1 + fi + else + echo "User \"${USER}\" doesn't exist!" + fi + ;; +esac diff --git a/audio/ventrilo-server/pkg-plist b/audio/ventrilo-server/pkg-plist new file mode 100644 index 00000000000..a562a213443 --- /dev/null +++ b/audio/ventrilo-server/pkg-plist @@ -0,0 +1,9 @@ +@unexec if cmp -s %D/etc/ventrilo_srv.ini.sample %D/etc/ventrilo_srv.ini; then rm -f %D/etc/ventrilo_srv.ini; fi +etc/ventrilo_srv.ini.sample +@exec if [ ! -f %D/etc/ventrilo_srv.ini ] ; then cp -p %D/%F %B/ventrilo_srv.ini; fi +ventrilo-server/LICENSE +ventrilo-server/ventrilo_srv +ventrilo-server/ventrilo_status +ventrilo-server/ventrilo_srv.htm +ventrilo-server/ventrilo_srv.ini +@dirrm ventrilo-server |