2010-08-18 17:43:31 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= monitorix
|
2014-07-27 13:51:55 +00:00
|
|
|
PORTVERSION= 3.5.1
|
2014-09-09 15:42:10 +00:00
|
|
|
PORTREVISION= 1
|
2010-08-18 17:43:31 +00:00
|
|
|
CATEGORIES= sysutils
|
2011-03-28 02:45:01 +00:00
|
|
|
MASTER_SITES= http://www.monitorix.org/ \
|
2011-05-04 19:32:58 +00:00
|
|
|
http://www.monitorix.org/old_versions/ \
|
2011-03-28 02:45:01 +00:00
|
|
|
http://www.bayofrum.net/dist/${PORTNAME}/
|
2010-08-18 17:43:31 +00:00
|
|
|
|
2011-06-17 06:46:07 +00:00
|
|
|
MAINTAINER= crees@FreeBSD.org
|
2014-07-17 08:57:51 +00:00
|
|
|
COMMENT= Web based monitoring system
|
2010-08-18 17:43:31 +00:00
|
|
|
|
2011-09-25 08:04:28 +00:00
|
|
|
LICENSE= GPLv2
|
|
|
|
|
2013-12-21 21:50:02 +00:00
|
|
|
LIB_DEPENDS= librrd.so:${PORTSDIR}/databases/rrdtool
|
2011-07-31 17:29:02 +00:00
|
|
|
RUN_DEPENDS= p5-ParallelUA>=0:${PORTSDIR}/www/p5-ParallelUA \
|
|
|
|
p5-CGI.pm>=0:${PORTSDIR}/www/p5-CGI.pm \
|
|
|
|
p5-libwww>=0:${PORTSDIR}/www/p5-libwww \
|
2012-09-19 19:07:36 +00:00
|
|
|
p5-MIME-Lite>=0:${PORTSDIR}/mail/p5-MIME-Lite \
|
2013-03-03 15:17:19 +00:00
|
|
|
p5-XML-Simple>=0:${PORTSDIR}/textproc/p5-XML-Simple \
|
|
|
|
p5-DBI>=0:${PORTSDIR}/databases/p5-DBI \
|
|
|
|
p5-HTTP-Server-Simple>=0:${PORTSDIR}/www/p5-HTTP-Server-Simple \
|
|
|
|
p5-Config-General>=0:${PORTSDIR}/devel/p5-Config-General
|
2010-08-18 17:43:31 +00:00
|
|
|
|
2013-09-16 07:47:02 +00:00
|
|
|
USES= perl5
|
|
|
|
USE_PERL5= run
|
2010-08-18 17:43:31 +00:00
|
|
|
NO_BUILD= yes
|
2011-03-28 02:45:01 +00:00
|
|
|
USE_RC_SUBR= ${PORTNAME}
|
2010-08-18 17:43:31 +00:00
|
|
|
|
2013-06-04 18:52:55 +00:00
|
|
|
DBDIR?= /var/db/${PORTNAME}
|
2011-05-04 19:32:58 +00:00
|
|
|
CGIDIR?= www/cgi-bin
|
2012-03-11 00:52:37 +00:00
|
|
|
CGIPATH?= /cgi-bin
|
2010-08-18 17:43:31 +00:00
|
|
|
WWW_OWNER?= ${WWWOWN}
|
|
|
|
WWW_GROUP?= ${WWWGRP}
|
2012-04-19 19:33:27 +00:00
|
|
|
REPORT_LANG= ca de en it pl
|
2011-03-28 02:45:01 +00:00
|
|
|
WWWROOT= ${WWWDIR:S,/${PORTNAME}$,,}
|
2010-08-18 17:43:31 +00:00
|
|
|
|
|
|
|
SUB_FILES= pkg-message
|
2013-06-04 18:52:55 +00:00
|
|
|
SUB_LIST= PERL=${PERL} \
|
|
|
|
DBDIR=${DBDIR}
|
2010-08-18 17:43:31 +00:00
|
|
|
|
2011-05-04 19:32:58 +00:00
|
|
|
PLIST_SUB+= CGIDIR=${CGIDIR} \
|
2011-03-29 02:40:12 +00:00
|
|
|
WWW_OWNER=${WWW_OWNER} \
|
2013-06-04 18:52:55 +00:00
|
|
|
WWW_GROUP=${WWW_GROUP} \
|
|
|
|
DBDIR=${DBDIR}
|
2011-03-28 02:45:01 +00:00
|
|
|
|
|
|
|
WWW_FILES= logo_top.png \
|
|
|
|
logo_bot.png \
|
|
|
|
monitorixico.png
|
|
|
|
|
2012-04-19 19:33:27 +00:00
|
|
|
PORTDOCS= *
|
2013-03-03 15:17:19 +00:00
|
|
|
PORTDATA= *.pm
|
2010-08-18 17:43:31 +00:00
|
|
|
|
2013-06-04 18:52:55 +00:00
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
2010-08-18 17:43:31 +00:00
|
|
|
pre-everything::
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
@${ECHO_MSG} "You may set following options:"
|
|
|
|
@${ECHO_MSG} ""
|
2013-06-04 18:52:55 +00:00
|
|
|
@${ECHO_MSG} "DBDIR=${DBDIR} Where do you put RRD databases?"
|
2010-08-18 17:43:31 +00:00
|
|
|
@${ECHO_MSG} "CGIDIR=${CGIDIR} Where do you put cgi?"
|
2011-03-28 02:45:01 +00:00
|
|
|
@${ECHO_MSG} "CGIPATH=${CGIPATH} What is the relative URL for cgi files?"
|
2010-08-18 17:43:31 +00:00
|
|
|
@${ECHO_MSG} "WWWDIR=${WWWDIR} Where do you put httpd's document root?"
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
|
|
|
|
post-patch:
|
2013-03-03 15:17:19 +00:00
|
|
|
# Let's set our own paths.
|
2011-04-18 17:44:03 +00:00
|
|
|
# No iptables, so we'll disable PORT_GRAPH
|
2013-03-03 15:17:19 +00:00
|
|
|
@${REINPLACE_CMD} '\,^use lib,s,/usr/lib/monitorix,${DATADIR},' \
|
|
|
|
${WRKSRC}/${PORTNAME} \
|
|
|
|
${WRKSRC}/${PORTNAME}.cgi
|
2011-03-28 02:45:01 +00:00
|
|
|
@${REINPLACE_CMD} \
|
2014-11-22 22:37:20 +00:00
|
|
|
-e '\|user *= *nobody|s|nobody|www|' \
|
|
|
|
-e '\|group *= *nobody|s|nobody|www|' \
|
2013-03-03 15:17:19 +00:00
|
|
|
-e 's|^\(base_dir *= *\).*|\1${WWWDIR}/|' \
|
2013-06-04 18:52:55 +00:00
|
|
|
-e 's|^\(base_lib *= *\).*|\1${DBDIR}/|' \
|
2013-03-03 15:17:19 +00:00
|
|
|
-e 's|^\(base_cgi *= *\).*|\1${CGIPATH}/|' \
|
|
|
|
-e 's|^\(secure_log[[:space:]]*= *\).*|\1/var/log/auth.log|' \
|
2011-03-28 02:45:01 +00:00
|
|
|
-e "s|/var/lib/milter-greylist/db/|/var/milter-greylist/|" \
|
2013-03-03 15:17:19 +00:00
|
|
|
-e 's|^\([[:space:]]*port[^=]*=[^y]*\)y|\1n|' \
|
2011-03-28 02:45:01 +00:00
|
|
|
${WRKSRC}/monitorix.conf
|
2010-08-18 17:43:31 +00:00
|
|
|
|
|
|
|
do-install:
|
2013-12-21 21:50:02 +00:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/monitorix ${STAGEDIR}${PREFIX}/bin/
|
|
|
|
${MKDIR} ${STAGEDIR}${DATADIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/lib/* ${STAGEDIR}${DATADIR}/
|
|
|
|
${MKDIR} ${STAGEDIR}${WWWDIR}
|
|
|
|
(cd ${STAGEDIR}${WWWDIR} && ${MKDIR} usage imgs)
|
|
|
|
${INSTALL_DATA} ${WWW_FILES:S,^,${WRKSRC}/,} ${STAGEDIR}${WWWDIR}/
|
|
|
|
${MKDIR} ${STAGEDIR}${PREFIX}/${CGIDIR}
|
|
|
|
${LN} -sf ${PREFIX}/${CGIDIR} ${STAGEDIR}${WWWDIR}/cgi
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/monitorix.cgi \
|
|
|
|
${STAGEDIR}${PREFIX}/${CGIDIR}/
|
|
|
|
.for s in 5 8
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/man/man$s/* ${STAGEDIR}${PREFIX}/man/man$s/
|
2011-07-31 17:29:02 +00:00
|
|
|
.endfor
|
2013-12-21 21:50:02 +00:00
|
|
|
${MKDIR} ${STAGEDIR}${WWWDIR}/reports
|
2011-07-31 17:29:02 +00:00
|
|
|
.for l in ${REPORT_LANG}
|
2013-12-21 21:50:02 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/reports/${l}.html \
|
|
|
|
${STAGEDIR}${WWWDIR}/reports/$l.html.sample
|
2011-07-31 17:29:02 +00:00
|
|
|
.endfor
|
2013-12-21 21:50:02 +00:00
|
|
|
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
|
|
.for f in docs/*[^t] README README.FreeBSD README.nginx Changes
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/$f ${STAGEDIR}${DOCSDIR}
|
|
|
|
.endfor
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/monitorix.conf \
|
|
|
|
${STAGEDIR}${PREFIX}/etc/monitorix.conf.sample
|
|
|
|
${MKDIR} ${STAGEDIR}/var/db/${PORTNAME}
|
2010-08-18 17:43:31 +00:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|