freebsd-ports/sysutils/monitorix/Makefile

120 lines
3.4 KiB
Makefile
Raw Normal View History

# Created by: Olli Hauer <ohauer@FreeBSD.org>
# $FreeBSD$
PORTNAME= monitorix
PORTVERSION= 3.0.0
CATEGORIES= sysutils
MASTER_SITES= http://www.monitorix.org/ \
http://www.monitorix.org/old_versions/ \
http://www.bayofrum.net/dist/${PORTNAME}/
MAINTAINER= crees@FreeBSD.org
COMMENT= A web based monitoring system
2011-09-25 10:04:28 +02:00
LICENSE= GPLv2
LIB_DEPENDS= rrd:${PORTSDIR}/databases/rrdtool
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 \
Enter Monitorix 2.6.0! Please check the README on important configuration file changes, especially the @FS_LIST property which has changed. - Added a complete statistical BIND graph. - Added support for NetBSD systems. - Added support for grouping remote servers in the Multihost view. (thanks to Hartmut Woehrle, hartmut AT hartmut-woehrle.ch) - The Disk and Filesystems Usage and I/O Activity graphs have been completely rewritten. (suggested by Konstantinos Skarlatos, k.skarlatos AT gmail.com) - Added support to monitor unlimited number of disk drives. - Added support to monitor unlimited number of filesystems. - Reorganized the legend in the Disk drive temperatures and health graph. - Changed the shebang to be more portable among different systems. - Completely rewritten the Debian/Ubuntu init script. (suggested by Andreas Itzchak Rehberg, izzy AT qumran.org) - Minor changes in the header of the Debian/Ubuntu init script. (thanks to Uwe Heidrich, uweheidrich AT hotmail.com) - Expanded to 15 characters the description in network ports. - Changed to lines a bit thicker some graphs with few values. - Added a new feature to enable/disable the use of javascript:void function when clicking on a zoomable graph. (thanks to Florian E.J. Fruth, fejf AT gmx.de) - Fixed a bug that mixed the collected values when monitoring multiple MySQL servers. (thanks to Piotr Smalira, p.smalira AT g16-lublin.eu) - Fixed a bad percentage calculation in the dentries and inodes values. - Removed useless code when collecting Squid stats. - Fixed a typo in a MySQL graph.
2012-09-19 21:07:36 +02:00
p5-MIME-Lite>=0:${PORTSDIR}/mail/p5-MIME-Lite \
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
USE_PERL5_RUN= yes
MAN5= monitorix.conf.5
MAN8= monitorix.8
MANCOMPRESSED= no
NO_BUILD= yes
USE_RC_SUBR= ${PORTNAME}
CGIDIR?= www/cgi-bin
2012-03-11 01:52:37 +01:00
CGIPATH?= /cgi-bin
WWW_OWNER?= ${WWWOWN}
WWW_GROUP?= ${WWWGRP}
2012-04-19 21:33:27 +02:00
REPORT_LANG= ca de en it pl
WWWROOT= ${WWWDIR:S,/${PORTNAME}$,,}
SUB_FILES= pkg-message
SUB_LIST= PERL=${PERL}
PLIST_SUB+= CGIDIR=${CGIDIR} \
WWW_OWNER=${WWW_OWNER} \
WWW_GROUP=${WWW_GROUP}
WWW_FILES= logo_top.png \
logo_bot.png \
monitorixico.png
2012-04-19 21:33:27 +02:00
PORTDOCS= *
PORTDATA= *.pm
pre-everything::
@${ECHO_MSG} ""
@${ECHO_MSG} "You may set following options:"
@${ECHO_MSG} ""
@${ECHO_MSG} "DATADIR=${DATADIR} Where do you put RRD databases?"
@${ECHO_MSG} "CGIDIR=${CGIDIR} Where do you put cgi?"
@${ECHO_MSG} "CGIPATH=${CGIPATH} What is the relative URL for cgi files?"
@${ECHO_MSG} "WWWDIR=${WWWDIR} Where do you put httpd's document root?"
@${ECHO_MSG} ""
post-patch:
# Let's set our own paths.
# No iptables, so we'll disable PORT_GRAPH
@${REINPLACE_CMD} '\,^use lib,s,/usr/lib/monitorix,${DATADIR},' \
${WRKSRC}/${PORTNAME} \
${WRKSRC}/${PORTNAME}.cgi
@${REINPLACE_CMD} \
-e 's|^\(base_dir *= *\).*|\1${WWWDIR}/|' \
-e 's|^\(base_lib *= *\).*|\1${DATADIR}/|' \
-e 's|^\(base_cgi *= *\).*|\1${CGIPATH}/|' \
-e 's|^\(secure_log[[:space:]]*= *\).*|\1/var/log/auth.log|' \
-e "s|/var/lib/milter-greylist/db/|/var/milter-greylist/|" \
-e 's|^\([[:space:]]*port[^=]*=[^y]*\)y|\1n|' \
${WRKSRC}/monitorix.conf
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/monitorix ${PREFIX}/bin/
${MKDIR} ${DATADIR}
${INSTALL_DATA} ${WRKSRC}/lib/* ${DATADIR}/
Enter Monitorix 2.6.0! Please check the README on important configuration file changes, especially the @FS_LIST property which has changed. - Added a complete statistical BIND graph. - Added support for NetBSD systems. - Added support for grouping remote servers in the Multihost view. (thanks to Hartmut Woehrle, hartmut AT hartmut-woehrle.ch) - The Disk and Filesystems Usage and I/O Activity graphs have been completely rewritten. (suggested by Konstantinos Skarlatos, k.skarlatos AT gmail.com) - Added support to monitor unlimited number of disk drives. - Added support to monitor unlimited number of filesystems. - Reorganized the legend in the Disk drive temperatures and health graph. - Changed the shebang to be more portable among different systems. - Completely rewritten the Debian/Ubuntu init script. (suggested by Andreas Itzchak Rehberg, izzy AT qumran.org) - Minor changes in the header of the Debian/Ubuntu init script. (thanks to Uwe Heidrich, uweheidrich AT hotmail.com) - Expanded to 15 characters the description in network ports. - Changed to lines a bit thicker some graphs with few values. - Added a new feature to enable/disable the use of javascript:void function when clicking on a zoomable graph. (thanks to Florian E.J. Fruth, fejf AT gmx.de) - Fixed a bug that mixed the collected values when monitoring multiple MySQL servers. (thanks to Piotr Smalira, p.smalira AT g16-lublin.eu) - Fixed a bad percentage calculation in the dentries and inodes values. - Removed useless code when collecting Squid stats. - Fixed a typo in a MySQL graph.
2012-09-19 21:07:36 +02:00
@${MKDIR} ${WWWDIR}
@${INSTALL} -d -o ${WWW_OWNER} -g ${WWW_GROUP} ${WWWDIR}/imgs
.for f in ${WWW_FILES}
@${INSTALL_DATA} ${WRKSRC}/${f} ${WWWDIR}/
.endfor
@${MKDIR} ${PREFIX}/${CGIDIR}
@${LN} -s ${PREFIX}/${CGIDIR} ${WWWDIR}/cgi
@${INSTALL_SCRIPT} ${WRKSRC}/monitorix.cgi ${PREFIX}/${CGIDIR}/
2012-04-19 21:33:27 +02:00
.for c in 5 8
. for m in ${MAN$c}
@${INSTALL_MAN} ${WRKSRC}/man/man$c/$m ${MAN$cPREFIX}/man/man$c/
. endfor
.endfor
@${MKDIR} ${WWWDIR}/reports
.for l in ${REPORT_LANG}
@${INSTALL_DATA} ${WRKSRC}/reports/${l}.html \
${WWWDIR}/reports/$l.html.sample
.endfor
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
2012-04-19 21:33:27 +02:00
. for f in docs/* README README.FreeBSD README.nginx Changes
@${INSTALL_DATA} ${WRKSRC}/$f ${DOCSDIR}
. endfor
.endif
post-install:
@${MKDIR} ${DATADIR}
@${MKDIR} ${WWWDIR}/usage
Enter Monitorix 2.6.0! Please check the README on important configuration file changes, especially the @FS_LIST property which has changed. - Added a complete statistical BIND graph. - Added support for NetBSD systems. - Added support for grouping remote servers in the Multihost view. (thanks to Hartmut Woehrle, hartmut AT hartmut-woehrle.ch) - The Disk and Filesystems Usage and I/O Activity graphs have been completely rewritten. (suggested by Konstantinos Skarlatos, k.skarlatos AT gmail.com) - Added support to monitor unlimited number of disk drives. - Added support to monitor unlimited number of filesystems. - Reorganized the legend in the Disk drive temperatures and health graph. - Changed the shebang to be more portable among different systems. - Completely rewritten the Debian/Ubuntu init script. (suggested by Andreas Itzchak Rehberg, izzy AT qumran.org) - Minor changes in the header of the Debian/Ubuntu init script. (thanks to Uwe Heidrich, uweheidrich AT hotmail.com) - Expanded to 15 characters the description in network ports. - Changed to lines a bit thicker some graphs with few values. - Added a new feature to enable/disable the use of javascript:void function when clicking on a zoomable graph. (thanks to Florian E.J. Fruth, fejf AT gmx.de) - Fixed a bug that mixed the collected values when monitoring multiple MySQL servers. (thanks to Piotr Smalira, p.smalira AT g16-lublin.eu) - Fixed a bad percentage calculation in the dentries and inodes values. - Removed useless code when collecting Squid stats. - Fixed a typo in a MySQL graph.
2012-09-19 21:07:36 +02:00
@${INSTALL_DATA} ${WRKSRC}/monitorix.conf \
${PREFIX}/etc/monitorix.conf.sample
@if [ ! -f ${PREFIX}/etc/monitorix.conf ]; then \
${CP} -p ${PREFIX}/etc/monitorix.conf.sample \
${PREFIX}/etc/monitorix.conf ; \
fi
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>