aboutsummaryrefslogtreecommitdiffstats
path: root/main/iaxmodem
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2013-05-16 06:45:35 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-05-16 08:13:19 +0000
commit6539f7f03e81cd710b37aa1a8ebd65ba19908fb1 (patch)
tree5ac595f513eb498d8e8a208576dd45bd66250283 /main/iaxmodem
parenta5bf64c2f98a19565d2ba22d65079b56489a5f9f (diff)
downloadaports-6539f7f03e81cd710b37aa1a8ebd65ba19908fb1.tar.bz2
aports-6539f7f03e81cd710b37aa1a8ebd65ba19908fb1.tar.xz
main/iaxmodem: Adding init.d and conf.d scripts
Diffstat (limited to 'main/iaxmodem')
-rw-r--r--main/iaxmodem/APKBUILD50
-rw-r--r--main/iaxmodem/iaxmodem.confd2
-rw-r--r--main/iaxmodem/iaxmodem.initd13
-rw-r--r--main/iaxmodem/nocxx.patch15
4 files changed, 45 insertions, 35 deletions
diff --git a/main/iaxmodem/APKBUILD b/main/iaxmodem/APKBUILD
index 650004c412..dc6184a9ae 100644
--- a/main/iaxmodem/APKBUILD
+++ b/main/iaxmodem/APKBUILD
@@ -1,38 +1,56 @@
# Contributor: Cameron Banta <cbanta@gmail.com>
+# Contributor: Mika Havela <mika.havela@gmail.com>
# Maintainer: Cameron Banta <cbanta@gmail.com>
pkgname=iaxmodem
pkgver=1.2.0
-pkgrel=4
+pkgrel=5
pkgdesc="Softmodem for hylafax that connects to VOIP gateway with IAX"
url="http://iaxmodem.sourceforge.net/"
arch="all"
license="GPL"
-depends=
-makedepends="tiff-dev"
-install=
+depends=""
+depends_dev=""
+makedepends="$depends_dev tiff-dev"
+install=""
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
- nocxx.patch"
+ $pkgname.confd
+ $pkgname.initd"
-build() {
- cd "$srcdir/$pkgname-$pkgver"
-
- # purge usless C++ check
- patch lib/libiax2/configure < ../nocxx.patch || return 1
+_builddir=$srcdir/$pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+build() {
+ cd "$_builddir"
./configure
make || return 1
+
+}
+
+package() {
+ cd "$_builddir"
install -m755 -s -D "$srcdir/$pkgname-$pkgver/iaxmodem" \
"$pkgdir/usr/sbin/iaxmodem"
mkdir -p "$pkgdir/etc/iaxmodem"
mkdir -p "$pkgdir/var/log/iaxmodem"
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+
#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
@@ -51,5 +69,13 @@ build() {
}
+
md5sums="f8b26cfeed188e5c1dcbc5ae5ef923b3 iaxmodem-1.2.0.tar.gz
-28513788ba4d556ccd538867dc6205ab nocxx.patch"
+d00821bb80d8cba07d0a9b89b2423ce1 iaxmodem.confd
+ca3f236df5776b4de05eeac2450754f1 iaxmodem.initd"
+sha256sums="fa263c0df0870cb8133c4bee141146ca5db47ece6db50899a6acf508d76591ed iaxmodem-1.2.0.tar.gz
+80ddf9a1607f45cc93c309d0174d8a2ddc9514ca328c5551ac33f109d24decbf iaxmodem.confd
+df530bcc7105d80b7503c19419f3a37e787b15b2f8720be64f6c37f66ea7a0b3 iaxmodem.initd"
+sha512sums="53b66a0977366541ffaa743fcbefa11c20eb9ea7182245a1d11bc7fd015d98a4ec8086b3cb85b8de84f63d67221bccb1a868fe9f0a603de600023ea158909707 iaxmodem-1.2.0.tar.gz
+c5b01eecd8048a99777c0265bc31cd8dcafa7ab2b30798500ec52e759f4ad97ffc13e8e72ad3018e9cd77b2acefdbbe7125b0b0d7f7cefd4ab6d764c690c89a1 iaxmodem.confd
+f3443bd53fdb8b394a58cf84ebd3cf808d46f02337942e9bdd1c73b1af668c9ebccc1325d27ae098c161ae0bab8860c709d87e11ac834d8079650dfb53bb1a36 iaxmodem.initd"
diff --git a/main/iaxmodem/iaxmodem.confd b/main/iaxmodem/iaxmodem.confd
index 082a920e0b..ac1421aff4 100644
--- a/main/iaxmodem/iaxmodem.confd
+++ b/main/iaxmodem/iaxmodem.confd
@@ -5,3 +5,5 @@
#
#IAXMODEM_NICE="-5"
+# Append various options to iaxmodem daemon.
+#IAXMODEM_OPTS=""
diff --git a/main/iaxmodem/iaxmodem.initd b/main/iaxmodem/iaxmodem.initd
index 7f072e6c26..44551aa98f 100644
--- a/main/iaxmodem/iaxmodem.initd
+++ b/main/iaxmodem/iaxmodem.initd
@@ -3,11 +3,8 @@
# 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"
+pidfile="/var/run/${SVCNAME}.pid"
name="iaxmodem"
depend() {
@@ -17,15 +14,15 @@ depend() {
}
start() {
- ebegin "Starting ${description}"
+ ebegin "Starting ${SVCNAME}"
start-stop-daemon --start --quiet --pidfile "${pidfile}" \
- --env TMPDIR="/tmp" --nice ${IAXMODEM_NICE:-0} --exec "${command}"
+ --env TMPDIR="/tmp" --nice ${IAXMODEM_NICE:-0} --exec "${command}" -- ${IAXMODEM_OPTS}
eend ${?}
}
stop() {
local childs=""
- ebegin "Stopping ${description}"
+ ebegin "Stopping ${SVCNAME}"
# 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}"))
@@ -38,7 +35,7 @@ stop() {
}
reload() {
- ebegin "Reloading ${description} configuration"
+ ebegin "Reloading ${SVCNAME} configuration"
start-stop-daemon --stop --signal HUP --pidfile "${pidfile}"
eend ${?}
}
diff --git a/main/iaxmodem/nocxx.patch b/main/iaxmodem/nocxx.patch
deleted file mode 100644
index beb1ab9006..0000000000
--- a/main/iaxmodem/nocxx.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- 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