- Update to 2.2.0
- Program now lives in PREFIX/bin - Install manpage and extra docs - Reports don't need extra dependency, OPTION removed - Perl dependencies are now by package
This commit is contained in:
parent
d1c50ef74b
commit
ff1beb9b7f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=278638
5 changed files with 33 additions and 49 deletions
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
|
||||
PORTNAME= monitorix
|
||||
PORTVERSION= 2.1.2
|
||||
PORTVERSION= 2.2.0
|
||||
PORTREVISION?= 0
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= http://www.monitorix.org/ \
|
||||
|
@ -17,19 +17,16 @@ MAINTAINER= crees@FreeBSD.org
|
|||
COMMENT= A web based monitoring system
|
||||
|
||||
LIB_DEPENDS= rrd:${PORTSDIR}/databases/rrdtool
|
||||
RUN_DEPENDS= ${SITE_PERL}/LWP/Parallel.pm:${PORTSDIR}/www/p5-ParallelUA \
|
||||
${SITE_PERL}/CGI.pm:${PORTSDIR}/www/p5-CGI.pm \
|
||||
${SITE_PERL}/LWP.pm:${PORTSDIR}/www/p5-libwww \
|
||||
${SITE_PERL}/MIME/Lite.pm:${PORTSDIR}/mail/p5-MIME-Lite
|
||||
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 \
|
||||
p5-MIME-Lite>=0:${PORTSDIR}/mail/p5-MIME-Lite
|
||||
|
||||
LICENSE= GPLv2
|
||||
|
||||
OPTIONS= REPORTS "Mail HTML reports to a given address" off
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
USE_PERL= 5.8+
|
||||
MAN5= monitorix.conf.5
|
||||
MAN8= monitorix.8
|
||||
MANCOMPRESSED= no
|
||||
NO_BUILD= yes
|
||||
USE_RC_SUBR= ${PORTNAME}
|
||||
|
@ -56,16 +53,11 @@ PORTDOCS= COPYING \
|
|||
Changes \
|
||||
README \
|
||||
README.FreeBSD \
|
||||
README.OpenBSD \
|
||||
README.nginx \
|
||||
monitorix-alert.sh \
|
||||
monitorix-apache.conf
|
||||
|
||||
.if defined(WITH_REPORTS)
|
||||
RUN_DEPENDS+= metamail>=2.7:${PORTSDIR}/mail/metamail
|
||||
PLIST_SUB+= REPORTS=""
|
||||
.else
|
||||
PLIST_SUB+= REPORTS="@comment "
|
||||
.endif
|
||||
|
||||
pre-everything::
|
||||
@${ECHO_MSG} ""
|
||||
@${ECHO_MSG} "You may set following options:"
|
||||
|
@ -77,11 +69,8 @@ pre-everything::
|
|||
@${ECHO_MSG} ""
|
||||
|
||||
post-patch:
|
||||
# Set FreeBSD path for perl in shebang and absolute sysctl so as not to break
|
||||
# in cgi-bin
|
||||
.for f in monitorix.cgi monitorix.conf monitorix reports/send_reports
|
||||
@${REINPLACE_CMD} -e "1s|^\(#!\).*|\1${PERL}|" \
|
||||
-e 's|"\([^/]sysctl\)|"/sbin/\1|' \
|
||||
${WRKSRC}/${f}
|
||||
.endfor
|
||||
# eth0 doesn't exist in FreeBSD! Also let's set our own paths.
|
||||
|
@ -97,33 +86,35 @@ post-patch:
|
|||
${WRKSRC}/monitorix.conf
|
||||
|
||||
do-install:
|
||||
@${INSTALL_SCRIPT} ${WRKSRC}/monitorix ${PREFIX}/sbin/
|
||||
@${INSTALL_SCRIPT} ${WRKSRC}/monitorix ${PREFIX}/bin/
|
||||
@${MKDIR} ${WWWDIR}/imgs
|
||||
@${CHOWN} ${WWW_OWNER}:${WWW_GROUP} ${WWWDIR}/imgs
|
||||
@for f in ${WWW_FILES}; do \
|
||||
${INSTALL_DATA} ${WRKSRC}/$${f} ${WWWDIR}/; \
|
||||
done
|
||||
.for f in ${WWW_FILES}
|
||||
@${INSTALL_DATA} ${WRKSRC}/${f} ${WWWDIR}/
|
||||
.endfor
|
||||
@${MKDIR} ${PREFIX}/${CGIDIR}
|
||||
@${INSTALL_SCRIPT} ${WRKSRC}/monitorix.cgi ${PREFIX}/${CGIDIR}/
|
||||
.for m in ${MAN5}
|
||||
@${INSTALL_MAN} ${WRKSRC}/man/man5/$m ${MAN5PREFIX}/man/man5/
|
||||
.endfor
|
||||
.if defined(WITH_REPORTS)
|
||||
.for m in ${MAN8}
|
||||
@${INSTALL_MAN} ${WRKSRC}/man/man8/$m ${MAN8PREFIX}/man/man8/
|
||||
.endfor
|
||||
@${MKDIR} ${WWWDIR}/reports
|
||||
. for l in ${REPORT_LANG}
|
||||
.for l in ${REPORT_LANG}
|
||||
@${INSTALL_DATA} ${WRKSRC}/reports/${l}.html \
|
||||
${WWWDIR}/reports/
|
||||
. endfor
|
||||
.endif
|
||||
.endfor
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
@for doc in ${PORTDOCS}; do \
|
||||
${INSTALL_DATA} ${WRKSRC}/$${doc} ${DOCSDIR}; \
|
||||
done
|
||||
. for doc in ${PORTDOCS}
|
||||
@${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR}
|
||||
. endfor
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
@${MKDIR} ${DATADIR}
|
||||
@${MKDIR} ${WWWDIR}/usage
|
||||
@${INSTALL_DATA} ${WRKSRC}/monitorix.conf ${PREFIX}/etc/monitorix.conf.sample
|
||||
@if [ ! -f ${PREFIX}/etc/monitorix.conf ]; then \
|
||||
${CP} -p ${PREFIX}/etc/monitorix.conf.sample \
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
SHA256 (monitorix-2.1.2.tar.gz) = 7148c01426b0994332d1c4b2f31949ef7845736528aa79f16e4ee2c70e24ac03
|
||||
SIZE (monitorix-2.1.2.tar.gz) = 88540
|
||||
SHA256 (monitorix-2.2.0.tar.gz) = cf452dde8d3ff7d7afbc2a332741a4b34ec5de0d0d7cf32a0a62e937a9afd6f0
|
||||
SIZE (monitorix-2.2.0.tar.gz) = 98067
|
||||
|
|
|
@ -20,7 +20,7 @@ start_cmd="${name}_start"
|
|||
|
||||
pidfile="/var/run/${name}.pid"
|
||||
command_interpreter="."
|
||||
procname="%%PREFIX%%/sbin/${name}"
|
||||
procname="%%PREFIX%%/bin/${name}"
|
||||
|
||||
monitorix_start()
|
||||
{
|
||||
|
@ -30,7 +30,7 @@ monitorix_start()
|
|||
fi
|
||||
echo "Starting ${name}."
|
||||
rc_flags="-c %%PREFIX%%/etc/${name}.conf -p ${pidfile} ${rc_flags}"
|
||||
%%PERL%% %%PREFIX%%/sbin/${name} ${rc_flags} ${command_args}
|
||||
%%PERL%% %%PREFIX%%/bin/${name} ${rc_flags} ${command_args}
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
||||
|
|
|
@ -25,12 +25,3 @@
|
|||
}
|
||||
|
||||
# do exists in /proc/diskstats?
|
||||
@@ -3766,7 +3763,7 @@
|
||||
}
|
||||
|
||||
# check configuration file syntax
|
||||
-if(system("perl -wc $opt_c >/dev/null 2>&1")) {
|
||||
+if(!system("perl -wc $opt_c >/dev/null 2>&1")) {
|
||||
print("FATAL: configuration file '$opt_c' had compilation errors.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -4,16 +4,18 @@
|
|||
@unexec if cmp -s %D/etc/monitorix.conf %D/etc/monitorix.conf.sample; then rm -f %D/etc/monitorix.conf; fi
|
||||
etc/monitorix.conf.sample
|
||||
@exec if [ ! -f %D/etc/monitorix.conf ]; then cp %B/%f %D/etc/monitorix.conf; fi
|
||||
sbin/monitorix
|
||||
bin/monitorix
|
||||
@exec mkdir -p %D/%%DATADIR%%
|
||||
@dirrmtry %%DATADIR%%
|
||||
@exec mkdir -p %D/%%WWWDIR%%/usage
|
||||
@dirrmtry %%WWWDIR%%/usage
|
||||
%%CGIDIR%%/monitorix.cgi
|
||||
@dirrmtry %%CGIDIR%%
|
||||
%%REPORTS%%%%WWWDIR%%/reports/ca.html
|
||||
%%REPORTS%%%%WWWDIR%%/reports/de.html
|
||||
%%REPORTS%%%%WWWDIR%%/reports/en.html
|
||||
%%REPORTS%%%%WWWDIR%%/reports/it.html
|
||||
%%REPORTS%%@dirrm %%WWWDIR%%/reports
|
||||
%%WWWDIR%%/reports/ca.html
|
||||
%%WWWDIR%%/reports/de.html
|
||||
%%WWWDIR%%/reports/en.html
|
||||
%%WWWDIR%%/reports/it.html
|
||||
@dirrm %%WWWDIR%%/reports
|
||||
%%WWWDIR%%/logo_bot.png
|
||||
%%WWWDIR%%/logo_top.png
|
||||
%%WWWDIR%%/monitorixico.png
|
||||
|
|
Loading…
Reference in a new issue