aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/opensips
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-05-04 15:39:20 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2017-05-04 15:39:20 +0000
commit4cf3f5dd8a9c4c28f1d4cfcfc9d0fdc6e2e68fbc (patch)
treec54d73742b18d00115fd540d3b2fafb7f766de4e /unmaintained/opensips
parentd1adc7e878dfb93233c8115bc639ace3a961a9ed (diff)
downloadaports-4cf3f5dd8a9c4c28f1d4cfcfc9d0fdc6e2e68fbc.tar.bz2
aports-4cf3f5dd8a9c4c28f1d4cfcfc9d0fdc6e2e68fbc.tar.xz
unmaintained/opensips: move from testing
Diffstat (limited to 'unmaintained/opensips')
-rw-r--r--unmaintained/opensips/APKBUILD43
-rw-r--r--unmaintained/opensips/opensips.initd26
-rw-r--r--unmaintained/opensips/opensips.post-install5
-rw-r--r--unmaintained/opensips/opensips.pre-install6
4 files changed, 80 insertions, 0 deletions
diff --git a/unmaintained/opensips/APKBUILD b/unmaintained/opensips/APKBUILD
new file mode 100644
index 0000000000..0fbdda0f15
--- /dev/null
+++ b/unmaintained/opensips/APKBUILD
@@ -0,0 +1,43 @@
+# Contributor: Michael Mason <ms13sp@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=opensips
+pkgver=1.6.3
+pkgrel=3
+pkgdesc="Flexible and customizable sip routing engine"
+url="http://www.opensips.org/"
+arch="all"
+license="GPL"
+depends=
+makedepends="bison flex expat-dev coreutils linux-headers"
+install="$pkgname.pre-install $pkgname.post-install"
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver-notls_src.tar.gz
+ $pkgname.initd"
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver-notls"
+ sed -i -e 's:^cfg-target.*:cfg-target = $(cfg-dir):' \
+ -e 's:^cfg-prefix.*:cfg-prefix = $(basedir):' Makefile.defs
+
+ cd scripts
+ sed -i -e 's:/var/run/opensips.pid:/var/run/opensips/opensips.pid:g' \
+ opensipsctl.base opensipsctlrc osipsconsole osipsconsolerc
+ cd ..
+
+ make prefix=/usr || return 1
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver-notls"
+ make prefix=/usr basedir="$pkgdir" install
+ chmod 750 "$pkgdir"/etc/opensips/opensips.cfg
+ install -d "$pkgdir"/var/run/opensips
+ install -Dm755 ../$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+}
+
+md5sums="84e5d6da6476dcdb8bc0fd736507040a opensips-1.6.3-notls_src.tar.gz
+7fb51d35517f7f10cfe6e89139f7060a opensips.initd"
+sha256sums="e27d6c83473827aa1279691567dc872d9268a1ffa6e5c2efedb1fc47935e88c0 opensips-1.6.3-notls_src.tar.gz
+4d463b046cfd81818ade4cdf26825720101cc95dff9587061e3565c5d84e0475 opensips.initd"
+sha512sums="43bfebe4ffe596964471363b9f2584c7f4bec7163ba490e53b553172d08ca89054c446af57fd3ca12ec9457ba817f73c93ba8f25881f80dec6ae0a714515776f opensips-1.6.3-notls_src.tar.gz
+04c0354c6b1e3d30a6f0f97593687a56bfbdc762cb55a0b417cd3ce6eb871d0d4c5dd1a072f0a4e8beb120d6f8711929a392028ba83edca0a77ca5be537d2079 opensips.initd"
diff --git a/unmaintained/opensips/opensips.initd b/unmaintained/opensips/opensips.initd
new file mode 100644
index 0000000000..09c03fd5d1
--- /dev/null
+++ b/unmaintained/opensips/opensips.initd
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+
+daemon=/usr/sbin/opensips
+pidfile=/var/run/opensips/opensips.pid
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting OpenSIPS"
+ start-stop-daemon --start --quiet --pidfile $pidfile --exec $daemon \
+ -- \
+ -u ${OPENSIPS_USER:-opensips} \
+ -g ${OPENSIPS_GROUP:-opensips} \
+ -P $pidfile
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping OpenSIPS"
+ start-stop-daemon --stop --quiet --pidfile $pidfile
+ eend $?
+}
+
diff --git a/unmaintained/opensips/opensips.post-install b/unmaintained/opensips/opensips.post-install
new file mode 100644
index 0000000000..eb9d86d98b
--- /dev/null
+++ b/unmaintained/opensips/opensips.post-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+chown -R opensips:opensips /var/run/opensips
+chgrp opensips /etc/opensips/opensips.cfg
+exit 0
diff --git a/unmaintained/opensips/opensips.pre-install b/unmaintained/opensips/opensips.pre-install
new file mode 100644
index 0000000000..1fcd8dc61c
--- /dev/null
+++ b/unmaintained/opensips/opensips.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+addgroup -S opensips 2>/dev/null
+adduser -S -D -H -h /var/empty -s /bin/false -G opensips -g opensips opensips 2>/dev/null
+
+exit 0