ports/114814: [newport] net/yate
Balwinder S Dheeman
bdheeman at hotmail.com
Sun Jul 22 20:00:02 UTC 2007
>Number: 114814
>Category: ports
>Synopsis: [newport] net/yate
>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 Jul 22 20:00:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Balwinder S Dheeman
>Release: 7.0-CURRENT
>Organization:
Anu'z Linux at HOME
>Environment:
FreeBSD cto.homelinux.net 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Wed Jul 18 15:36:11 IST 2007 bsd at cto.homelinux.net:/usr/obj/usr/src/sys/MYKERNEL i386
>Description:
Newport: net/yate
Yate is a telephony engine aimed at creating a telephony server that performs well enough to deal with PBX requirements and also flexible enough for complex Gateway and IVR solutions.
WWW: http://YATE.null.ro/
(I have been using it since long, and made it available to the public from my blog http://cto.homelinux.net/~bsd/ pages.)
>How-To-Repeat:
NA
>Fix:
Plz check and install a shar file attached herewith.
Patch attached with submission follows:
# 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:
#
# /usr/ports/net/yate
# /usr/ports/net/yate/pkg-plist
# /usr/ports/net/yate/distinfo
# /usr/ports/net/yate/files
# /usr/ports/net/yate/files/patch-test_Makefile_in
# /usr/ports/net/yate/files/README.too
# /usr/ports/net/yate/files/patch-modules_help_Makefile_in
# /usr/ports/net/yate/files/pkg-message.in
# /usr/ports/net/yate/files/patch-modules_zapchan_cpp
# /usr/ports/net/yate/files/patch-modules_skin_Makefile_in
# /usr/ports/net/yate/files/patch-modules_Makefile_in
# /usr/ports/net/yate/files/patch-clients_Makefile_in
# /usr/ports/net/yate/files/yate.sh.in
# /usr/ports/net/yate/files/patch-configure
# /usr/ports/net/yate/Makefile
# /usr/ports/net/yate/pkg-install
# /usr/ports/net/yate/pkg-descr
#
echo c - /usr/ports/net/yate
mkdir -p /usr/ports/net/yate > /dev/null 2>&1
echo x - /usr/ports/net/yate/pkg-plist
sed 's/^X//' >/usr/ports/net/yate/pkg-plist << 'END-of-./usr/ports/net/yate/pkg-plist'
X%%WITH_X11%%bin/yate-gtk2
Xetc/yate/accfile.conf
Xetc/yate/callgen.conf
Xetc/yate/cdrbuild.conf
Xetc/yate/cdrfile.conf
Xetc/yate/dbpbx.conf
Xetc/yate/dsoundchan.conf
Xetc/yate/enumroute.conf
Xetc/yate/extmodule.conf
X%%WITH_X11%%etc/yate/gtk2client.conf
Xetc/yate/h323chan.conf
Xetc/yate/moh.conf
Xetc/yate/mysqldb.conf
Xetc/yate/pbxassist.conf
Xetc/yate/pgsqldb.conf
Xetc/yate/providers.conf
Xetc/yate/regexroute.conf
Xetc/yate/regfile.conf
Xetc/yate/register.conf
Xetc/yate/rmanager.conf
Xetc/yate/wpchan.conf
Xetc/yate/yate-gtk2.conf
Xetc/yate/yate.conf
Xetc/yate/yiaxchan.conf
Xetc/yate/yjinglechan.conf
Xetc/yate/yradius.conf
Xetc/yate/yrtpchan.conf
Xetc/yate/ysipchan.conf
Xetc/yate/ystunchan.conf
Xetc/yate/zapchan.conf
Xinclude/yate/yatecbase.h
Xinclude/yate/yateclass.h
Xinclude/yate/yatengine.h
Xinclude/yate/yatephone.h
Xinclude/yate/yateversn.h
Xlib/libyate.so
Xlib/libyate.so.1.1.0
X%%WITH_X11%%lib/menu/yate-gtk2.menu
Xlib/pkgconfig/yate.pc
Xlib/yate/modules/help/0.yhlp
Xlib/yate/modules/help/1.yhlp
Xlib/yate/modules/help/2.yhlp
Xlib/yate/modules/help/3.yhlp
Xlib/yate/modules/help/4.yhlp
Xlib/yate/modules/help/99.yhlp
Xlib/yate/modules/skin/default/gtk2client.rc
Xlib/yate/modules/skin/default/gtk2client.ui
Xlib/yate/modules/skin/default/skin.png
Xlib/yate/modules/skin/default/skin_g.png
Xlib/yate/modules/skin/default/skin_h.png
Xlib/yate/modules/skin/default/skin_n.png
Xlib/yate/modules/skin/default/skin_p.png
Xlib/yate/modules/skin/tabbed/book.png
Xlib/yate/modules/skin/tabbed/close.png
Xlib/yate/modules/skin/tabbed/configure.png
Xlib/yate/modules/skin/tabbed/down.png
Xlib/yate/modules/skin/tabbed/gtk2client.rc
Xlib/yate/modules/skin/tabbed/gtk2client.ui
Xlib/yate/modules/skin/tabbed/ok.png
Xlib/yate/modules/skin/tabbed/phone.png
Xlib/yate/modules/skin/tabbed/quest.png
Xlib/yate/modules/skin/tabbed/up.png
Xlib/yate/modules/skin/tabbed/user.png
Xlib/yate/modules/accfile.yate
Xlib/yate/modules/analyzer.yate
Xlib/yate/modules/callfork.yate
Xlib/yate/modules/callgen.yate
Xlib/yate/modules/cdrbuild.yate
Xlib/yate/modules/cdrfile.yate
Xlib/yate/modules/conference.yate
Xlib/yate/modules/dbpbx.yate
Xlib/yate/modules/dumbchan.yate
Xlib/yate/modules/enumroute.yate
Xlib/yate/modules/extmodule.yate
X%%WITH_FAX%%lib/yate/modules/faxchan.yate
Xlib/yate/modules/gsmcodec.yate
X%%WITH_H323%%lib/yate/modules/h323chan.yate
Xlib/yate/modules/ilbccodec.yate
Xlib/yate/modules/moh.yate
Xlib/yate/modules/msgsniff.yate
X%%WITH_MYSQL%%lib/yate/modules/mysqldb.yate
Xlib/yate/modules/pbx.yate
Xlib/yate/modules/pbxassist.yate
X%%WITH_PGSQL%%lib/yate/modules/pgsqldb.yate
Xlib/yate/modules/randcall.yate
Xlib/yate/modules/regexroute.yate
Xlib/yate/modules/regfile.yate
Xlib/yate/modules/register.yate
Xlib/yate/modules/rmanager.yate
Xlib/yate/modules/speexcodec.yate
Xlib/yate/modules/tonedetect.yate
Xlib/yate/modules/tonegen.yate
Xlib/yate/modules/wavefile.yate
Xlib/yate/modules/yiaxchan.yate
Xlib/yate/modules/yjinglechan.yate
Xlib/yate/modules/yradius.yate
Xlib/yate/modules/yrtpchan.yate
Xlib/yate/modules/ysipchan.yate
Xlib/yate/modules/ystunchan.yate
X%%WITH_ZAPTEL%%lib/yate/modules/zapchan.yate
Xlib/yate/scripts/Yate.pm
Xlib/yate/scripts/leavemail.php
Xlib/yate/scripts/libvoicemail.php
Xlib/yate/scripts/libyate.php
Xlib/yate/scripts/libyate.py
Xlib/yate/scripts/libyatechan.php
Xlib/yate/scripts/route.php
Xlib/yate/scripts/voicemail.php
Xsbin/yate
Xsbin/yate-config
X%%WITH_X11%%share/applications/yate-gtk2.desktop
Xshare/doc/yate/COPYING
Xshare/doc/yate/ChangeLog
Xshare/doc/yate/README
Xshare/doc/yate/README.too
X at dirrm share/nls/en_US.US-ASCII
X at dirrm share/nls/POSIX
X at dirrm lib/yate/scripts
X at dirrm lib/yate/modules/skin/tabbed
X at dirrm lib/yate/modules/skin/default
X at dirrm lib/yate/modules/skin
X at dirrm lib/yate/modules/help
X at dirrm lib/yate/modules
X at dirrm lib/yate
X%%WITH_X11%%@dirrm lib/menu
X at dirrm include/yate
X at dirrm etc/yate
END-of-/usr/ports/net/yate/pkg-plist
echo x - /usr/ports/net/yate/distinfo
sed 's/^X//' >/usr/ports/net/yate/distinfo << 'END-of-./usr/ports/net/yate/distinfo'
XMD5 (yate-1.2.0-2.tar.bz2) = 25913593f2dbdf9337cb504bc74dd290
XSHA256 (yate-1.2.0-2.tar.bz2) = d405ade16dddc2112d4e641efe2d05ed71799dd981550e63a584fda9615f3d2a
XSIZE (yate-1.2.0-2.tar.bz2) = 1325748
END-of-/usr/ports/net/yate/distinfo
echo c - /usr/ports/net/yate/files
mkdir -p /usr/ports/net/yate/files > /dev/null 2>&1
echo x - /usr/ports/net/yate/files/patch-test_Makefile_in
sed 's/^X//' >/usr/ports/net/yate/files/patch-test_Makefile_in << 'END-of-./usr/ports/net/yate/files/patch-test_Makefile_in'
X--- test/Makefile.in.orig Wed Mar 29 02:27:01 2006
X+++ test/Makefile.in Fri Dec 15 20:23:33 2006
X@@ -56,7 +56,7 @@
X install: all
X @mkdir -p "$(DESTDIR)$(moddir)/" && \
X for i in $(PROGS) ; do \
X- install -D "$$i" "$(DESTDIR)$(moddir)/$$i" ; \
X+ install "$$i" "$(DESTDIR)$(moddir)/$$i" ; \
X done;
X
X .PHONY: uninstall
END-of-/usr/ports/net/yate/files/patch-test_Makefile_in
echo x - /usr/ports/net/yate/files/README.too
sed 's/^X//' >/usr/ports/net/yate/files/README.too << 'END-of-./usr/ports/net/yate/files/README.too'
XAsterisk Open PBC/IVR Project using the Sangoma A101 and A102 cards
X===================================================================
X
XAlex Feldman: Aug 10 2005
XNenad Corbic:
X
XWANPIPE supports the Asterisk Open PBX/IVR project through an interface
Xof the Zaptel family of hardware devices. These devices share a common
Xdriver suite, called the ZAPATA Telephony Driver Suite (zaptel).
X
X
XASTERISK / ZAPTEL Installation
X-------------------------------
X
XFirst install:
X zaptel, and asterisk software on your system.
X
XThe Zaptel module can be installed using one of the following methods:
X
X1. You can use ports collection or packages method of installation if you
X want to install the latest stable release:
X # cd /usr/ports/misc/zaptel/
X # make install
X
X2. You can also use nightly snapshot from sn repository
X (http://www.portaone.com/~gonzo/zaptel-bsd-trunk.tar.gz).
X
X3. Subvestion repository: https://svn.bluezbox.repos/zaptel-bsd
X svn co --username svn --password svn https://svn.bluezbox.com/repos/zaptel-bsd
X
XThe Asterisk application can be installed from ports collection:
X # cd /usr/ports/net/asterisk
X # make install
X
X
X
XWANPIPE Releases
X----------------
X
X2.8.2-1: Latest Wanpipe Release
X
X o First version of Sangoma driver for FreeBSD OS that
X support Asterisk/Zaptel interface (AFT-A101/A102/A104 cards Only)
X
X
X
XWANPIPE Installation for Asterisk
X---------------------------------
X
X1. Download the LATEST Wanpipe 2.8.2 Release or Greater!
X
X Note: Wanpipe does not support Asterisk in releases
X LOWER than 2.8.2!
X
X ftp.sangoma.com/FreeBSD/current_wanpipe
X
X
X2. Install WANPIPE package
X
X eg: pkg_add wanpipe-2.8.2-1.tgz
X
X
X Proceed with default installation options.
X
X IMPORTANT:
X Under compilation mode: select CUSTOM
X
X Then select: DEF :for default protocols
X TDM :for TDM Voice asterisk support
X
X Proceed to compile wanpipe drivers.
X
X4. To confirm successful installation run:
X
X wanrouter hwprobe
X
X Confirm that Sangoma cards have been found.
X
X Note:
X Zaptel kernel drivers must be compiled and installed
X BEFORE loading WANPIPE drivers.
X
X
XWANPIPE Configuration for the A100 series of cards
X--------------------------------------------------
X
XYou can use the A101/A102 or A104 cards for both data and voice.
XThe following describes how to configure the Asterisk system for
Xvoice, with an auxiliary data interface, if needed.
X
X1. Run the configuration utility wancfg.
X
X /usr/sbin/wancfg
X
X Hardware Setup:
X Select Hardware: AFT
X
X T1/E1 CSU/DSU Setup can be configured via
X "Advanced Physical Medium Config"
X
X Protocol Setup:
X Select Protocol: TDM VOICE
X No other options
X
X Interface Setup:
X Select: SPAN Number: 1-24
X The SPAN usually starts with 1
X
X Select: Override Asterisk Echo Enable
X Default: NO
X
X This optoin will DISABLE/Override Asterisk
X ECHO Cancellation Cfg for this SPAN.
X
X Therefore, if you want to DISABLE Echo Cancellation
X for this SPAN, ie: ignore what is configured in
X zapata.conf, then set this option to YES.
X
X Used in switching applications where single SPAN
X needs echo cancellation and rest do not. Therefore,
X one would use this option to disable ECHO
X cancellation on SPANS that don't need it.
X
X
XZaptel configuration
X--------------------
X
XDownload the documentation how to configure Zaptel driver from
X
X(http://www.digium.com/downloads/configuring_zaptel.pdf).
X
XWhen configuring the Zaptel driver (/etc/zaptel.conf)
X
X 1) Select the same span configurations as you used for WANPIPE
X (i.e. LBO, framing, coding parameters).
X
X Otherwise the Zaptel configuration is completely
X standard, except that if there are data channels that
X will be handled by WANPIPE, those channels should be ignored,
X and not configured as 'nethdlc'.
X
X 2) If you are using multiple WANPIPE devices for Asterisk
X
X For example, an A102 card might be configured as:
X
X wanpipe1 and wanpipe2
X
X then you need to set your starting scripts to start
X the wanpipes in the same sequence as defined in zaptel.conf.
X
X Run: wanrouter wanrc
X
X to set the wanpipe startup order.
X
X 3) If you are using some channels for DATA
X
X You don't need to set the channel list for this
X interface under /etc/zaptel.conf because all data will go
X through the separate WANPIPE driver to the kernel.
X
X-------------------------------------------------------------------
END-of-/usr/ports/net/yate/files/README.too
echo x - /usr/ports/net/yate/files/patch-modules_help_Makefile_in
sed 's/^X//' >/usr/ports/net/yate/files/patch-modules_help_Makefile_in << 'END-of-./usr/ports/net/yate/files/patch-modules_help_Makefile_in'
X--- modules/help/Makefile.in.orig Wed Dec 13 09:44:44 2006
X+++ modules/help/Makefile.in Wed Dec 13 09:44:50 2006
X@@ -23,7 +23,7 @@
X @lst="`cd @srcdir@; ls -1 -d *.yhlp`" ; \
X mkdir -p "$(DESTDIR)$(helpdir)/" && \
X for i in $$lst ; do \
X- install -D -m 0644 "@srcdir@/$$i" "$(DESTDIR)$(helpdir)/$$i" ; \
X+ install -m 0644 "@srcdir@/$$i" "$(DESTDIR)$(helpdir)/$$i" ; \
X done;
X
X uninstall:
END-of-/usr/ports/net/yate/files/patch-modules_help_Makefile_in
echo x - /usr/ports/net/yate/files/pkg-message.in
sed 's/^X//' >/usr/ports/net/yate/files/pkg-message.in << 'END-of-./usr/ports/net/yate/files/pkg-message.in'
X-------------------------------------------------------------------------------
XIMPORTANT! MAKE SURE TO READ THE FOLLOWING!
X
XTo enable yate_enable="YES" in your /etc/rc.conf file. It'll also start
Xthe yate sever automatically when the system is started.
X
XTo manually start the yate server run (as root):
X
X# %%PREFIX%%/etc/rc.d/yate start
X
XTo manually stop it:
X
X# %%PREFIX%%/etc/rc.d/yate stop
X
XPlease note that it is still a "work in progress", so your bug reports
Xare welcome and will help to improve quality of this software.
X
XNOTE: Please read %%PREFIX%%/shere/doc/yate/README.too on a version of
XSangoma driver for FreeBSD OS that supports Asterisk/Zaptel interface
X(AFT-A101/A102/A104 cards Only)
X-------------------------------------------------------------------------------
END-of-/usr/ports/net/yate/files/pkg-message.in
echo x - /usr/ports/net/yate/files/patch-modules_zapchan_cpp
sed 's/^X//' >/usr/ports/net/yate/files/patch-modules_zapchan_cpp << 'END-of-./usr/ports/net/yate/files/patch-modules_zapchan_cpp'
X--- modules/zapchan.cpp.orig Tue Nov 7 03:45:34 2006
X+++ modules/zapchan.cpp Sat Dec 16 10:33:42 2006
X@@ -29,7 +29,7 @@
X #else
X
X extern "C" {
X-#include <linux/zaptel.h>
X+#include <zaptel.h>
X };
X
X #include <stdio.h>
END-of-/usr/ports/net/yate/files/patch-modules_zapchan_cpp
echo x - /usr/ports/net/yate/files/patch-modules_skin_Makefile_in
sed 's/^X//' >/usr/ports/net/yate/files/patch-modules_skin_Makefile_in << 'END-of-./usr/ports/net/yate/files/patch-modules_skin_Makefile_in'
X--- modules/skin/Makefile.in.orig Mon Nov 7 05:09:23 2005
X+++ modules/skin/Makefile.in Wed Dec 13 11:18:36 2006
X@@ -22,8 +22,10 @@
X install:
X @lst="`cd @srcdir@; ls -1 -d */* | sed '/CVS\|\.orig/d'`" ; \
X mkdir -p "$(DESTDIR)$(skindir)/" && \
X+ mkdir -p "$(DESTDIR)$(skindir)/tabbed" && \
X+ mkdir -p "$(DESTDIR)$(skindir)/default" && \
X for i in $$lst ; do \
X- install -D -m 0644 "@srcdir@/$$i" "$(DESTDIR)$(skindir)/$$i" ; \
X+ install -m 0644 "@srcdir@/$$i" "$(DESTDIR)$(skindir)/$$i" ; \
X done;
X
X uninstall:
END-of-/usr/ports/net/yate/files/patch-modules_skin_Makefile_in
echo x - /usr/ports/net/yate/files/patch-modules_Makefile_in
sed 's/^X//' >/usr/ports/net/yate/files/patch-modules_Makefile_in << 'END-of-./usr/ports/net/yate/files/patch-modules_Makefile_in'
X--- modules/Makefile.in.orig Fri Dec 8 19:14:14 2006
X+++ modules/Makefile.in Sat Dec 16 11:07:16 2006
X@@ -11,7 +11,7 @@
X CXX := @CXX@ -Wall
X SED := sed
X DEFS :=
X-INCLUDES := -I.. -I at top_srcdir@
X+INCLUDES := -I. -I at top_srcdir@ -I/usr/local/include
X CFLAGS := -O2 @MODULE_CFLAGS@ @INLINE_FLAGS@
X CPPFLAGS := -O2 @MODULE_CPPFLAGS@ @INLINE_FLAGS@
X LDFLAGS:= -L.. -lyate
X@@ -130,7 +130,7 @@
X install: all do-install
X @mkdir -p "$(DESTDIR)$(moddir)/" && \
X for i in $(PROGS) ; do \
X- install -D "$$i" "$(DESTDIR)$(moddir)/$$i" ; \
X+ install "$$i" "$(DESTDIR)$(moddir)/$$i" ; \
X done;
X
X .PHONY: uninstall
X@@ -172,25 +172,25 @@
X # Take special care of the modules that depend on optional libs
X
X zapchan.yate: libypri.o
X-zapchan.yate: LOCALFLAGS = libypri.o -lpri
X+zapchan.yate: LOCALFLAGS = libypri.o -lpri -L/usr/local/lib
X
X wpchan.yate: libypri.o
X-wpchan.yate: LOCALFLAGS = @WANPIPE_HWEC_INC@ libypri.o -lpri
X+wpchan.yate: LOCALFLAGS = @WANPIPE_HWEC_INC@ libypri.o -lpri -L/usr/local/lib
X
X ysigchan.yate wpcard.yate: ./libyatess7.so
X ysigchan.yate wpcard.yate: LOCALFLAGS = -I./contrib/yss7
X ysigchan.yate wpcard.yate: LOCALLIBS = -lyatess7
X
X-h323chan.yate: LOCALFLAGS = -DPHAS_TEMPLATES -D_REENTRANT -DP_HAS_SEMAPHORES @H323_INC@
X+h323chan.yate: LOCALFLAGS = -DPHAS_TEMPLATES -D_REENTRANT -DP_HAS_SEMAPHORES @H323_INC@ -I/usr/local/include
X h323chan.yate: LOCALLIBS = @H323_LIB@
X
X pgsqldb.yate: LOCALFLAGS = @PGSQL_INC@
X-pgsqldb.yate: LOCALLIBS = -lpq
X+pgsqldb.yate: LOCALLIBS = -lpq -L/usr/local/lib
X
X mysqldb.yate: LOCALFLAGS = @MYSQL_INC@
X mysqldb.yate: LOCALLIBS = @MYSQL_LIB@
X
X-enumroute.yate: LOCALLIBS = -lresolv
X+enumroute.yate: LOCALLIBS = -lc
X
X alsachan.yate: LOCALLIBS = -lasound
X
X@@ -214,13 +214,13 @@
X ilbccodec.yate: LOCALLIBS = ./contrib/ilbc/libilbc.a
X ilbccodec.yate: LOCALFLAGS = @ILBC_INC@
X
X-gsmcodec.yate: LOCALLIBS = -lgsm
X+gsmcodec.yate: LOCALLIBS = -lgsm -L/usr/local/lib
X gsmcodec.yate: LOCALFLAGS = @GSM_INC@
X
X-speexcodec.yate: LOCALLIBS = -lspeex
X+speexcodec.yate: LOCALLIBS = -lspeex -L/usr/local/lib
X speexcodec.yate: LOCALFLAGS = @SPEEX_INC@
X
X-faxchan.yate: LOCALLIBS = -lspandsp
X+faxchan.yate: LOCALLIBS = -lspandsp -L/usr/local/lib
X faxchan.yate: LOCALFLAGS = @SPANDSP_INC@
X
X ysipchan.yate: ./contrib/ysip/libyatesip.a
END-of-/usr/ports/net/yate/files/patch-modules_Makefile_in
echo x - /usr/ports/net/yate/files/patch-clients_Makefile_in
sed 's/^X//' >/usr/ports/net/yate/files/patch-clients_Makefile_in << 'END-of-./usr/ports/net/yate/files/patch-clients_Makefile_in'
X--- clients/Makefile.in.orig Wed Dec 13 09:46:57 2006
X+++ clients/Makefile.in Wed Dec 13 09:47:22 2006
X@@ -65,13 +65,13 @@
X $(if $(MENUFILES),\
X @mkdir -p "$(DESTDIR)$(menudir)/" && \
X for i in $(MENUFILES) ; do \
X- install -D -m 0644 "@srcdir@/$$i" "$(DESTDIR)$(menudir)/$$i" ; \
X+ install -m 0644 "@srcdir@/$$i" "$(DESTDIR)$(menudir)/$$i" ; \
X done \
X )
X $(if $(DESKFILES),\
X @mkdir -p "$(DESTDIR)$(deskdir)/" && \
X for i in $(DESKFILES) ; do \
X- install -D -m 0644 "@srcdir@/$$i" "$(DESTDIR)$(deskdir)/$$i" ; \
X+ install -m 0644 "@srcdir@/$$i" "$(DESTDIR)$(deskdir)/$$i" ; \
X done \
X )
X
END-of-/usr/ports/net/yate/files/patch-clients_Makefile_in
echo x - /usr/ports/net/yate/files/yate.sh.in
sed 's/^X//' >/usr/ports/net/yate/files/yate.sh.in << 'END-of-./usr/ports/net/yate/files/yate.sh.in'
X#!/bin/sh
X#
X# $FreeBSD$
X#
X# PROVIDE: yate
X# REQUIRE: DAEMON
X# KEYWORD: shutdown
X#
X# Add the following lines to /etc/rc.conf to enable the YATE:
X#
X# yate_enable="YES"
X#
X
X. %%RC_SUBR%%
X
Xname=yate
Xrcvar=`set_rcvar`
X
Xcommand="%%PREFIX%%/sbin/yate"
Xpidfile="/var/run/${name}.pid"
Xlogfile="/var/log/yate/messages"
Xcdrfile=`awk -F= '/^file=.+/ {print $2}' %%PREFIX%%/etc/yate/cdrfile.conf`
X
Xstart_precmd="yate_prestart"
Xstop_postcmd="yate_poststop"
X
Xyate_prestart()
X{
X mkdir -p $(dirname $pidfile)
X chown yate:yate $(dirname $pidfile)
X mkdir -p $(dirname $cdrfile)
X chown yate:yate $(dirname $cdrfile)
X chown yate:yate $(dirname $logfile)
X}
X
Xyate_poststop()
X{
X rm -f $pidfile
X}
X
Xyate_enable=${yate_enable="NO"}
Xyate_flags=${yate_flags-"-Du -d -l ${logfile} -p ${pidfile} -s"}
X
Xload_rc_config ${name}
Xrun_rc_command "$1"
END-of-/usr/ports/net/yate/files/yate.sh.in
echo x - /usr/ports/net/yate/files/patch-configure
sed 's/^X//' >/usr/ports/net/yate/files/patch-configure << 'END-of-./usr/ports/net/yate/files/patch-configure'
X--- configure.orig Sat Dec 16 08:05:25 2006
X+++ configure Sat Dec 16 10:30:29 2006
X@@ -5969,7 +5969,7 @@
X cat >>conftest.$ac_ext <<_ACEOF
X /* end confdefs.h. */
X
X-#include <linux/zaptel.h>
X+#include <zaptel.h>
X
X int
X main ()
X@@ -6362,7 +6362,7 @@
X fi
X
X if [ "x$ac_cv_use_spandsp" = "xyes" ]; then
X-for i in /usr/include /usr/local/include; do
X+for i in /usr/include /usr/local/include /usr/local/include/spandsp; do
X ac_cv_use_spandsp="$i"
X test -f "$ac_cv_use_spandsp/spandsp.h" && break
X done
X@@ -6374,8 +6374,8 @@
X
X ac_ext=cpp
X ac_cpp='$CXXCPP $CPPFLAGS'
X-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
X-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
X+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS -I/usr/local/include conftest.$ac_ext >&5'
X+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS -L/usr/local/lib conftest.$ac_ext $LIBS >&5'
X ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
X
X SAVE_CFLAGS="$CFLAGS"
X@@ -6720,7 +6720,7 @@
X MODULE_CFLAGS="-fno-exceptions -fPIC $HAVE_GCC_FORMAT_CHECK"
X MODULE_CPPFLAGS="-fno-check-new $RTTI_OPT $MODULE_CFLAGS"
X MODULE_LDRELAX="-export-dynamic -shared"
X-MODULE_LDFLAGS="$MODULE_LDRELAX $GCC_UNRESOLVED_SYMBOLS"
X+MODULE_LDFLAGS="$MODULE_LDRELAX"
X MODULE_SYMBOLS="-Wl,--retain-symbols-file,/dev/null"
X
X
END-of-/usr/ports/net/yate/files/patch-configure
echo x - /usr/ports/net/yate/Makefile
sed 's/^X//' >/usr/ports/net/yate/Makefile << 'END-of-./usr/ports/net/yate/Makefile'
X# New ports collection makefile for: yate
X# Date created: 11 December 2006
X# Whom: Balwinder S "bsd" Dheeman <bsd at rubyforge.org>
X#
X# $FreeBSD$
X#
X
XPORTNAME= yate
XDISTVERSION= 1.2.0-2
XPORTREVISION= 1
XCATEGORIES= net
XMASTER_SITES= http://cto.homelinux.net/pub/FreeBSD/ports/distfiles/ \
X http://yate.null.ro/tarballs/yate1/ \
X ${MASTER_SITE_LOCAL}
XEXTRACT_SUFX= .tar.bz2
X
XMAINTAINER= ports at FreeBSD.org
XCOMMENT= Yet Another Telephony Engine
X
XLIB_DEPENDS= gsm.1:${PORTSDIR}/audio/gsm \
X speex.1:${PORTSDIR}/audio/speex
X
XUSE_GMAKE= yes
XUSE_BISON= yes
X
XGNU_CONFIGURE= yes
XCONFIGURE_ARGS= --without-fdsize \
X --mandir=${LOCALBASE}/man
XCONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
X LDFLAGS="-L${LOCALBASE}/lib"
XMAKE_ENV= CXX="${CXX}" \
X PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
X PTHREAD_LIBS="${PTHREAD_LIBS}" \
X PWLIBDIR=${LOCALBASE}/share/pwlib \
X OPENH323DIR=${LOCALBASE}/share/openh323
XMAN8= yate-config.8 yate.8
X
XONLY_FOR_ARCHS= amd64 i386 sparc64
X
XOPTIONS= X11 "Build GUI client; yate-gtk2" on \
X MYSQL "MySQL Database support" off \
X PGSQL "PostgreSQL Database support" on \
X H323 "H323 software channel/protocol support" on \
X ZAPTEL "Zaptel hardware channel/driver support" on \
X FAX "Fax software channel/driver support" on
X
XDOCSDIR= ${LOCALBASE}/share/doc/yate
XPORTDOCS= ${DOCSDIR}/*
XPLIST_SUB= BRISTUFF="@comment "
XSUB_FILES= pkg-message
XUSE_RC_SUBR= yate.sh
XWRKSRC= ${WRKDIR}/${PORTNAME}-1.2.0
X
X.include <bsd.port.pre.mk>
X
X.if !defined(WITHOUT_X11)
XCONFIGURE_ARGS+= --with-libgtk2
XMAKE_ENV+= WITH_X11=1
XPLIST_SUB+= WITH_X11=""
XUSE_GNOME= gtk20
X.else
XCONFIGURE_ARGS+= --without-libgtk2
XPLIST_SUB+= WITH_X11="@comment "
X.endif
X
X.if !defined(WITHOUT_MYSQL)
XMAKE_ENV+= WITH_MYSQL=1
XPLIST_SUB+= WITH_MYSQL=""
XUSE_MYSQL= yes
X.else
XCONFIGURE_ARGS+= --with-mysql=/none
XPLIST_SUB+= WITH_MYSQL="@comment "
X.endif
X
X.if !defined(WITHOUT_PGSQL)
XCONFIGURE_ARGS+= --with-libpq=${LOCALBASE}
XMAKE_ENV+= WITH_PGSQL=1
XPLIST_SUB+= WITH_PGSQL=""
XUSE_PGSQL= yes
X.else
XPLIST_SUB+= WITH_PGSQL="@comment "
X.endif
X
X.if ${ARCH} != "i386"
XWITHOUT_H323= 1
XWITHOUT_ZAPTEL= 1
X.endif
X
X.if !defined(WITHOUT_H323)
XCONFIGURE_ARGS+= --with-pwlib=${LOCALBASE} \
X --with-openh323=${LOCALBASE}
XLIB_DEPENDS+= pt_r.1:${PORTSDIR}/devel/pwlib\
X h323_r.1:${PORTSDIR}/net/openh323
XMAKE_ENV+= WITH_H323=1
XPLIST_SUB+= WITH_H323=""
X.else
XPLIST_SUB+= WITH_H323="@comment "
X.endif
X
X.if !defined(WITHOUT_ZAPTEL)
XBUILD_DEPENDS+= libpri>=1.2.0:${PORTSDIR}/misc/libpri \
X ${LOCALBASE}/include/zaptel.h:${PORTSDIR}/misc/zaptel
XLIB_DEPENDS+= pri.1:${PORTSDIR}/misc/libpri
XMAKE_ENV+= WITH_ZAPTEL=1
XPLIST_SUB+= WITH_ZAPTEL=""
XRUN_DEPENDS+= ${LOCALBASE}/include/zaptel.h:${PORTSDIR}/misc/zaptel
X.else
XMAKE_ENV+= WITHOUT_ZAPTEL=1
XPLIST_SUB+= WITH_ZAPTEL="@comment "
X.endif
X
X.if !defined(WITHOUT_FAX)
XLIB_DEPENDS+= spandsp.0:${PORTSDIR}/comms/spandsp-devel
XMAKE_ENV+= WITH_FAX=1
XPLIST_SUB+= WITH_FAX=""
X.else
XPLIST_SUB+= WITH_FAX="@comment "
X.endif
X
X.if ${OSVERSION} >= 500036
XPLIST_SUB+= NEWGCC=""
X.else
XPLIST_SUB+= NEWGCC="@comment "
X.endif
X
Xpre-install:
X @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
X
Xpost-install:
X mkdir -p ${DOCSDIR}
X cp -p ${WRKSRC}/COPYING ${LOCALBASE}/share/doc/yate
X cp -p ${WRKSRC}/ChangeLog ${LOCALBASE}/share/doc/yate
X cp -p ${WRKSRC}/README ${LOCALBASE}/share/doc/yate
X cp -p files/README.too ${LOCALBASE}/share/doc/yate
X @${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.post.mk>
END-of-/usr/ports/net/yate/Makefile
echo x - /usr/ports/net/yate/pkg-install
sed 's/^X//' >/usr/ports/net/yate/pkg-install << 'END-of-./usr/ports/net/yate/pkg-install'
X#!/bin/sh
X# $FreeBSD$
X#
X
Xif [ "$2" != "PRE-INSTALL" ]; then
X exit 0
Xfi
X
XYATE_USER=yate
XYATE_GROUP=${YATE_USER}
XYATE_UID=204
XYATE_GID=${YATE_UID}
X
Xif ! pw groupshow "${YATE_GROUP}" 2>/dev/null 1>&2; then
X if pw groupadd ${YATE_GROUP} -g ${YATE_GID}; then
X echo "Added group \"${YATE_GROUP}\"."
X else
X echo "Adding group \"${YATE_GROUP}\" failed..."
X exit 1
X fi
Xfi
X
Xif ! pw usershow "${YATE_USER}" 2>/dev/null 1>&2; then
X if pw useradd ${YATE_USER} -u ${YATE_UID} -g ${YATE_GROUP} -h - \
X -s "/sbin/nologin" -d "/nonexistent" \
X -c "Yate Telephoney Server"; \
X then
X echo "Added user \"${YATE_USER}\"."
X else
X echo "Adding user \"${YATE_USER}\" failed..."
X exit 1
X fi
Xfi
X
Xexit 0
END-of-/usr/ports/net/yate/pkg-install
echo x - /usr/ports/net/yate/pkg-descr
sed 's/^X//' >/usr/ports/net/yate/pkg-descr << 'END-of-./usr/ports/net/yate/pkg-descr'
XYate is a telephony engine aimed at creating a telephony server that
Xperforms well enough to deal with PBX requirements and also flexible
Xenough for complex Gateway and IVR solutions.
X
XWWW: http://YATE.null.ro/
END-of-/usr/ports/net/yate/pkg-descr
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list