ports/78694: New port: net/AquaGatekeeper2 H323 Gatekeeper and proxy

Eugene Grosbein eugen at grosbein.pp.ru
Fri Mar 11 13:00:10 UTC 2005


>Number:         78694
>Category:       ports
>Synopsis:       New port: net/AquaGatekeeper2 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:   Fri Mar 11 13:00:09 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Eugene Grosbein
>Release:        FreeBSD 4.10-STABLE i386
>Organization:
Svyaz Service JSC
>Environment:
System: FreeBSD www.svzserv.kemerovo.su 4.10-STABLE FreeBSD 4.10-STABLE #1: Thu Jun 17 13:32:02 KRAST 2004 eu at www.svzserv.kemerovo.su:/home4/obj/home/src/sys/WWW i386

>Description:

	This is the second generation of AquaGatekeeper,
	gatekeeper and proxy by Infinet Wireless LTD
	(formerly Aqua Comptek Group). Its first version is already
	in the Ports Collection. New release comes as new port
	because of lots of reasons: it is not quite compatible
	with older versions, its configuration syntax has changed,
	its license is more restrictive (now it allows only 7
	concurrent calls).

>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:
#
#	AquaGatekeeper2
#	AquaGatekeeper2/files
#	AquaGatekeeper2/files/agk.sh.sample
#	AquaGatekeeper2/Makefile
#	AquaGatekeeper2/distinfo.amd64
#	AquaGatekeeper2/distinfo.i386
#	AquaGatekeeper2/pkg-deinstall
#	AquaGatekeeper2/pkg-descr
#	AquaGatekeeper2/pkg-install
#	AquaGatekeeper2/pkg-message
#	AquaGatekeeper2/pkg-plist
#
echo c - AquaGatekeeper2
mkdir -p AquaGatekeeper2 > /dev/null 2>&1
echo c - AquaGatekeeper2/files
mkdir -p AquaGatekeeper2/files > /dev/null 2>&1
echo x - AquaGatekeeper2/files/agk.sh.sample
sed 's/^X//' >AquaGatekeeper2/files/agk.sh.sample << 'END-of-AquaGatekeeper2/files/agk.sh.sample'
X#!/bin/sh
X
XPREFIX=$(expr `realpath $0` : "\(/.*\)/etc/rc\.d/`basename $0`\$")
XPROG=$PREFIX/sbin/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-AquaGatekeeper2/files/agk.sh.sample
echo x - AquaGatekeeper2/Makefile
sed 's/^X//' >AquaGatekeeper2/Makefile << 'END-of-AquaGatekeeper2/Makefile'
X# New ports collection makefile for:   AquaGatekeeper2
X# Date created:        11 March 2005
X# Whom:                Eugene Grosbein <eugen at grosbein.pp.ru>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	AquaGatekeeper
XPORTVERSION=	2.0
XCATEGORIES=	net
XMASTER_SITES=	http://www.infinetwireless.com/WirelessEq/tmp/software/docs/agk/ \
X		ftp://www.kuzbass.ru/pub/FreeBSD/ports/distfiles/
XEXTRACT_SUFX=	.tgz
X
XMAINTAINER=	eugen at grosbein.pp.ru
XCOMMENT=	Aqua H323 Gatekeeper and proxy
X
XWRKSRC=		${WRKDIR}/${PORTNAME}
XNO_BUILD=	yes
XONLY_FOR_ARCHS=	amd64 i386
XMD5_FILE=	${MASTERDIR}/distinfo.${ARCH}
X
XNO_PACKAGE=	"No commercial redistribution"
XNO_CDROM=	"No commercial redistribution"
X
X.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
XIS_INTERACTIVE=	yes
X.endif
X
Xdo-install:
X	@${INSTALL_PROGRAM} ${WRKSRC}/AquaGatekeeper ${PREFIX}/sbin/
X	@${INSTALL_SCRIPT} ${FILESDIR}/agk.sh.sample ${PREFIX}/etc/rc.d/
X	@${INSTALL_DATA} ${WRKSRC}/Config/AquaGatekeeper.cfg ${PREFIX}/etc/AquaGatekeeper.cfg.sample
X	@${MKDIR} ${EXAMPLESDIR}
X	@${INSTALL_DATA} ${WRKSRC}/Config/Example.cfg ${EXAMPLESDIR}
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${DOCSDIR}
X	@for docfile in ${WRKSRC}/Help/* ${WRKSRC}/*.rtf; \
X		do ${INSTALL_MAN} $$docfile ${DOCSDIR}; \
X	done
X	@${MKDIR} ${DOCSDIR}/Rus
X	@for docfile in ${WRKSRC}/Help.Rus/*; \
X		do ${INSTALL_MAN} $$docfile ${DOCSDIR}/Rus; \
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=		"Supported only on 4.x systems and later"
X.elif ${OSVERSION} >= 500000 && ${ARCH} == "i386"
XLIB_DEPENDS=	c.4:${PORTSDIR}/misc/compat4x
X.endif
X
X.if ${ARCH} == "amd64"
XDISTNAME=	AquaGatekeeper200FreeBSDamd64Build653
X.else
XDISTNAME=	AquaGatekeeper200FreeBSDBuild653
X.endif
X
X.include <bsd.port.post.mk>
END-of-AquaGatekeeper2/Makefile
echo x - AquaGatekeeper2/distinfo.amd64
sed 's/^X//' >AquaGatekeeper2/distinfo.amd64 << 'END-of-AquaGatekeeper2/distinfo.amd64'
XMD5 (AquaGatekeeper200FreeBSDamd64Build653.tgz) = bccffb094d3a80f3fade694c588377aa
XSIZE (AquaGatekeeper200FreeBSDamd64Build653.tgz) = 686437
END-of-AquaGatekeeper2/distinfo.amd64
echo x - AquaGatekeeper2/distinfo.i386
sed 's/^X//' >AquaGatekeeper2/distinfo.i386 << 'END-of-AquaGatekeeper2/distinfo.i386'
XMD5 (AquaGatekeeper200FreeBSDBuild653.tgz) = b4db47138010d875acf2c3b09c67191b
XSIZE (AquaGatekeeper200FreeBSDBuild653.tgz) = 749636
END-of-AquaGatekeeper2/distinfo.i386
echo x - AquaGatekeeper2/pkg-deinstall
sed 's/^X//' >AquaGatekeeper2/pkg-deinstall << 'END-of-AquaGatekeeper2/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-AquaGatekeeper2/pkg-deinstall
echo x - AquaGatekeeper2/pkg-descr
sed 's/^X//' >AquaGatekeeper2/pkg-descr << 'END-of-AquaGatekeeper2/pkg-descr'
XAqua Gatekeeper 2.0 is H.323 gatekeeper and proxy by Infinet Wireless LTD.
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 2.0 is limited to 7 concurrent calls.
X
XWWW: http://www.infinetwireless.com/WirelessEq/tmp/software/docs/agk_manual/agk
X
X- Grosbein
Xeugen at grosbein.pp.ru
END-of-AquaGatekeeper2/pkg-descr
echo x - AquaGatekeeper2/pkg-install
sed 's/^X//' >AquaGatekeeper2/pkg-install << 'END-of-AquaGatekeeper2/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-AquaGatekeeper2/pkg-install
echo x - AquaGatekeeper2/pkg-message
sed 's/^X//' >AquaGatekeeper2/pkg-message << 'END-of-AquaGatekeeper2/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-AquaGatekeeper2/pkg-message
echo x - AquaGatekeeper2/pkg-plist
sed 's/^X//' >AquaGatekeeper2/pkg-plist << 'END-of-AquaGatekeeper2/pkg-plist'
Xsbin/AquaGatekeeper
Xetc/rc.d/agk.sh.sample
Xetc/AquaGatekeeper.cfg.sample
X%%PORTDOCS%%%%DOCSDIR%%/AquaGatekeeper.htm
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%%PORTDOCS%%%%DOCSDIR%%/Rus/AquaGatekeeper.htm
X%%PORTDOCS%%%%DOCSDIR%%/Rus/CommandLineOptions.htm
X%%PORTDOCS%%%%DOCSDIR%%/Rus/ConfigSyntax.htm
X%%PORTDOCS%%%%DOCSDIR%%/Rus/OperationPrinciples.htm
X%%PORTDOCS%%%%DOCSDIR%%/Rus/RevisionHistory.htm
X%%PORTDOCS%%%%DOCSDIR%%/Rus/default.css
X%%EXAMPLESDIR%%/Example.cfg
X%%PORTDOCS%%@dirrm %%DOCSDIR%%/Rus
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
X%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
END-of-AquaGatekeeper2/pkg-plist
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list