diff options
| author | Michael Mason <ms13sp@gmail.com> | 2009-05-28 13:32:41 +0000 |
|---|---|---|
| committer | Michael Mason <ms13sp@gmail.com> | 2009-05-28 13:32:41 +0000 |
| commit | 1e2f0b801eee6597e0ab8ffeecb740ef01abb45d (patch) | |
| tree | a4dcd60d3c11ddc72c25ef269df6c1a18ee04951 /testing/opensips | |
| parent | 6a4d7e81f3565b5c531abedf0b81d988391f5e92 (diff) | |
| parent | ed1b3209b6c34161e0f7ca150d99655da23214c0 (diff) | |
| download | aports-1e2f0b801eee6597e0ab8ffeecb740ef01abb45d.tar.bz2 aports-1e2f0b801eee6597e0ab8ffeecb740ef01abb45d.tar.xz | |
Merge branch 'master' of git://git.alpinelinux.org/aports
Diffstat (limited to 'testing/opensips')
| -rw-r--r-- | testing/opensips/APKBUILD | 31 | ||||
| -rw-r--r-- | testing/opensips/opensips.initd | 25 | ||||
| -rw-r--r-- | testing/opensips/opensips.post-install | 5 | ||||
| -rw-r--r-- | testing/opensips/opensips.pre-install | 5 |
4 files changed, 57 insertions, 9 deletions
diff --git a/testing/opensips/APKBUILD b/testing/opensips/APKBUILD index bf8db6383d..ab98d4ba6e 100644 --- a/testing/opensips/APKBUILD +++ b/testing/opensips/APKBUILD @@ -1,24 +1,37 @@ # Contributor: Michael Mason <ms13sp@gmail.com> -# Maintainer: +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=opensips pkgver=1.5.0 -pkgrel=0 +pkgrel=3 pkgdesc="Flexible and customizable sip routing engine" url="http://www.opensips.org/" license="GPL" depends="uclibc expat" makedepends="bison flex expat-dev coreutils" -install= -subpackages="" -source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver-notls_src.tar.gz" +install="$pkgname.pre-install $pkgname.post-install" +subpackages="$pkgname-doc" +source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver-notls_src.tar.gz + $install + $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 - make || return 1 - make all || return 1 - make DESTDIR="$pkgdir" install + 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 + 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="ba99592a6e42e8b4dc2d38964420dfec opensips-1.5.0-notls_src.tar.gz" +md5sums="ba99592a6e42e8b4dc2d38964420dfec opensips-1.5.0-notls_src.tar.gz +3a8a5d3c4c23ce9f2fc60b449ad61820 opensips.pre-install +d9b551148d2b60466c05b4295b935091 opensips.post-install +6606574b4872cbc5114e490f962ca096 opensips.initd" diff --git a/testing/opensips/opensips.initd b/testing/opensips/opensips.initd new file mode 100644 index 0000000000..5805908f05 --- /dev/null +++ b/testing/opensips/opensips.initd @@ -0,0 +1,25 @@ +#!/sbin/runscript + +daemon=/usr/sbin/opensips +pidfile=/var/run/opensips/opensips.pid + +depend() { + need net +} + +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/testing/opensips/opensips.post-install b/testing/opensips/opensips.post-install new file mode 100644 index 0000000000..eb9d86d98b --- /dev/null +++ b/testing/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/testing/opensips/opensips.pre-install b/testing/opensips/opensips.pre-install new file mode 100644 index 0000000000..4b9ccd418d --- /dev/null +++ b/testing/opensips/opensips.pre-install @@ -0,0 +1,5 @@ +#!/bin/sh + +adduser -H -h /var/empty -s /bin/false -D opensips 2>/dev/null + +exit 0 |
