mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-29 01:13:08 +00:00
- Remove unecessary patch and convert it to REINPLACE_CMD
- Respect PREFIX - Use USE_RC_SUBR instead of install startup script manually - Simplify mkdirs
This commit is contained in:
parent
f2fdd5cf25
commit
003b97e11c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=261557
@ -10,31 +10,28 @@ PORTVERSION= 1.4
|
||||
CATEGORIES= www net
|
||||
MASTER_SITES= SF/monast/MonAst%20for%20Asterisk%201.4_1.6/1.4
|
||||
|
||||
PATCH_SITES= http://www.mii.com.br/monast/
|
||||
PATCHFILES= monast-1.4.patch1.gz
|
||||
|
||||
MAINTAINER= marcelorossi@gmail.com
|
||||
COMMENT= A monitoring and an operator panel interface for AsteriskTM
|
||||
|
||||
USE_PYTHON= 2.5+
|
||||
USE_RC_SUBR= monast
|
||||
|
||||
NO_BUILD= YES
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's,/usr/bin/python,${PYTHON_CMD},' \
|
||||
-e 's,/etc,${PREFIX}/etc,g' \
|
||||
${WRKSRC}/pymon/monast.py
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${PREFIX}/monast/amapi
|
||||
${MKDIR} ${PREFIX}/monast/simplejson
|
||||
${MKDIR} ${WWWDIR}/css
|
||||
${MKDIR} ${WWWDIR}/image
|
||||
${MKDIR} ${WWWDIR}/template
|
||||
${MKDIR} ${WWWDIR}/lib
|
||||
${MKDIR} ${WWWDIR}/js
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/contrib/freebsd/monast ${PREFIX}/etc/rc.d/monast
|
||||
@${MKDIR} ${PREFIX}/monast/amapi ${PREFIX}/monast/simplejson ${WWWDIR}
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/pymon/monast.py ${PREFIX}/monast/monast.py
|
||||
${INSTALL_DATA} ${WRKSRC}/pymon/monast.conf.sample ${PREFIX}/etc/monast.conf.default
|
||||
${INSTALL_DATA} ${WRKSRC}/pymon/amapi/* ${PREFIX}/monast/amapi/
|
||||
${INSTALL_DATA} ${WRKSRC}/pymon/simplejson/* ${PREFIX}/monast/simplejson/
|
||||
${INSTALL_DATA} ${WRKSRC}/*.php ${WWWDIR}/
|
||||
.for f in css image template js
|
||||
@${MKDIR} ${WWWDIR}/${f}
|
||||
${INSTALL_DATA} ${WRKSRC}/${f}/* ${WWWDIR}/${f}/
|
||||
.endfor
|
||||
(cd ${WRKSRC}/lib/ && ${COPYTREE_SHARE} \* ${WWWDIR}/lib)
|
||||
|
27
www/monast/files/monast.in
Normal file
27
www/monast/files/monast.in
Normal file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# PROVIDE: monast
|
||||
# REQUIRE: LOGIN
|
||||
# BEFORE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following line to /etc/rc.conf to enable the monast daemon:
|
||||
#
|
||||
# monast_enable="YES"
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=monast
|
||||
rcvar=${name}_enable
|
||||
|
||||
command="%%PREFIX%%/monast/monast.py"
|
||||
pidfile="/var/run/${name}.pid"
|
||||
|
||||
load_rc_config ${name}
|
||||
|
||||
: ${monast_enable="NO"}
|
||||
|
||||
command_args="--daemon"
|
||||
|
||||
run_rc_command "$1"
|
@ -1,7 +1,6 @@
|
||||
@unexec if cmp -s %D/etc/monast.conf %D/etc/monast.conf.default; then rm -f %D/etc/monast.conf; fi
|
||||
etc/monast.conf.default
|
||||
@exec [ -f %B/monast.conf ] || cp %B/%f %B/monast.conf
|
||||
etc/rc.d/monast
|
||||
monast/amapi/AsteriskManager.py
|
||||
monast/amapi/AsteriskManager.pyc
|
||||
monast/amapi/AsteriskManager.pyo
|
||||
|
Loading…
Reference in New Issue
Block a user