summaryrefslogtreecommitdiff
path: root/main/iaxmodem
diff options
context:
space:
mode:
Diffstat (limited to 'main/iaxmodem')
-rw-r--r--main/iaxmodem/APKBUILD54
-rw-r--r--main/iaxmodem/iaxmodem.confd7
-rw-r--r--main/iaxmodem/iaxmodem.initd43
-rw-r--r--main/iaxmodem/nocxx.patch15
4 files changed, 119 insertions, 0 deletions
diff --git a/main/iaxmodem/APKBUILD b/main/iaxmodem/APKBUILD
new file mode 100644
index 00000000000..f1f2b21c3a2
--- /dev/null
+++ b/main/iaxmodem/APKBUILD
@@ -0,0 +1,54 @@
+# Contributor: Cameron Banta <cbanta@gmail.com>
+# Maintainer: Cameron Banta <cbanta@gmail.com>
+pkgname=iaxmodem
+pkgver=1.2.0
+pkgrel=1
+pkgdesc="Softmodem for hylafax that connects to VOIP gateway with IAX"
+url="http://iaxmodem.sourceforge.net/"
+license="GPL"
+depends="uclibc tiff"
+makedepends="tiff-dev"
+install=
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
+ nocxx.patch"
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # purge usless C++ check
+ patch lib/libiax2/configure < ../nocxx.patch || return 1
+
+ ./configure
+ make || return 1
+ install -m755 -s -D "$srcdir/$pkgname-$pkgver/iaxmodem" \
+ "$pkgdir/usr/sbin/iaxmodem"
+ mkdir -p "$pkgdir/etc/iaxmodem"
+ mkdir -p "$pkgdir/var/log/iaxmodem"
+
+ #library licenses
+ install -m644 -D "$srcdir/$pkgname-$pkgver/lib/libiax2/COPYING" \
+ "$pkgdir"/usr/share/licenses/$pkgname/libiax2.COPYING
+ install -m644 -D "$srcdir/$pkgname-$pkgver/lib/libiax2/COPYING.LIB" \
+ "$pkgdir"/usr/share/licenses/$pkgname/libiax2.COPYING.LIB
+
+ install -m644 -D "$srcdir/$pkgname-$pkgver/lib/spandsp/COPYING" \
+ "$pkgdir"/usr/share/licenses/$pkgname/libspandsp.COPYING
+
+ #docs
+ install -m644 -D "$srcdir/$pkgname-$pkgver/README" \
+ "$pkgdir/usr/share/doc/$pkgname/README"
+ install -m644 -D "$srcdir/$pkgname-$pkgver/FAQ" \
+ "$pkgdir/usr/share/doc/$pkgname/FAQ"
+
+ install -m644 -D "$srcdir/$pkgname-$pkgver/iaxmodem-cfg.ttyIAX" \
+ "$pkgdir/usr/share/doc/$pkgname/iaxmodem-cfg.ttyIAX"
+ install -m644 -D "$srcdir/$pkgname-$pkgver/iaxmodem.init.debian" \
+ "$pkgdir/usr/share/doc/$pkgname/iaxmodem.init.debian"
+ install -m644 -D "$srcdir/$pkgname-$pkgver/config.ttyIAX" \
+ "$pkgdir/usr/share/doc/$pkgname/config.ttyIAX"
+
+}
+
+md5sums="f8b26cfeed188e5c1dcbc5ae5ef923b3 iaxmodem-1.2.0.tar.gz
+28513788ba4d556ccd538867dc6205ab nocxx.patch"
diff --git a/main/iaxmodem/iaxmodem.confd b/main/iaxmodem/iaxmodem.confd
new file mode 100644
index 00000000000..082a920e0b1
--- /dev/null
+++ b/main/iaxmodem/iaxmodem.confd
@@ -0,0 +1,7 @@
+# Configfile for /etc/init.d/iaxmodem
+
+# Set the priority of the iaxmodem process
+# Value: (highest) -20..19 (lowest)
+#
+#IAXMODEM_NICE="-5"
+
diff --git a/main/iaxmodem/iaxmodem.initd b/main/iaxmodem/iaxmodem.initd
new file mode 100644
index 00000000000..d6f2c947ac8
--- /dev/null
+++ b/main/iaxmodem/iaxmodem.initd
@@ -0,0 +1,43 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/net-misc/iaxmodem/files/iaxmodem.initd,v 1.1 2008/10/14 23:53:39 sbriesen Exp $
+
+description="IAXmodem"
+description_reload="Reread configuration file and make the appropriate changes"
+extra_started_commands="reload"
+command="/usr/sbin/iaxmodem"
+pidfile="/var/run/iaxmodem.pid"
+name="iaxmodem"
+
+depend() {
+ use asterisk
+ need net
+}
+
+start() {
+ ebegin "Starting ${description}"
+ start-stop-daemon --start --quiet --pidfile "${pidfile}" \
+ --env TMPDIR="/tmp" --nice ${IAXMODEM_NICE:-0} --exec "${command}"
+ eend ${?}
+}
+
+stop() {
+ local childs=""
+ ebegin "Stopping ${description}"
+ # start-stop-daemon doesn't kill childs reliable, so we
+ # use a combination of pgrep + start-stop-daemon + kill
+ [ -s "${pidfile}" ] && childs=$(pgrep -P $(cat "${pidfile}"))
+ start-stop-daemon --stop --quiet --pidfile "${pidfile}" --retry TERM/10/KILL/5
+ if eend ${?}; then
+ # if there're still childs running, kill them!
+ [ -n "${childs}" ] && kill -KILL ${childs} 2>/dev/null
+ return 0
+ fi
+}
+
+reload() {
+ ebegin "Reloading ${description} configuration"
+ start-stop-daemon --stop --signal HUP --pidfile "${pidfile}"
+ eend ${?}
+}
diff --git a/main/iaxmodem/nocxx.patch b/main/iaxmodem/nocxx.patch
new file mode 100644
index 00000000000..beb1ab9006b
--- /dev/null
+++ b/main/iaxmodem/nocxx.patch
@@ -0,0 +1,15 @@
+--- a/configure 2004-12-07 21:34:23.205172545 +0000
++++ b/configure 2004-12-07 21:37:17.726654782 +0000
+@@ -5148,10 +5148,8 @@
+ :
+ else
+ { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+-See \`config.log' for more details." >&5
+-echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+-See \`config.log' for more details." >&2;}
+- { (exit 1); exit 1; }; }
++See \`config.log' for more details." >&5;}
++ { echo "C++ sucks, ignoring ..." >&5; }; }
+ fi
+
+ ac_ext=cc