summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorChris Rees <crees@FreeBSD.org>2013-03-03 15:17:19 +0000
committerChris Rees <crees@FreeBSD.org>2013-03-03 15:17:19 +0000
commit6eb93de9a965ce4321a744c84055cb21b6e341fb (patch)
tree8d1ab5b7f1bc91331dee9edfbd6283e11a721363 /sysutils
parentThis module provides a more general version of the Str type. If (diff)
Update to 3.0.0
Config file changes amass here, so a rewrite is necessary. Fortunately, the layout is the same so it is easy.
Notes
Notes: svn path=/head/; revision=313358
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/monitorix/Makefile43
-rw-r--r--sysutils/monitorix/distinfo4
-rw-r--r--sysutils/monitorix/files/patch-monitorix19
-rw-r--r--sysutils/monitorix/files/pkg-message.in4
-rw-r--r--sysutils/monitorix/pkg-plist14
5 files changed, 35 insertions, 49 deletions
diff --git a/sysutils/monitorix/Makefile b/sysutils/monitorix/Makefile
index cb0fe331553c..fa34c3196714 100644
--- a/sysutils/monitorix/Makefile
+++ b/sysutils/monitorix/Makefile
@@ -1,12 +1,8 @@
-# New ports collection makefile for: monitorix
-# Date created: 15 Aug 2010
-# Whom: Olli Hauer <ohauer@FreeBSD.org>
-#
+# Created by: Olli Hauer <ohauer@FreeBSD.org>
# $FreeBSD$
-#
PORTNAME= monitorix
-PORTVERSION= 2.6.0
+PORTVERSION= 3.0.0
CATEGORIES= sysutils
MASTER_SITES= http://www.monitorix.org/ \
http://www.monitorix.org/old_versions/ \
@@ -22,9 +18,12 @@ 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 \
- p5-XML-Simple>=0:${PORTSDIR}/textproc/p5-XML-Simple
+ 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= 5.12+
+USE_PERL5_RUN= yes
MAN5= monitorix.conf.5
MAN8= monitorix.8
MANCOMPRESSED= no
@@ -50,6 +49,7 @@ WWW_FILES= logo_top.png \
monitorixico.png
PORTDOCS= *
+PORTDATA= *.pm
pre-everything::
@${ECHO_MSG} ""
@@ -62,30 +62,31 @@ pre-everything::
@${ECHO_MSG} ""
post-patch:
-.for f in monitorix.cgi monitorix.conf monitorix reports/send_reports
- @${REINPLACE_CMD} -e "1s|^\(#!\).*|\1/usr/bin/env perl|" \
- ${WRKSRC}/${f}
-.endfor
-# eth0 doesn't exist in FreeBSD! Also let's set our own paths.
+# 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= "\)[^"]*|\1/var/log/auth.log|' \
+ -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|eth0|lo0|g" \
- -e 's|\("port"[^Y]*\)Y|\1N|' \
+ -e 's|^\([[:space:]]*port[^=]*=[^y]*\)y|\1n|' \
${WRKSRC}/monitorix.conf
do-install:
- @${INSTALL_SCRIPT} ${WRKSRC}/monitorix ${PREFIX}/bin/
+ ${INSTALL_SCRIPT} ${WRKSRC}/monitorix ${PREFIX}/bin/
+ ${MKDIR} ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/lib/* ${DATADIR}/
@${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}/
.for c in 5 8
. for m in ${MAN$c}
@@ -95,7 +96,7 @@ do-install:
@${MKDIR} ${WWWDIR}/reports
.for l in ${REPORT_LANG}
@${INSTALL_DATA} ${WRKSRC}/reports/${l}.html \
- ${WWWDIR}/reports/
+ ${WWWDIR}/reports/$l.html.sample
.endfor
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
diff --git a/sysutils/monitorix/distinfo b/sysutils/monitorix/distinfo
index 25c13be25cda..5eb8de85ef2d 100644
--- a/sysutils/monitorix/distinfo
+++ b/sysutils/monitorix/distinfo
@@ -1,2 +1,2 @@
-SHA256 (monitorix-2.6.0.tar.gz) = 0e909a06fd5156d7f2b6604da9175dc5d79309b29d2c904c479eb2fb2d1f5c23
-SIZE (monitorix-2.6.0.tar.gz) = 137386
+SHA256 (monitorix-3.0.0.tar.gz) = c503491d6550a99762fc636f07098fc5a66bd170f5d009a05052b4273e5ae224
+SIZE (monitorix-3.0.0.tar.gz) = 158342
diff --git a/sysutils/monitorix/files/patch-monitorix b/sysutils/monitorix/files/patch-monitorix
deleted file mode 100644
index 1553a5041a4a..000000000000
--- a/sysutils/monitorix/files/patch-monitorix
+++ /dev/null
@@ -1,19 +0,0 @@
---- monitorix.orig 2012-09-19 19:10:51.216974158 +0100
-+++ monitorix 2012-09-19 19:32:41.617971604 +0100
-@@ -2293,8 +2293,14 @@
- }
- }
- } elsif($os eq "FreeBSD" || $os eq "OpenBSD" || $os eq "NetBSD") {
-- $d =~ s/^.*dev\///; # remove the /dev/ prefix
-- $d =~ s/^(...).*/\1/; # get the first 3 chars
-+ # remove the /dev/ prefix
-+ if ($d =~ s/^.*dev\///) {
-+ # not ZFS; get the device name, eg ada0; md0; ad10
-+ $d =~ s/^(\D+\d*)\D.*/\1/;
-+ } else {
-+ # Just take ZFS pool name
-+ $d =~ s,^([^/]*)/.*,\1,;
-+ }
- }
- $FS_DEV{$fs} = $d;
- logger("$myself: Detected physical device name for $fs in '$d'.") unless !$opt_d;
diff --git a/sysutils/monitorix/files/pkg-message.in b/sysutils/monitorix/files/pkg-message.in
index cc33d3e672d9..f4f9e84a4e98 100644
--- a/sysutils/monitorix/files/pkg-message.in
+++ b/sysutils/monitorix/files/pkg-message.in
@@ -3,4 +3,8 @@
The port has a generic default config, please adjust your
settings in file: %%PREFIX%%/etc/monitorix.conf
+ The configuration file changed between 2.6.x and 3.0.0.
+ It is suggested that you back up your old config file and
+ use the information there to write the new one.
+
================================================================
diff --git a/sysutils/monitorix/pkg-plist b/sysutils/monitorix/pkg-plist
index 0a4d7dc309cb..856dbf50b1e5 100644
--- a/sysutils/monitorix/pkg-plist
+++ b/sysutils/monitorix/pkg-plist
@@ -4,20 +4,20 @@
etc/monitorix.conf.sample
@exec if [ ! -f %D/etc/monitorix.conf ]; then cp %B/%f %D/etc/monitorix.conf; fi
bin/monitorix
-@exec mkdir -p %D/%%DATADIR%%
-@dirrmtry %%DATADIR%%
@exec mkdir -p %D/%%WWWDIR%%/usage
@dirrmtry %%WWWDIR%%/usage
%%CGIDIR%%/monitorix.cgi
+@unexec rm -f %B/monitorix.conf.path
@dirrmtry %%CGIDIR%%
-%%WWWDIR%%/reports/ca.html
-%%WWWDIR%%/reports/de.html
-%%WWWDIR%%/reports/en.html
-%%WWWDIR%%/reports/it.html
-%%WWWDIR%%/reports/pl.html
+%%WWWDIR%%/reports/ca.html.sample
+%%WWWDIR%%/reports/de.html.sample
+%%WWWDIR%%/reports/en.html.sample
+%%WWWDIR%%/reports/it.html.sample
+%%WWWDIR%%/reports/pl.html.sample
@dirrm %%WWWDIR%%/reports
%%WWWDIR%%/logo_bot.png
%%WWWDIR%%/logo_top.png
%%WWWDIR%%/monitorixico.png
+%%WWWDIR%%/cgi
@dirrmtry %%WWWDIR%%/imgs
@dirrmtry %%WWWDIR%%