aboutsummaryrefslogtreecommitdiff
path: root/net/asterisk16
diff options
context:
space:
mode:
authorMax Khon <fjoe@FreeBSD.org>2010-11-07 18:08:37 +0000
committerMax Khon <fjoe@FreeBSD.org>2010-11-07 18:08:37 +0000
commit50cf9b6898b1a6634f076969d3166314d3478adc (patch)
tree98a311e4d6c4d6695e621358dd97cb561e23dad3 /net/asterisk16
parentf84e9106dd9916a1beca3503919db76cffe432a8 (diff)
downloadports-50cf9b6898b1a6634f076969d3166314d3478adc.tar.gz
ports-50cf9b6898b1a6634f076969d3166314d3478adc.zip
Notes
Diffstat (limited to 'net/asterisk16')
-rw-r--r--net/asterisk16/Makefile12
-rw-r--r--net/asterisk16/files/asterisk.sh.in3
-rw-r--r--net/asterisk16/pkg-plist2
3 files changed, 15 insertions, 2 deletions
diff --git a/net/asterisk16/Makefile b/net/asterisk16/Makefile
index 05d3b70e0dbf..4003690f2e65 100644
--- a/net/asterisk16/Makefile
+++ b/net/asterisk16/Makefile
@@ -7,6 +7,7 @@
PORTNAME= asterisk
PORTVERSION= 1.6.2.13
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://downloads.asterisk.org/pub/telephony/asterisk/ \
http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/
@@ -57,6 +58,12 @@ OPTIONS= OGGVORBIS "Enable Ogg Vorbis support" on \
ILBC "Enable iLBC codec" off \
SPANDSP "Enable Spandsp faxing support" off
+ASTERISK_USER?= asterisk
+ASTERISK_GROUP?= asterisk
+
+USERS= ${ASTERISK_USER}
+GROUPS= ${ASTERISK_GROUP} dahdi
+
.include <bsd.port.pre.mk>
.if ${ARCH} == "i386" || ${ARCH} == "amd64"
@@ -66,6 +73,8 @@ OPTIONS+= DAHDI "Enable DAHDI support" on
.include <bsd.port.options.mk>
.endif
+SUB_LIST+= ASTERISK_USER=${ASTERISK_USER}
+
.if !defined(WITH_H323)
PLIST_SUB+= WITH_H323="@comment "
CONFIGURE_ARGS+= --without-h323
@@ -219,4 +228,7 @@ post-extract:
post-patch:
${REINPLACE_CMD} -e 's|/var/lib|${PREFIX}/share|g' ${WRKSRC}/configs/musiconhold.conf.sample
+post-install:
+ @${CHOWN} -R ${ASTERISK_USER}:${ASTERISK_GROUP} /var/db/asterisk /var/log/asterisk /var/spool/asterisk
+
.include <bsd.port.post.mk>
diff --git a/net/asterisk16/files/asterisk.sh.in b/net/asterisk16/files/asterisk.sh.in
index a8cbb1f1eadf..d4b1330e3271 100644
--- a/net/asterisk16/files/asterisk.sh.in
+++ b/net/asterisk16/files/asterisk.sh.in
@@ -14,7 +14,7 @@
stop_cmd=asterisk_shutdown
asterisk_shutdown () {
echo 'Stopping asterisk'
- %%PREFIX%%/sbin/asterisk -qrx 'core stop now'
+ %%PREFIX%%/sbin/asterisk -nqrx 'core stop now'
sleep 1
return 0
}
@@ -23,6 +23,7 @@ name=asterisk
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/asterisk
+command_args="-n -U %%ASTERISK_USER%%"
load_rc_config $name
diff --git a/net/asterisk16/pkg-plist b/net/asterisk16/pkg-plist
index d44913a5d804..6e0e82504c01 100644
--- a/net/asterisk16/pkg-plist
+++ b/net/asterisk16/pkg-plist
@@ -386,7 +386,7 @@ lib/asterisk/modules/res_ael_share.so
lib/asterisk/modules/res_clialiases.so
%%WITH_CURL%%lib/asterisk/modules/res_curl.so
%%WITH_CURL%%lib/asterisk/modules/res_config_curl.so
-lib/asterisk/modules/res_config_ldap.so
+%%WITH_H323%%lib/asterisk/modules/res_config_ldap.so
%%WITH_SQLITE%%lib/asterisk/modules/res_config_sqlite.so
lib/asterisk/modules/res_limit.so
lib/asterisk/modules/res_phoneprov.so