diff options
author | pav <pav@FreeBSD.org> | 2006-06-23 20:56:40 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2006-06-23 20:56:40 +0800 |
commit | e4ff9a7c5dae25e0d58dbe0f2e48d84303839b1a (patch) | |
tree | 83f4058b10e8646fa3646c1e711803d7e164ebd3 /net | |
parent | fc2f45a33ede7622dafd22561cccfd46dfb09072 (diff) | |
download | freebsd-ports-graphics-e4ff9a7c5dae25e0d58dbe0f2e48d84303839b1a.tar.gz freebsd-ports-graphics-e4ff9a7c5dae25e0d58dbe0f2e48d84303839b1a.tar.zst freebsd-ports-graphics-e4ff9a7c5dae25e0d58dbe0f2e48d84303839b1a.zip |
IAXmodem is a software modem written in C that uses
an IAX channel (commonly provided by an Asterisk PBX
system) instead of a traditional phone line and uses
a DSP library instead of DSP hardware chipsets.
WWW: http://sourceforge.net/projects/iaxmodem
PR: ports/99238
Submitted by: Filippo Natali <filippo.natali@gmail.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/Makefile | 1 | ||||
-rw-r--r-- | net/iaxmodem/Makefile | 52 | ||||
-rw-r--r-- | net/iaxmodem/distinfo | 3 | ||||
-rw-r--r-- | net/iaxmodem/files/iaxmodem.sh.in | 25 | ||||
-rw-r--r-- | net/iaxmodem/files/patch-aa | 72 | ||||
-rw-r--r-- | net/iaxmodem/files/pkg-message.in | 15 | ||||
-rw-r--r-- | net/iaxmodem/pkg-descr | 6 | ||||
-rw-r--r-- | net/iaxmodem/pkg-plist | 10 |
8 files changed, 184 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile index 52dec15f113..dfc0144ad3e 100644 --- a/net/Makefile +++ b/net/Makefile @@ -189,6 +189,7 @@ SUBDIR += htpdate SUBDIR += http_ping SUBDIR += httping + SUBDIR += iaxmodem SUBDIR += icmpinfo SUBDIR += icpld SUBDIR += ifdepd diff --git a/net/iaxmodem/Makefile b/net/iaxmodem/Makefile new file mode 100644 index 00000000000..8344270d0c1 --- /dev/null +++ b/net/iaxmodem/Makefile @@ -0,0 +1,52 @@ +# New ports collection makefile for: iaxmodem +# Date created: 15 Jun 2006 +# Whom: Filippo Natali <filippo.natali@gmail.com> +# +# $FreeBSD$ +# + +PORTNAME= iaxmodem +PORTVERSION= 0.1.9 +CATEGORIES= comms +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= ${PORTNAME} + +MAINTAINER= filippo.natali@gmail.com +COMMENT= Software modem that connects ta IAX channel + +LIB_DEPENDS= tiff.4:${PORTSDIR}/graphics/tiff + +MAN1= iaxmodem.1 +CFLAGS+= -I${LOCALBASE}/include +LDFLAGS= -L${LOCALBASE}/lib +MAKE_ENV= LDFLAGS="${LDFLAGS}" + +SUB_FILES= pkg-message +USE_RC_SUBR= iaxmodem.sh + +post-patch: + @${REINPLACE_CMD} -e "s|/usr/local/etc|${PREFIX}/etc|g" ${WRKSRC}/iaxmodem.1 + @${REINPLACE_CMD} -e "s|/etc/iaxmodem|${PREFIX}/etc/iaxmodem|g" ${WRKSRC}/iaxmodem.c + +do-build: + @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./build static + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/iaxmodem ${PREFIX}/sbin/ && \ + ${MKDIR} ${PREFIX}/etc/iaxmodem && \ + ${MKDIR} /var/log/iaxmodem && \ + ${MKDIR} ${EXAMPLESDIR} && \ + ${INSTALL_DATA} ${WRKSRC}/config.ttyIAX ${EXAMPLESDIR}/ && \ + ${INSTALL_DATA} ${WRKSRC}/iaxmodem-cfg.ttyIAX ${EXAMPLESDIR}/ + ${INSTALL_MAN} ${WRKSRC}/iaxmodem.1 ${MAN1PREFIX}/man/man1 +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} && \ + ${INSTALL_DATA} ${WRKSRC}/README ${WRKSRC}/TODO ${WRKSRC}/FAQ ${WRKSRC}/CHANGES ${DOCSDIR} +.endif + +post-install: +.if !defined(BATCH) + @${CAT} ${PKGMESSAGE} +.endif + +.include <bsd.port.mk> diff --git a/net/iaxmodem/distinfo b/net/iaxmodem/distinfo new file mode 100644 index 00000000000..dabc27a8459 --- /dev/null +++ b/net/iaxmodem/distinfo @@ -0,0 +1,3 @@ +MD5 (iaxmodem-0.1.9.tar.gz) = 621ea4c684d2b7ea14485e9493ecc703 +SHA256 (iaxmodem-0.1.9.tar.gz) = b692beeb075e1047300373d4b928a6c29cc3ec702d40046f9b7540455028cd87 +SIZE (iaxmodem-0.1.9.tar.gz) = 2006491 diff --git a/net/iaxmodem/files/iaxmodem.sh.in b/net/iaxmodem/files/iaxmodem.sh.in new file mode 100644 index 00000000000..c9ceba75397 --- /dev/null +++ b/net/iaxmodem/files/iaxmodem.sh.in @@ -0,0 +1,25 @@ +#!/bin/sh + +# PROVIDE: iaxmodem +# REQUIRE: DAEMON +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable iaxmodem: +# +# iaxmodem_enable="YES" +# + +. %%RC_SUBR%% + +name=iaxmodem +rcvar=`set_rcvar` + +command=%%PREFIX%%/sbin/iaxmodem + +pidfile=${iaxmodem_pidfile:-"/var/run/iaxmodem.pid"} + +iaxmodem_enable=${iaxmodem_enable:-"NO"} + +load_rc_config $name +run_rc_command "$1" diff --git a/net/iaxmodem/files/patch-aa b/net/iaxmodem/files/patch-aa new file mode 100644 index 00000000000..87bc13a48fd --- /dev/null +++ b/net/iaxmodem/files/patch-aa @@ -0,0 +1,72 @@ +--- build.orig Mon Jun 12 17:03:49 2006 ++++ build Thu Jun 15 14:24:34 2006 +@@ -16,14 +17,14 @@ + ./configure && \ + make && \ + cd ../spandsp && \ +- ./configure && \ ++ ./configure CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" && \ + make && \ + cd ../.. && \ +- gcc -Wall -O2 -g -DMODEMVER=\"$MODEMVER\" -DDSPVER=\"$DSPVER\" -DIAXVER=\"$IAXVER\" -DSTATICLIBS -D_GNU_SOURCE \ ++ gcc $CFLAGS $LDFLAGS -Wall -O2 -g -DMODEMVER=\"$MODEMVER\" -DDSPVER=\"$DSPVER\" -DIAXVER=\"$IAXVER\" -DSTATICLIBS -D_GNU_SOURCE \ + -std=c99 -Ilib/libiax2/src -Ilib/spandsp/src -c -o iaxmodem.o iaxmodem.c && \ +- gcc -lm -lutil -ltiff -o iaxmodem iaxmodem.o lib/spandsp/src/.libs/libspandsp.a lib/libiax2/src/.libs/libiax.a ++ gcc $CFLAGS $LDFLAGS -lm -lutil -ltiff -o iaxmodem iaxmodem.o lib/spandsp/src/.libs/libspandsp.a lib/libiax2/src/.libs/libiax.a + else +- gcc -Wall -O2 -g -DMODEMVER=\"$MODEMVER\" -DDSPVER=\"$DSPVER\" -DIAXVER=\"$IAXVER\" \ ++ gcc $CFLAGS $LDFLAGS -Wall -O2 -g -DMODEMVER=\"$MODEMVER\" -DDSPVER=\"$DSPVER\" -DIAXVER=\"$IAXVER\" \ + -lm -liax -lutil -lspandsp -ltiff -o iaxmodem iaxmodem.c + fi + if [ -n "`ls /etc/iaxmodem-cfg.* 2>/dev/null`" ]; then +--- iaxmodem.c.orig Mon Jun 12 15:54:33 2006 ++++ iaxmodem.c Thu Jun 15 14:26:12 2006 +@@ -17,11 +17,13 @@ + */ + #include <stdio.h> + #include <string.h> +-#ifndef __OpenBSD__ ++#if !defined(__OpenBSD__) && !defined(__FreeBSD__) + #include <pty.h> + #else + #include <termios.h> ++#if !defined(__FreeBSD__) + #include <util.h> ++#endif + #endif + #include <stdlib.h> + #include <unistd.h> +--- lib/libiax2/src/iax.c.orig Mon Jun 12 15:54:46 2006 ++++ lib/libiax2/src/iax.c Thu Jun 15 14:22:17 2006 +@@ -64,9 +64,9 @@ + #include <arpa/inet.h> + #include <time.h> + +-#if !defined(MACOSX) && !defined(__OpenBSD__) ++#if !defined(MACOSX) && !defined(__OpenBSD__) && !defined(__FreeBSD__) + #include <malloc.h> +-#if !defined(SOLARIS) ++#if !defined(SOLARIS) && !defined(__FreeBSD__) + #include <error.h> + #endif + #endif +@@ -97,7 +97,7 @@ + #ifdef MACOSX + #define IAX_SOCKOPTS MSG_DONTWAIT + #else +-#if defined(SOLARIS) || defined(__OpenBSD__) ++#if defined(SOLARIS) || defined(__OpenBSD__) || defined(__FreeBSD__) + #define IAX_SOCKOPTS MSG_DONTWAIT + #else /* Linux and others */ + #define IAX_SOCKOPTS MSG_DONTWAIT | MSG_NOSIGNAL +--- lib/spandsp/src/spandsp/t4.h.orig Mon Jun 12 15:54:34 2006 ++++ lib/spandsp/src/spandsp/t4.h Thu Jun 15 14:17:20 2006 +@@ -28,6 +28,8 @@ + + /*! \file */ + ++#include <time.h> ++ + #if !defined(_T4_H_) + #define _T4_H_ + diff --git a/net/iaxmodem/files/pkg-message.in b/net/iaxmodem/files/pkg-message.in new file mode 100644 index 00000000000..a1bdfb2802d --- /dev/null +++ b/net/iaxmodem/files/pkg-message.in @@ -0,0 +1,15 @@ +To use iaxmodem with Hylafax: + +- Install and configure Hylafax + +- Take a look to %%EXAMPLESDIR%%/config.ttyIAX to configure the "virtual" modem + +- For accepting incoming FAX/data calls, modify /etc/ttys as below + and send SIGHUP to init process: + +>ttyIAX "%%PREFIX%%/sbin/faxgetty" dialup on secure + +Additional Documentation: +%%DOCSDIR%% +%%EXAMPLESDIR%% +http://www.voip-info.org/wiki/view/Asterisk+IAXmodem diff --git a/net/iaxmodem/pkg-descr b/net/iaxmodem/pkg-descr new file mode 100644 index 00000000000..e13c336a5ed --- /dev/null +++ b/net/iaxmodem/pkg-descr @@ -0,0 +1,6 @@ +IAXmodem is a software modem written in C that uses +an IAX channel (commonly provided by an Asterisk PBX +system) instead of a traditional phone line and uses +a DSP library instead of DSP hardware chipsets. + +WWW: http://sourceforge.net/projects/iaxmodem diff --git a/net/iaxmodem/pkg-plist b/net/iaxmodem/pkg-plist new file mode 100644 index 00000000000..01a5ac91331 --- /dev/null +++ b/net/iaxmodem/pkg-plist @@ -0,0 +1,10 @@ +sbin/iaxmodem +%%EXAMPLESDIR%%/iaxmodem-cfg.ttyIAX +%%EXAMPLESDIR%%/config.ttyIAX +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/FAQ +%%PORTDOCS%%%%DOCSDIR%%/CHANGES +%%PORTDOCS%%%%DOCSDIR%%/TODO +@dirrm etc/iaxmodem +@dirrm %%EXAMPLESDIR%% +%%PORTDOCS%%@dirrm %%DOCSDIR%% |