aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mediaproxy
diff options
context:
space:
mode:
authorFrancesco Colista <francesco.colista@gmail.com>2009-11-23 08:21:31 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-11-23 16:08:32 +0000
commit039a075196873c9e6aa4c7ae28542ce2337899df (patch)
tree5034709f75c8008fc93cd30c7bce6aab9cef4a63 /testing/mediaproxy
parent747f84f6f9438cc43759309e57fda94e99f0b670 (diff)
downloadaports-039a075196873c9e6aa4c7ae28542ce2337899df.tar.bz2
aports-039a075196873c9e6aa4c7ae28542ce2337899df.tar.xz
testing/mediaproxy: Init files, default config and more makedependencies
Diffstat (limited to 'testing/mediaproxy')
-rw-r--r--testing/mediaproxy/APKBUILD28
-rw-r--r--testing/mediaproxy/config.ini19
-rw-r--r--testing/mediaproxy/mediaproxy-dispatcher.initd26
-rw-r--r--testing/mediaproxy/mediaproxy-relay.initd23
4 files changed, 90 insertions, 6 deletions
diff --git a/testing/mediaproxy/APKBUILD b/testing/mediaproxy/APKBUILD
index 594c4e625a..6ddd882d21 100644
--- a/testing/mediaproxy/APKBUILD
+++ b/testing/mediaproxy/APKBUILD
@@ -2,24 +2,40 @@
# Maintainer:
pkgname=mediaproxy
pkgver=2.3.8
-pkgrel=0
+pkgrel=1
pkgdesc="MediaProxy"
-url="www.ag-projects.com/MediaProxy/"
+url="http://www.ag-projects.com/MediaProxy/"
license="GPL"
depends="python"
makedepends="libnetfilter_conntrack-dev libnfnetlink-dev python26-buildutils
- python26-setuptools python-dev"
+ python26-setuptools python-application python-cjson python-gnutls python-dev twisted"
install=
subpackages=""
#subpackages="$pkgname-dev $pkgname-doc"
-source="http://download.ag-projects.com/MediaProxy/$pkgname-$pkgver.tar.gz"
+source="http://download.ag-projects.com/MediaProxy/$pkgname-$pkgver.tar.gz
+ mediaproxy-dispatcher.initd
+ mediaproxy-relay.initd
+ config.ini
+"
build() {
cd "$srcdir"/$pkgname-$pkgver
-
mkdir -p "$pkgdir"/usr/lib/python2.6/site-packages
+
python setup.py install --root="$pkgdir"
+
echo "/usr/lib/python2.6/site-packages/$_pkgname-$pkgver-py2.6.egg" > "$pkgdir"/usr/lib/python2.6/site-packages/$_pkgname.pth
+
+ sed -i -e 's:net.ipv4.ip_forward = 0:net.ipv4.ip_forward = 1:' /etc/sysctl.conf
+
+ install -D -m755 "$srcdir"/$pkgname-dispatcher.initd "$pkgdir"/etc/init.d/$pkgname-dispatcher
+ install -D -m755 "$srcdir"/$pkgname-relay.initd "$pkgdir"/etc/init.d/$pkgname-relay
+ install -D -m755 "$srcdir"/config.ini "$pkgdir"/etc/mediaproxy/config.ini
+ install -d -o kamailio "$pkgdir"/etc/mediaproxy/tls/
+ install -d -o kamailio "$pkgdir"/var/run/$pkgname
}
-md5sums="8914a2b69415946e5ffdb843823b3ef1 mediaproxy-2.3.8.tar.gz"
+md5sums="8914a2b69415946e5ffdb843823b3ef1 mediaproxy-2.3.8.tar.gz
+7fa7907b87777281c31e5ff49d8d5011 mediaproxy-dispatcher.initd
+842beb8bca2dbbf16a092fbc27ee4ac2 mediaproxy-relay.initd
+2e58c2bc3e5984f74f01e3c701fa3467 config.ini"
diff --git a/testing/mediaproxy/config.ini b/testing/mediaproxy/config.ini
new file mode 100644
index 0000000000..995c006d2b
--- /dev/null
+++ b/testing/mediaproxy/config.ini
@@ -0,0 +1,19 @@
+[Dispatcher]
+socket = /var/run/mediaproxy/proxydispatcher.sock
+defaultproxy = /var/run/mediaproxy/mediaproxy.sock
+
+[MediaProxy]
+start = yes
+socket = /var/run/mediaproxy/mediaproxy.sock
+group = kamailio
+listen = 0.0.0.0
+allow = None
+proxyIP = # This is where your Kamailio is installed
+portRange = 9000:9049 # These values are set same in ATA's configs for RTP Port Range
+idleTimeout = 60
+holdTimeout = 180
+forceClose = 0
+
+[Accounting]
+accounting = off
+
diff --git a/testing/mediaproxy/mediaproxy-dispatcher.initd b/testing/mediaproxy/mediaproxy-dispatcher.initd
new file mode 100644
index 0000000000..77364104c0
--- /dev/null
+++ b/testing/mediaproxy/mediaproxy-dispatcher.initd
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+
+daemon=/usr/bin/media-dispatcher
+pidfile=/var/run/mediaproxy/mediaproxy-dispatcher.pid
+
+depend() {
+ need net
+ after firewall
+ after kamailio
+}
+
+start() {
+ ebegin "Starting Mediaproxy Dispatcher"
+ start-stop-daemon --start --quiet --pidfile $pidfile --exec $daemon \
+ -- \
+ -u kamailio \
+ -g kamailio \
+ -P $pidfile \
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Mediaproxy Dispatcher"
+ start-stop-daemon --stop --quiet --pidfile $pidfile
+ eend $?
+}
diff --git a/testing/mediaproxy/mediaproxy-relay.initd b/testing/mediaproxy/mediaproxy-relay.initd
new file mode 100644
index 0000000000..73dc32aa25
--- /dev/null
+++ b/testing/mediaproxy/mediaproxy-relay.initd
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+
+daemon=/usr/bin/media-relay
+pidfile=/var/run/mediaproxy/mediaproxy-relay.pid
+
+depend() {
+ need net
+ after firewall
+ after mediaproxy-dispatcher
+}
+
+start() {
+ ebegin "Starting Mediaproxy Relay"
+ start-stop-daemon --start --quiet --pidfile $pidfile --exec $daemon \
+ -P $pidfile \
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Mediaproxy Relay"
+ start-stop-daemon --stop --quiet --pidfile $pidfile
+ eend $?
+}