Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Mar 2013 15:17:20 +0000 (UTC)
From:      Chris Rees <crees@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r313358 - in head/sysutils/monitorix: . files
Message-ID:  <201303031517.r23FHKJS079018@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: crees
Date: Sun Mar  3 15:17:19 2013
New Revision: 313358
URL: http://svnweb.freebsd.org/changeset/ports/313358

Log:
  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.

Deleted:
  head/sysutils/monitorix/files/patch-monitorix
Modified:
  head/sysutils/monitorix/Makefile
  head/sysutils/monitorix/distinfo
  head/sysutils/monitorix/files/pkg-message.in
  head/sysutils/monitorix/pkg-plist

Modified: head/sysutils/monitorix/Makefile
==============================================================================
--- head/sysutils/monitorix/Makefile	Sun Mar  3 15:08:26 2013	(r313357)
+++ head/sysutils/monitorix/Makefile	Sun Mar  3 15:17:19 2013	(r313358)
@@ -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
 		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}

Modified: head/sysutils/monitorix/distinfo
==============================================================================
--- head/sysutils/monitorix/distinfo	Sun Mar  3 15:08:26 2013	(r313357)
+++ head/sysutils/monitorix/distinfo	Sun Mar  3 15:17:19 2013	(r313358)
@@ -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

Modified: head/sysutils/monitorix/files/pkg-message.in
==============================================================================
--- head/sysutils/monitorix/files/pkg-message.in	Sun Mar  3 15:08:26 2013	(r313357)
+++ head/sysutils/monitorix/files/pkg-message.in	Sun Mar  3 15:17:19 2013	(r313358)
@@ -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.
+
 ================================================================

Modified: head/sysutils/monitorix/pkg-plist
==============================================================================
--- head/sysutils/monitorix/pkg-plist	Sun Mar  3 15:08:26 2013	(r313357)
+++ head/sysutils/monitorix/pkg-plist	Sun Mar  3 15:17:19 2013	(r313358)
@@ -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%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303031517.r23FHKJS079018>