diff options
Diffstat (limited to 'net/callweaver/files')
-rw-r--r-- | net/callweaver/files/callweaver.in | 33 | ||||
-rw-r--r-- | net/callweaver/files/patch-configs_makefile | 14 | ||||
-rw-r--r-- | net/callweaver/files/patch-cw.diff | 65 |
3 files changed, 112 insertions, 0 deletions
diff --git a/net/callweaver/files/callweaver.in b/net/callweaver/files/callweaver.in new file mode 100644 index 000000000000..18e0fea50ccb --- /dev/null +++ b/net/callweaver/files/callweaver.in @@ -0,0 +1,33 @@ +#!/bin/sh + +# PROVIDE: callweaver +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to enable callweaver: +# +# callweaver_enable="YES" +# + +. . %%RC_SUBR%% + +stop_precmd=callweaver_shutdown +sig_stop=KILL + +name=callweaver +rcvar=`set_rcvar` + +command=%%PREFIX%%/sbin/${name} +pidfile=${callweaver_pidfile:-"/var/run/${name}.pid"} + +load_rc_config $name + +callweaver_enable=${callweaver_enable:-"NO"} + +callweaver_shutdown () { + %%PREFIX%%/sbin/${name} -qrx 'stop now' + sleep 1 + return 0 +} + +run_rc_command "$1" diff --git a/net/callweaver/files/patch-configs_makefile b/net/callweaver/files/patch-configs_makefile new file mode 100644 index 000000000000..d9cc00870a92 --- /dev/null +++ b/net/callweaver/files/patch-configs_makefile @@ -0,0 +1,14 @@ +--- configs/Makefile.in.orig 2009-09-10 01:59:38.000000000 +0400 ++++ configs/Makefile.in 2009-09-10 02:00:08.000000000 +0400 +@@ -524,9 +524,11 @@ + if test ! -f $(DESTDIR)${cwconfdir}/$${configfile}; \ + then \ + $(INSTALL) -m 0640 $${samplefile} $(DESTDIR)${cwconfdir}/$${configfile}; \ ++ $(INSTALL) -m 0640 $${samplefile} $(DESTDIR)${cwconfdir}/$${samplefile}; \ + if test -z "$(DESTDIR)"; \ + then \ + chown ${cwrunuser}:${cwrungroup} $(DESTDIR)${cwconfdir}/$${configfile}; \ ++ chown ${cwrunuser}:${cwrungroup} $(DESTDIR)${cwconfdir}/$${samplefile}; \ + fi; \ + fi; \ + done diff --git a/net/callweaver/files/patch-cw.diff b/net/callweaver/files/patch-cw.diff new file mode 100644 index 000000000000..890c669f6d66 --- /dev/null +++ b/net/callweaver/files/patch-cw.diff @@ -0,0 +1,65 @@ +--- channels/fax/faxmodem.h.orig 2009-06-27 22:21:25.000000000 +0400 ++++ channels/fax/faxmodem.h 2009-06-27 22:21:29.000000000 +0400 +@@ -20,11 +20,9 @@ + + #include <stdio.h> + #include <string.h> +-#include <pty.h> + #include <unistd.h> + #include <fcntl.h> + #include <errno.h> +-#include <byteswap.h> + #include <sys/time.h> + #include <sys/signal.h> + #include <sys/types.h> +--- layout.freebsd.orig 2008-11-18 16:45:51.000000000 +0300 ++++ layout.freebsd 2009-06-28 13:15:22.000000000 +0400 +@@ -1,14 +1,14 @@ + # FreeBSD directory layout + helpstring="follow the FreeBSD ports system convention" + cwprefix=/usr/local +-cwexecdir=${prefix}/libexec +-cwutilsdir=${prefix}/sbin ++cwexecdir=${prefix}/sbin ++cwutilsdir=${prefix}/bin + cwconfdir=${prefix}/etc/callweaver + cwlibdir=${prefix}/lib/callweaver +-cwvardir=${prefix}/var/lib/callweaver ++cwvardir=/var/lib/callweaver + cwdatadir=${prefix}/share/callweaver +-cwlogdir=${prefix}/var/log +-cwrundir=${prefix}/var/run +-cwspooldir=${prefix}/var/spool/callweaver ++cwlogdir=/var/log/callweaver ++cwrundir=/var/run ++cwspooldir=/var/spool/callweaver + cwmandir=${prefix}/man + cwdocdir=${prefix}/share/doc/callweaver +--- channels/fax/faxmodem.c.orig 2009-06-28 02:31:01.000000000 +0400 ++++ channels/fax/faxmodem.c 2009-06-28 02:31:17.000000000 +0400 +@@ -125,13 +125,11 @@ + fm->master = -1; + fm->slave = -1; + +- if (openpty(&fm->master, &fm->slave, NULL, NULL, NULL)) { ++ if (openpty(&fm->master, &fm->slave, buf, NULL, NULL)) { + do_log(LOGGER.err, "Fatal error: failed to initialize pty\n"); + return -1; + } + +- ptsname_r(fm->master, buf, sizeof(buf)); +- + do_log(LOGGER.info, "Opened pty, slave device: %s\n", buf); + + snprintf(fm->devlink, sizeof(fm->devlink), "%s%d", device_prefix, NEXT_ID++); +--- corelib/utils.c.orig 2009-06-28 11:32:54.000000000 +0400 ++++ corelib/utils.c 2008-11-18 16:45:43.000000000 +0300 +@@ -61,7 +61,7 @@ + static char base64[64]; + static char b2a[256]; + +-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__) || defined(__CYGWIN__) ++#if defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__) || defined(__CYGWIN__) + + /* duh? ERANGE value copied from web... */ + #define ERANGE 34 |