aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/kamailio/APKBUILD23
1 files changed, 17 insertions, 6 deletions
diff --git a/main/kamailio/APKBUILD b/main/kamailio/APKBUILD
index efaeaaf9cb..77916f0002 100644
--- a/main/kamailio/APKBUILD
+++ b/main/kamailio/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=kamailio
pkgver=1.5.3
-pkgrel=0
+pkgrel=2
pkgdesc="Open Source SIP Server"
url="http://www.kamailio.org/"
pkgusers="kamailio"
@@ -18,22 +18,28 @@ source="http://www.kamailio.org/pub/kamailio/$pkgver/src/$pkgname-$pkgver-notls_
kamailio.cfg
kamailio.initd
kamailio.pre-install
- kamailio.post-install"
+ kamailio.post-install
+ "
-build() {
+prepare() {
cd "$srcdir/$pkgname-$pkgver-notls"
sed -i -e 's:^cfg-target.*:cfg-target = $(cfg-dir):' \
-e 's:^cfg-prefix.*:cfg-prefix = $(basedir):' Makefile.defs \
|| return 1
-
cd scripts
sed -i -e 's:/var/run/kamailio.pid:/var/run/kamailio/kamailio.pid:g' \
kamctl.base kamctlrc || return 1
# we actually dont need bash
- sed -i -e '1s:/bin/bash:/bin/sh:' kamctl kamdbctl \
+ sed -i -e 's:/bin/bash:/bin/sh:' kamctl kamdbctl \
+ || return 1
+ # Set email_address field as not required field (could be null)
+ cd dbtext/kamailio
+ sed -i -e 's:email_address(string):email_address(string,null):' subscriber \
|| return 1
- cd ..
+}
+build() {
+ cd "$srcdir/$pkgname-$pkgver-notls"
make prefix=/usr \
cfg-dir=/etc/kamailio/ \
MODS_MYSQL=yes \
@@ -43,6 +49,10 @@ build() {
TLS= \
include_modules="db_postgres mediaproxy db_unixodbc" \
all || return 1
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver-notls"
make prefix=/usr \
cfg-dir=/etc/kamailio/ \
MODS_MYSQL=yes \
@@ -54,6 +64,7 @@ build() {
basedir="$pkgdir" install || return 1
# move default config to -doc package and use our own default config
+
mv "$pkgdir"/etc/kamailio/kamailio.cfg \
"$pkgdir"/usr/share/doc/kamailio/
install -m644 -D "$srcdir"/kamailio.cfg \