summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Bilyk <jbilyk@gmail.com>2011-02-09 19:19:57 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2011-02-09 19:40:00 -0600
commit5017a62317c4020cb555c31bf3f4e53b385b8041 (patch)
tree29dae7e3aa161c98c13c8c980760e2da93ac082f
parentbc34c3bcea955c6af483012cd4d691a1b13fc62e (diff)
downloadaports-5017a62317c4020cb555c31bf3f4e53b385b8041.tar.bz2
aports-5017a62317c4020cb555c31bf3f4e53b385b8041.tar.xz
testing/rtpproxy: add init script and conf.d along with rtproxy user creation
Adds an init script and conf.d file that were borrowed from Gentoos. Also create rtpproxy user and group
-rw-r--r--testing/rtpproxy/APKBUILD14
-rw-r--r--testing/rtpproxy/rtpproxy.confd8
-rw-r--r--testing/rtpproxy/rtpproxy.initd25
-rw-r--r--testing/rtpproxy/rtpproxy.pre-install5
4 files changed, 48 insertions, 4 deletions
diff --git a/testing/rtpproxy/APKBUILD b/testing/rtpproxy/APKBUILD
index 8ac37ca25..30629c0a5 100644
--- a/testing/rtpproxy/APKBUILD
+++ b/testing/rtpproxy/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=rtpproxy
pkgver=1.2.1
-pkgrel=0
+pkgrel=1
pkgdesc="RTP proxy"
url="http://www.rtpproxy.org"
arch="all"
@@ -10,9 +10,11 @@ license="BSD"
depends=
depends_dev=
makedepends="$depends_dev"
-install=""
+install="$pkgname.pre-install"
subpackages="$pkgname-doc"
-source="http://b2bua.org/chrome/site/$pkgname-$pkgver.tar.gz"
+source="http://b2bua.org/chrome/site/$pkgname-$pkgver.tar.gz
+ rtpproxy.confd
+ rtpproxy.initd"
_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
@@ -37,6 +39,10 @@ build() {
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
}
-md5sums="b0b5d6cdce3f17cdbbac473c11a2d0e5 rtpproxy-1.2.1.tar.gz"
+md5sums="b0b5d6cdce3f17cdbbac473c11a2d0e5 rtpproxy-1.2.1.tar.gz
+aee99ab9f380cd0b43754ae658f26c92 rtpproxy.confd
+b0f8894794b3f24af21ed050477851b1 rtpproxy.initd"
diff --git a/testing/rtpproxy/rtpproxy.confd b/testing/rtpproxy/rtpproxy.confd
new file mode 100644
index 000000000..cb53e6d7c
--- /dev/null
+++ b/testing/rtpproxy/rtpproxy.confd
@@ -0,0 +1,8 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+# Additional options to start rtpproxy with
+#
+# see "rtpproxy -h" for a list of options
+RTPPROXY_OPTS=""
diff --git a/testing/rtpproxy/rtpproxy.initd b/testing/rtpproxy/rtpproxy.initd
new file mode 100644
index 000000000..5e53e51e8
--- /dev/null
+++ b/testing/rtpproxy/rtpproxy.initd
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header$
+
+PIDFILE=/var/run/rtpproxy.pid
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting rtpproxy"
+ start-stop-daemon --start --quiet --pidfile "${PIDFILE}" \
+ --exec /usr/bin/rtpproxy \
+ -- -urtpproxy:rtpproxy -p"${PIDFILE}" ${RTPPROXY_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping rtpproxy"
+ start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
+ eend $?
+}
+
diff --git a/testing/rtpproxy/rtpproxy.pre-install b/testing/rtpproxy/rtpproxy.pre-install
new file mode 100644
index 000000000..498bedbd0
--- /dev/null
+++ b/testing/rtpproxy/rtpproxy.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+addgroup -S rtpproxy 2>/dev/null
+adduser -S -G rtpproxy -H -h /usr/share/rtpproxy -s /bin/false rtpproxy 2>/dev/null
+exit 0