Skip site navigation (1)Skip section navigation (2)
Date:      21 Jun 2006 08:06:54 -0000
From:      Filippo Natali <filippo.natali@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/99238: NEW PORT: net/iaxmodem
Message-ID:  <20060621080654.3050.qmail@scarana.netwing.it>
Resent-Message-ID: <200606210810.k5L8ASVc043301@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         99238
>Category:       ports
>Synopsis:       NEW PORT: net/iaxmodem
>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:   Wed Jun 21 08:10:27 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Filippo Natali
>Release:        FreeBSD 5.4-RELEASE-p8 i386
>Organization:
Netwing
>Environment:
System: FreeBSD scarana.netwing.it 5.4-RELEASE-p8 FreeBSD 5.4-RELEASE-p8 #0: Wed Nov 16 23:41:28 CET 2005 netwing@scarana.netwing.it:/usr/obj/usr/src/sys/PE1425 i386


	
>Description:
	iaxmodem is a software modem that connects ta IAX channel,useful to send/receive fax thru Asterisk and HylaFax 
>How-To-Repeat:
	
>Fix:

	

--- iaxmodem.shar begins here ---
# 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:
#
#	iaxmodem
#	iaxmodem/pkg-plist
#	iaxmodem/pkg-descr
#	iaxmodem/distinfo
#	iaxmodem/Makefile
#	iaxmodem/files
#	iaxmodem/files/patch-aa
#	iaxmodem/files/pkg-message.in
#	iaxmodem/files/iaxmodem.sh.in
#
echo c - iaxmodem
mkdir -p iaxmodem > /dev/null 2>&1
echo x - iaxmodem/pkg-plist
sed 's/^X//' >iaxmodem/pkg-plist << 'END-of-iaxmodem/pkg-plist'
Xsbin/iaxmodem
X%%EXAMPLESDIR%%/iaxmodem-cfg.ttyIAX
X%%EXAMPLESDIR%%/config.ttyIAX
X%%PORTDOCS%%%%DOCSDIR%%/README
X%%PORTDOCS%%%%DOCSDIR%%/FAQ
X%%PORTDOCS%%%%DOCSDIR%%/CHANGES
X%%PORTDOCS%%%%DOCSDIR%%/TODO
X@dirrm etc/iaxmodem
X@dirrm %%EXAMPLESDIR%%
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
END-of-iaxmodem/pkg-plist
echo x - iaxmodem/pkg-descr
sed 's/^X//' >iaxmodem/pkg-descr << 'END-of-iaxmodem/pkg-descr'
XIAXmodem is a software modem written in C that uses
Xan IAX channel (commonly provided by an Asterisk PBX
Xsystem) instead of a traditional phone line and uses
Xa DSP library instead of DSP hardware chipsets.
X
XWWW: http://sourceforge.net/projects/iaxmodem
END-of-iaxmodem/pkg-descr
echo x - iaxmodem/distinfo
sed 's/^X//' >iaxmodem/distinfo << 'END-of-iaxmodem/distinfo'
XMD5 (iaxmodem-0.1.9.tar.gz) = 621ea4c684d2b7ea14485e9493ecc703
XSHA256 (iaxmodem-0.1.9.tar.gz) = b692beeb075e1047300373d4b928a6c29cc3ec702d40046f9b7540455028cd87
XSIZE (iaxmodem-0.1.9.tar.gz) = 2006491
END-of-iaxmodem/distinfo
echo x - iaxmodem/Makefile
sed 's/^X//' >iaxmodem/Makefile << 'END-of-iaxmodem/Makefile'
X# New ports collection makefile for:   iaxmodem
X# Date created:                15 Jun 2006
X# Whom:                        Filippo Natali <filippo.natali@gmail.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	iaxmodem
XPORTVERSION=	0.1.9
XCATEGORIES=	comms
XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=	${PORTNAME}
X
XMAINTAINER=	filippo.natali@gmail.com
XCOMMENT=	Software modem that connects ta IAX channel
X
XMAN1=	iaxmodem.1
XCFLAGS+="-I${PREFIX}/include"
XLDFLAGS+="-L${PREFIX}/lib"
X
XSUB_FILES=	pkg-message
XUSE_RC_SUBR=	iaxmodem.sh
X
Xpost-patch:
X	@${REINPLACE_CMD} -e "s|/usr/local/etc|${PREFIX}/etc|g" ${WRKSRC}/iaxmodem.1
X	@${REINPLACE_CMD} -e "s|/etc/iaxmodem|${PREFIX}/etc/iaxmodem|g" ${WRKSRC}/iaxmodem.c
X
Xdo-build:
X	@cd ${WRKSRC} && ./build static
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/iaxmodem ${PREFIX}/sbin/ && \
X	${MKDIR} ${PREFIX}/etc/iaxmodem && \
X	${MKDIR} /var/log/iaxmodem && \
X	${MKDIR} ${EXAMPLESDIR} && \
X	${INSTALL_DATA} ${WRKSRC}/config.ttyIAX ${EXAMPLESDIR}/ && \
X	${INSTALL_DATA} ${WRKSRC}/iaxmodem-cfg.ttyIAX ${EXAMPLESDIR}/
X	${INSTALL_MAN} ${WRKSRC}/iaxmodem.1 ${MAN1PREFIX}/man/man1
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR} && \
X	${INSTALL_DATA} ${WRKSRC}/README ${WRKSRC}/TODO ${WRKSRC}/FAQ ${WRKSRC}/CHANGES ${DOCSDIR}
X.endif
X
Xpost-install:
X.if !defined(BATCH)
X	@${CAT} ${PKGMESSAGE}
X.endif
X
X.include <bsd.port.mk>
END-of-iaxmodem/Makefile
echo c - iaxmodem/files
mkdir -p iaxmodem/files > /dev/null 2>&1
echo x - iaxmodem/files/patch-aa
sed 's/^X//' >iaxmodem/files/patch-aa << 'END-of-iaxmodem/files/patch-aa'
X--- build.orig	Mon Jun 12 17:03:49 2006
X+++ build	Thu Jun 15 14:24:34 2006
X@@ -1,7 +1,8 @@
X #!/bin/sh
X 
X MODEMVER=iaxmodem-0.1.9
X-
X+CFLAGS="-I/usr/local/include"
X+LDFLAGS="-L/usr/local/lib"
X DSPVER=`grep "^VERSION =" lib/spandsp/Makefile.in | sed 's/.*= //g'`
X if [ -n "$DSPVER" ]; then
X     DSPVER="spandsp-$DSPVER-snapshot-20060525+"
X@@ -16,14 +17,14 @@
X     ./configure && \
X     make && \
X     cd ../spandsp && \
X-    ./configure && \
X+    ./configure CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS && \
X     make && \
X     cd ../.. && \
X-    gcc -Wall -O2 -g -DMODEMVER=\"$MODEMVER\" -DDSPVER=\"$DSPVER\" -DIAXVER=\"$IAXVER\" -DSTATICLIBS -D_GNU_SOURCE \
X+    gcc $CFLAGS $LDFLAGS -Wall -O2 -g -DMODEMVER=\"$MODEMVER\" -DDSPVER=\"$DSPVER\" -DIAXVER=\"$IAXVER\" -DSTATICLIBS -D_GNU_SOURCE \
X 	-std=c99 -Ilib/libiax2/src -Ilib/spandsp/src -c -o iaxmodem.o iaxmodem.c && \
X-    gcc -lm -lutil -ltiff -o iaxmodem iaxmodem.o lib/spandsp/src/.libs/libspandsp.a lib/libiax2/src/.libs/libiax.a
X+    gcc $CFLAGS $LDFLAGS -lm -lutil -ltiff -o iaxmodem iaxmodem.o lib/spandsp/src/.libs/libspandsp.a lib/libiax2/src/.libs/libiax.a
X else
X-    gcc -Wall -O2 -g -DMODEMVER=\"$MODEMVER\" -DDSPVER=\"$DSPVER\" -DIAXVER=\"$IAXVER\" \
X+    gcc $CFLAGS $LDFLAGS -Wall -O2 -g -DMODEMVER=\"$MODEMVER\" -DDSPVER=\"$DSPVER\" -DIAXVER=\"$IAXVER\" \
X 	-lm -liax -lutil -lspandsp -ltiff -o iaxmodem iaxmodem.c
X fi
X if [ -n "`ls /etc/iaxmodem-cfg.* 2>/dev/null`" ]; then
X--- iaxmodem.c.orig	Mon Jun 12 15:54:33 2006
X+++ iaxmodem.c	Thu Jun 15 14:26:12 2006
X@@ -17,11 +17,13 @@
X  */
X #include <stdio.h>
X #include <string.h>
X-#ifndef __OpenBSD__
X+#if !defined(__OpenBSD__) && !defined(__FreeBSD__)
X #include <pty.h>
X #else
X #include <termios.h>
X+#if !defined(__FreeBSD__)
X #include <util.h>
X+#endif
X #endif
X #include <stdlib.h>
X #include <unistd.h>
X--- lib/libiax2/src/iax.c.orig	Mon Jun 12 15:54:46 2006
X+++ lib/libiax2/src/iax.c	Thu Jun 15 14:22:17 2006
X@@ -64,9 +64,9 @@
X #include <arpa/inet.h>
X #include <time.h>
X 
X-#if !defined(MACOSX) && !defined(__OpenBSD__)
X+#if !defined(MACOSX) && !defined(__OpenBSD__) && !defined(__FreeBSD__)
X #include <malloc.h>
X-#if !defined(SOLARIS)
X+#if !defined(SOLARIS) && !defined(__FreeBSD__)
X #include <error.h>
X #endif
X #endif
X@@ -97,7 +97,7 @@
X #ifdef MACOSX
X #define IAX_SOCKOPTS MSG_DONTWAIT
X #else
X-#if defined(SOLARIS) || defined(__OpenBSD__)
X+#if defined(SOLARIS) || defined(__OpenBSD__) || defined(__FreeBSD__)
X #define IAX_SOCKOPTS MSG_DONTWAIT
X #else  /* Linux and others */
X #define IAX_SOCKOPTS MSG_DONTWAIT | MSG_NOSIGNAL
X--- lib/spandsp/src/spandsp/t4.h.orig	Mon Jun 12 15:54:34 2006
X+++ lib/spandsp/src/spandsp/t4.h	Thu Jun 15 14:17:20 2006
X@@ -28,6 +28,8 @@
X 
X /*! \file */
X 
X+#include <time.h>
X+
X #if !defined(_T4_H_)
X #define _T4_H_
X 
END-of-iaxmodem/files/patch-aa
echo x - iaxmodem/files/pkg-message.in
sed 's/^X//' >iaxmodem/files/pkg-message.in << 'END-of-iaxmodem/files/pkg-message.in'
XTo use iaxmodem with Hylafax:
X
X- Install and configure Hylafax
X
X- Take a look to %%EXAMPLESDIR%%/config.ttyIAX to configure the "virtual" modem
X
X- For accepting incoming FAX/data calls, modify /etc/ttys as below
X	and send SIGHUP to init process:
X
X>ttyIAX  "%%PREFIX%%/sbin/faxgetty"  dialup  on secure
X
XAdditional Documentation:
X%%DOCSDIR%%
X%%EXAMPLESDIR%%
Xhttp://www.voip-info.org/wiki/view/Asterisk+IAXmodem
END-of-iaxmodem/files/pkg-message.in
echo x - iaxmodem/files/iaxmodem.sh.in
sed 's/^X//' >iaxmodem/files/iaxmodem.sh.in << 'END-of-iaxmodem/files/iaxmodem.sh.in'
X#!/bin/sh
X
X# PROVIDE: iaxmodem
X# REQUIRE: DAEMON
X# KEYWORD: shutdown
X
X#
X# Add the following lines to /etc/rc.conf to enable iaxmodem:
X#
X# iaxmodem_enable="YES"
X#
X
X. %%RC_SUBR%%
X
Xname=iaxmodem
Xrcvar=`set_rcvar`
X
Xcommand=%%PREFIX%%/sbin/iaxmodem
X
Xpidfile=${iaxmodem_pidfile:-"/var/run/iaxmodem.pid"}
X
Xiaxmodem_enable=${iaxmodem_enable:-"NO"}
X
Xload_rc_config $name
Xrun_rc_command "$1"
END-of-iaxmodem/files/iaxmodem.sh.in
exit
--- iaxmodem.shar ends here ---


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060621080654.3050.qmail>