Commit 58183010 authored by Natanael Copa's avatar Natanael Copa
Browse files

testing/opensips: added init.d and pre/post install scripts

parent 09b207e0
# Contributor: Michael Mason <> # Contributor: Michael Mason <>
# Maintainer: # Maintainer: Natanael Copa <>
pkgname=opensips pkgname=opensips
pkgver=1.5.0 pkgver=1.5.0
pkgrel=1 pkgrel=2
pkgdesc="Flexible and customizable sip routing engine" pkgdesc="Flexible and customizable sip routing engine"
url="" url=""
license="GPL" license="GPL"
depends="uclibc expat" depends="uclibc expat"
makedepends="bison flex expat-dev coreutils" makedepends="bison flex expat-dev coreutils"
install= install="$pkgname.pre-install $"
subpackages="" subpackages="$pkgname-doc"
source="$pkgname/$pkgname-$pkgver-notls_src.tar.gz" source="$pkgname/$pkgname-$pkgver-notls_src.tar.gz
build() { build() {
cd "$srcdir/$pkgname-$pkgver-notls" cd "$srcdir/$pkgname-$pkgver-notls"
sed -i -e 's:^cfg-target.*:cfg-target = $(cfg-dir):' \ sed -i -e 's:^cfg-target.*:cfg-target = $(cfg-dir):' \
-e 's:^cfg-prefix.*:cfg-prefix = $(basedir):' Makefile.defs -e 's:^cfg-prefix.*:cfg-prefix = $(basedir):' Makefile.defs
cd scripts
sed -i -e 's:/var/run/' \
opensipsctl.base opensipsctlrc osipsconsole osipsconsolerc
cd ..
make prefix=/usr || return 1 make prefix=/usr || return 1
make prefix=/usr basedir="$pkgdir" install make prefix=/usr basedir="$pkgdir" install
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
6606574b4872cbc5114e490f962ca096 opensips.initd"
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 $?
chown -R opensips:opensips /var/run/opensips
adduser -H -h /var/empty -s /bin/false -D opensips 2>/dev/null
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment