Date: Sun, 2 Nov 2003 20:49:35 +0700 (KRAT) From: Eugene Grosbein <eugen@grosbein.pp.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/58833: New port: Aqua H323 Gatekeeper and proxy Message-ID: <200311021349.hA2DnZSX001563@grosbein.pp.ru> Resent-Message-ID: <200311021410.hA2EAAat091956@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 58833 >Category: ports >Synopsis: New port: Aqua H323 Gatekeeper and proxy >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Nov 02 06:10:09 PST 2003 >Closed-Date: >Last-Modified: >Originator: Eugene Grosbein >Release: FreeBSD 4.9-STABLE i386 >Organization: Svyaz Service JSC >Environment: System: FreeBSD grosbein.pp.ru 4.9-STABLE FreeBSD 4.9-STABLE #25: Thu Oct 30 23:34:44 KRAT 2003 eu@grosbein.pp.ru:/usr/local/obj/usr/local/src/sys/DADV i386 >Description: This is new port for AquaGatekeeper by The Aqua Group. It can be used as H.323 gatekeeper, IP-to-IP voice gateway or proxy. It can be used to pass voice traffic from private networks to the Internet and vice versa when runs on the NAT box. It provides billing information and can optionally use RADUIS. This software is not free - it is not open source and redistribution of modified archive (read: of FreeBSD package) without permission is prohibited. I have not get such permission yet. Perhaps, it will be obtained later. However, it may be used free of charge in a commercial environment and redistribution of distfile is permitted by its license. Note: The AquaGatekeeper should not be run with superuser rights and this port reserves UID 172, GID 172 and agk/agk as username/group name for the daemon. >How-To-Repeat: N/A >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # AquaGatekeeper # AquaGatekeeper/pkg-message # AquaGatekeeper/Makefile # AquaGatekeeper/pkg-descr # AquaGatekeeper/distinfo # AquaGatekeeper/files # AquaGatekeeper/files/agk.sh.sample # AquaGatekeeper/pkg-plist # AquaGatekeeper/pkg-install # AquaGatekeeper/pkg-deinstall # echo c - AquaGatekeeper mkdir -p AquaGatekeeper > /dev/null 2>&1 echo x - AquaGatekeeper/pkg-message sed 's/^X//' >AquaGatekeeper/pkg-message << 'END-of-AquaGatekeeper/pkg-message' X**************************************************************************** X Please read documentation located in PREFIX/share/doc/AquaGatekeeper X You will need to write configuration file to run the Gatekeeper. X Some examples are in PREFIX/share/examples/AquaGatekeeper X**************************************************************************** END-of-AquaGatekeeper/pkg-message echo x - AquaGatekeeper/Makefile sed 's/^X//' >AquaGatekeeper/Makefile << 'END-of-AquaGatekeeper/Makefile' X# New ports collection makefile for: AquaGatekeeper X# Date created: 2 November 2003 X# Whom: Eugene Grosbein <eugen@grosbein.pp.ru> X# X# $FreeBSD$ X# X XPORTNAME= AquaGatekeeper XPORTVERSION= 1.17 XCATEGORIES= net XMASTER_SITES= ftp://ftp.aqua.comptek.ru/pub/Gatekeeper/ \ X ftp://www.kuzbass.ru/pub/FreeBSD/ports/distfiles/ XDISTNAME= AquaGatekeeper117FreeBSD XEXTRACT_SUFX= .tgz X XMAINTAINER= eugen@grosbein.pp.ru XCOMMENT= Aqua H323 Gatekeeper and proxy X XWRKSRC= ${WRKDIR}/${PORTNAME} XNO_BUILD= yes XONLY_FOR_ARCHS= i386 X XNO_PACKAGE= "Restrictive license" XNO_CDROM= "Restrictive license" X X.if !defined(BATCH) && !defined(PACKAGE_BUILDING) XIS_INTERACTIVE= yes X.endif X Xdo-install: X @${INSTALL_PROGRAM} ${WRKSRC}/AquaGatekeeper ${PREFIX}/bin/ X @${INSTALL_SCRIPT} ${FILESDIR}/agk.sh.sample ${PREFIX}/etc/rc.d/ X @${MKDIR} ${EXAMPLESDIR} X @${INSTALL_DATA} ${WRKSRC}/Config/AquaGatekeeper.cfg ${EXAMPLESDIR} X @${INSTALL_DATA} ${WRKSRC}/Config/Example.cfg ${EXAMPLESDIR} X.if !defined(NOPORTDOCS) X @${MKDIR} ${DOCSDIR} X @for docfile in ${WRKSRC}/Help/*; \ X do ${INSTALL_MAN} $$docfile ${DOCSDIR}; \ X done X.endif X Xpost-install: X @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL X @${SED} "s'PREFIX'${PREFIX}'" < pkg-message X X.include <bsd.port.pre.mk> X X.if ${OSVERSION} < 400000 XBROKEN= "Systems prior to 4.x are not supported" X.endif X X.include <bsd.port.post.mk> END-of-AquaGatekeeper/Makefile echo x - AquaGatekeeper/pkg-descr sed 's/^X//' >AquaGatekeeper/pkg-descr << 'END-of-AquaGatekeeper/pkg-descr' XAqua Gatekeeper is H.323 gatekeeper and proxy by Aqua Project Group. XIt is compatible with many hardware/software like Cisco H.323 gateways and XMicrosoft NetMeeting 3.01 for Windows 2000 and later. X XThis port presents Aqua Gatekeeper Startup Edition. XIt is not a free software but may be used free of charge. XThe Aqua Gatekeeper Startup Edition is limited to 30 concurrent calls. X XWWW: http://www.aqua.comptek.ru/man/voip/gatekeeper/index.htm X X- Grosbein Xeugen@grosbein.pp.ru END-of-AquaGatekeeper/pkg-descr echo x - AquaGatekeeper/distinfo sed 's/^X//' >AquaGatekeeper/distinfo << 'END-of-AquaGatekeeper/distinfo' XMD5 (AquaGatekeeper117FreeBSD.tgz) = 68fded95233caff1cc05bbac953cd8b7 END-of-AquaGatekeeper/distinfo echo c - AquaGatekeeper/files mkdir -p AquaGatekeeper/files > /dev/null 2>&1 echo x - AquaGatekeeper/files/agk.sh.sample sed 's/^X//' >AquaGatekeeper/files/agk.sh.sample << 'END-of-AquaGatekeeper/files/agk.sh.sample' X#!/bin/sh X XPREFIX=$(expr `realpath $0` : "\(/.*\)/etc/rc\.d/`basename $0`\$") XPROG=$PREFIX/bin/AquaGatekeeper XCFG=$PREFIX/etc/agk.cfg XTIMEOUT=30 X Xcase "$1" in Xstart) X shift X su -m agk -c "[ -x $PROG -a -r $CFG ] && X echo -n ' AquaGatekeeper' && $PROG -d --configuration=$CFG $@" X ;; Xstop) X shift X signal=-TERM X [ -n "$1" ] && signal="$1" X killall $signal AquaGatekeeper X [ $signal != -2 -a $signal != -INT ] && exit 0 X i=1 X while [ $i -le $TIMEOUT ] X do X ps -axc | grep -q AquaGatekeeper || break X i=$(($i+1)) X sleep 1 X done X ;; Xrestart) X `realpath $0` stop -INT X `realpath $0` start X ;; X*) X echo "Usage: `basename $0` {start|stop|restart}" >&2 X ;; Xesac X Xexit 0 END-of-AquaGatekeeper/files/agk.sh.sample echo x - AquaGatekeeper/pkg-plist sed 's/^X//' >AquaGatekeeper/pkg-plist << 'END-of-AquaGatekeeper/pkg-plist' Xbin/AquaGatekeeper Xetc/rc.d/agk.sh.sample X%%PORTDOCS%%%%DOCSDIR%%/AquaGatekeeper.htm X%%PORTDOCS%%%%DOCSDIR%%/AquaGatekeeperMonitor.chm X%%PORTDOCS%%%%DOCSDIR%%/CommandLineOptions.htm X%%PORTDOCS%%%%DOCSDIR%%/ConfigSyntax.htm X%%PORTDOCS%%%%DOCSDIR%%/License.rtf X%%PORTDOCS%%%%DOCSDIR%%/LicenseRus.rtf X%%PORTDOCS%%%%DOCSDIR%%/OperationPrinciples.htm X%%PORTDOCS%%%%DOCSDIR%%/RevisionHistory.htm X%%PORTDOCS%%%%DOCSDIR%%/default.css X%%EXAMPLESDIR%%/AquaGatekeeper.cfg X%%EXAMPLESDIR%%/Example.cfg X%%PORTDOCS%%@dirrm share/doc/AquaGatekeeper X%%PORTDOCS%%@dirrm share/examples/AquaGatekeeper END-of-AquaGatekeeper/pkg-plist echo x - AquaGatekeeper/pkg-install sed 's/^X//' >AquaGatekeeper/pkg-install << 'END-of-AquaGatekeeper/pkg-install' X#!/bin/sh X XUSER=agk XUID=172 XGROUP=${USER} XGID=${UID} X Xask() { X local question default answer X X question=$1 X default=$2 X if [ -z "${PACKAGE_BUILDING}" ]; then X read -p "${question} [${default}]? " answer X fi X if [ x${answer} = x ]; then X answer=${default} X fi X echo ${answer} X} X Xyesno() { X local dflt question answer X X question=$1 X dflt=$2 X while :; do X answer=$(ask "${question}" "${dflt}") X case "${answer}" in X [Yy]*) return 0;; X [Nn]*) return 1;; X esac X echo "Please answer yes or no." X done X} X Xmake_account() { X local u g uid gid gcos X X u=$1 X uid=$2 X g=$3 X gid=$4 X gcos=$5 X X if pw group show "${g}" >/dev/null 2>&1; then X echo "You already have a group \"${g}\", so I will use it." X else X echo "You need a group \"${g}\"." X if which -s pw && yesno "Would you like me to create it" y; then X pw groupadd -n ${g} -g ${gid} || exit X echo "Done." X else X echo "Please create it, and try again." X if ! grep -q "^${u}:" /etc/passwd; then X echo "While you're at it, please create a user \"${u}\" too," X echo "with a default group of \"${g}\"." X fi X exit 1 X fi X fi X X if pw user show "${u}" >/dev/null 2>&1; then X echo "You already have a user \"${u}\", so I will use it." X else X echo "You need a user \"${u}\"." X if which -s pw && yesno "Would you like me to create it" y; then X pw useradd -n ${u} -u ${uid} -g ${g} -h - -d /nonexistent \ X -s /nonexistent -c "${gcos}" || exit X echo "Done." X else X echo "Please create it, and try again." X exit 1 X fi X fi X} X X[ "$2" = POST-INSTALL ] || exit 0 X Xmake_account ${USER} ${UID} ${GROUP} ${GID} "AquaGateKeeper" END-of-AquaGatekeeper/pkg-install echo x - AquaGatekeeper/pkg-deinstall sed 's/^X//' >AquaGatekeeper/pkg-deinstall << 'END-of-AquaGatekeeper/pkg-deinstall' X#!/bin/sh X XUSER=agk XGROUP=agk X Xask() { X local question default answer X X question=$1 X default=$2 X if [ -z "${PACKAGE_BUILDING}" ]; then X read -p "${question} [${default}]? " answer X fi X if [ x${answer} = x ]; then X answer=${default} X fi X echo ${answer} X} X Xyesno() { X local dflt question answer X X question=$1 X dflt=$2 X while :; do X answer=$(ask "${question}" "${dflt}") X case "${answer}" in X [Yy]*) return 0;; X [Nn]*) return 1;; X esac X echo "Please answer yes or no." X done X} X Xdelete_account() { X local u g X X u=$1 X g=$2 X if yesno "Do you want me to remove group \"${g}\"" y; then X pw groupdel -n ${g} X echo "Done." X fi X if yesno "Do you want me to remove user \"${u}\"" y; then X pw userdel -n ${u} X echo "Done." X fi X} X X[ "$2" = DEINSTALL ] || exit 0 X Xexport PATH=/bin:/usr/bin:/usr/sbin X Xif ps -axc | grep -q AquaGatekeeper; then X if yesno "There are some AquaGatekeeper processes running. Shall I kill them" y X then X killall AquaGatekeeper X sleep 2 X else X echo "OK ... I hope you know what you are doing." X fi Xfi X Xdelete_account ${USER} ${GROUP} Xexit 0 END-of-AquaGatekeeper/pkg-deinstall exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311021349.hA2DnZSX001563>