Weathermap is a network visualisation tool, to take data you already

have and show you an overview of your network in map form.

WWW:	http://www.network-weathermap.com/

PR:		ports/153835
Submitted by:	Hsin-Han You <hhyou at cs.nctu.edu.tw>
Feature safe:	yes
This commit is contained in:
Martin Wilke 2011-01-28 17:19:37 +00:00
parent 64a809dafe
commit 2cbcc5d099
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=268338
8 changed files with 342 additions and 0 deletions

View File

@ -222,6 +222,7 @@
SUBDIR += php5-snmp
SUBDIR += php52-snmp
SUBDIR += phpip
SUBDIR += phpweathermap
SUBDIR += pixilate
SUBDIR += pktstat
SUBDIR += pmacct

View File

@ -0,0 +1,78 @@
# New ports collection makefile for: phpweathermap
# Date created: 2011-01-06
# Whom: Hsin-Han You <hhyou@cs.nctu.edu.tw>
#
# $FreeBSD$
#
PORTNAME= phpweathermap
PORTVERSION= 0.97a
CATEGORIES= net-mgmt www
MASTER_SITES= http://www.network-weathermap.com/files/
DISTNAME= php-weathermap-${PORTVERSION}
MAINTAINER= hhyou@cs.nctu.edu.tw
COMMENT= A network visualisation tool with web editor
RUN_DEPENDS= ${LOCALBASE}/share/pear/Console/Getopt.php:${PORTSDIR}/devel/pear \
rrdtool:${PORTSDIR}/databases/rrdtool
NO_BUILD= yes
USE_ZIP= yes
USE_PHP= gd
LICENSE= GPLv2
WM_FILES= HTML_ImageMap.class.php WeatherMap.functions.php \
WeatherMapLink.class.php WeatherMapNode.class.php \
Weathermap.class.php weathermap.conf
WM_WWW_FILES= overlib.js editor-config.php-dist editor.css \
editor.inc.php editor.js editor.php
WM_WWW_DIRS= editor-resources images docs
PORTDOCS= CHANGES COPYING README
WRKSRC= ${WRKDIR}/weathermap
SUB_FILES= pkg-message
.include <bsd.port.pre.mk>
post-patch:
${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|g' ${WRKSRC}/editor.php
${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|g' \
-e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/weathermap
# ${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|g' ${WRKSRC}/editor.php
do-install:
@${MKDIR} ${DATADIR}/www/configs
@${INSTALL_SCRIPT} ${WRKSRC}/weathermap ${PREFIX}/bin/phpweathermap
@for i in ${WM_FILES}; do \
${INSTALL_DATA} ${WRKSRC}/$$i ${DATADIR}/$$i; \
done
@for i in ${WM_WWW_FILES}; do \
${INSTALL_DATA} ${WRKSRC}/$$i ${DATADIR}/www/$$i; \
done
@${CP} -R ${WRKSRC}/lib ${DATADIR}
@(cd ${WRKSRC} && ${COPYTREE_SHARE} "${WM_WWW_DIRS}" ${DATADIR}/www)
@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${DATADIR}/www
.if !defined(NOPORTEXAMPLES)
@(cd ${WRKSRC} && ${COPYTREE_SHARE} "random-bits" ${EXAMPLESDIR})
@${ECHO_CMD} '@exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} \
${EXAMPLESDIR:S|^${PREFIX}/|%D/|}' >> ${TMPPLIST}
@${FIND} ${EXAMPLESDIR} -type f -print0 | ${XARGS} -0 ${CHMOD} 644
@${ECHO_CMD} '@exec ${FIND} ${EXAMPLESDIR} -type f -print0 | \
${XARGS} -0 ${CHMOD} 644' >> ${TMPPLIST}
@${FIND} ${EXAMPLESDIR} -type d -print0 | ${XARGS} -0 ${CHMOD} 755
@${ECHO_CMD} '@exec ${FIND} ${EXAMPLESDIR} -type d -print0 | \
${XARGS} -0 ${CHMOD} 755' >> ${TMPPLIST}
.endif
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}
.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>

View File

@ -0,0 +1,2 @@
SHA256 (php-weathermap-0.97a.zip) = 5b0c448e2027e22a6cacc3a07871e8b3d05f7c927ae3933a9c50a5332d029ea5
SIZE (php-weathermap-0.97a.zip) = 2927302

View File

@ -0,0 +1,24 @@
--- editor.php.orig 2011-01-06 16:39:40.000000000 +0800
+++ editor.php 2011-01-07 21:38:39.000000000 +0800
@@ -1,10 +1,10 @@
<?php
require_once 'editor.inc.php';
-require_once 'Weathermap.class.php';
+require_once '%%DATADIR%%/Weathermap.class.php';
// so that you can't have the editor active, and not know about it.
-$ENABLED=false;
+$ENABLED=true;
if(! $ENABLED)
{
@@ -17,7 +17,7 @@
$mapdir='configs';
$cacti_base = '../../';
$cacti_url = '/';
-$ignore_cacti=FALSE;
+$ignore_cacti=true;
$configerror = '';
$config_loaded = @include_once 'editor-config.php';

View File

@ -0,0 +1,36 @@
--- weathermap.orig 2011-01-06 16:39:47.000000000 +0800
+++ weathermap 2011-01-07 21:24:30.000000000 +0800
@@ -1,20 +1,20 @@
-#!/usr/bin/php
+#!%%PREFIX%%/bin/php
<?php
// PHP Weathermap 0.97a
// Copyright Howard Jones, 2005-2009 howie@thingy.com
// http://www.network-weathermap.com/
// Released under the GNU Public License
-require_once 'Console/Getopt.php';
+require_once '%%PREFIX%%/share/pear/Console/Getopt.php';
-require_once "Weathermap.class.php";
+require_once "%%DATADIR%%/Weathermap.class.php";
if (!module_checks()) { die ("Quitting: Module checks failed.\n"); }
// $weathermap_debugging=TRUE;
$output="html";
-$configfile="weathermap.conf";
+$configfile="%%DATADIR%%/weathermap.conf";
$htmlfile='';
$imagefile='';
$dumpafter=0;
@@ -25,7 +25,7 @@
// **************************************************************************************
// THIS IS THE ONE LINE IN HERE YOU MIGHT HAVE TO CHANGE!
-$rrdtool="/usr/bin/rrdtool";
+$rrdtool="%%PREFIX%%/bin/rrdtool";
// (on Windows, use / instead of \ in pathnames - c:/rrdtool/bin/rrdtool.exe for example)
// **************************************************************************************

View File

@ -0,0 +1,16 @@
***************************************************************
Now you need to adjust PHP's include_path to contain
`%%DATADIR%%/lib'
For example, insert:
include_path = ".:%%DATADIR%%/lib"
into `%%LOCALBASE%%/etc/php.ini'.
Remember to change the permission of output dir
if you wish to use the web editor interface.
For more general information about the PHP Network Weathermap,
please visit: http://www.network-weathermap.com/
***************************************************************

View File

@ -0,0 +1,4 @@
Weathermap is a network visualisation tool, to take data you already
have and show you an overview of your network in map form.
WWW: http://www.network-weathermap.com/

View File

@ -0,0 +1,181 @@
bin/phpweathermap
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/random-bits/README
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/random-bits/auto-overlib.pl
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/random-bits/bristle.php
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/random-bits/cacti-integrate.php
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/random-bits/cacti-mapper.php
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/random-bits/map-split.php
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/random-bits/suite-1.conf
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/random-bits/suite-1.png
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/random-bits/suite-2.conf
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/random-bits/suite-2.png
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/random-bits
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
%%DATADIR%%/HTML_ImageMap.class.php
%%DATADIR%%/WeatherMap.functions.php
%%DATADIR%%/WeatherMapLink.class.php
%%DATADIR%%/WeatherMapNode.class.php
%%DATADIR%%/Weathermap.class.php
%%DATADIR%%/weathermap.conf
%%DATADIR%%/lib/.htaccess
%%DATADIR%%/lib/datasources/README.txt
%%DATADIR%%/lib/datasources/WeatherMapDataSource_cactihost.php
%%DATADIR%%/lib/datasources/WeatherMapDataSource_cactithold.php
%%DATADIR%%/lib/datasources/WeatherMapDataSource_dbsample.php
%%DATADIR%%/lib/datasources/WeatherMapDataSource_dsstats.php
%%DATADIR%%/lib/datasources/WeatherMapDataSource_external.php
%%DATADIR%%/lib/datasources/WeatherMapDataSource_fping.php
%%DATADIR%%/lib/datasources/WeatherMapDataSource_mrtg.php
%%DATADIR%%/lib/datasources/WeatherMapDataSource_rrd.php
%%DATADIR%%/lib/datasources/WeatherMapDataSource_skeleton.php.txt
%%DATADIR%%/lib/datasources/WeatherMapDataSource_snmp.php
%%DATADIR%%/lib/datasources/WeatherMapDataSource_static.php
%%DATADIR%%/lib/datasources/WeatherMapDataSource_tabfile.php
%%DATADIR%%/lib/datasources/WeatherMapDataSource_time.php
%%DATADIR%%/lib/ds-common.php
%%DATADIR%%/lib/index.php
%%DATADIR%%/lib/poller-common.php
%%DATADIR%%/lib/post/WeatherMapPostProcessorTest.php
%%DATADIR%%/lib/pre/WeatherMapPreProcessorTest.php
%%DATADIR%%/www/docs/example/Gradient_BK_800.png
%%DATADIR%%/www/docs/example/Vera.ttf
%%DATADIR%%/www/docs/example/VeraBI.ttf
%%DATADIR%%/www/docs/example/VeraBd.ttf
%%DATADIR%%/www/docs/example/VeraIt.ttf
%%DATADIR%%/www/docs/example/VeraMoBI.ttf
%%DATADIR%%/www/docs/example/VeraMoBd.ttf
%%DATADIR%%/www/docs/example/VeraMoIt.ttf
%%DATADIR%%/www/docs/example/VeraMono.ttf
%%DATADIR%%/www/docs/example/VeraSe.ttf
%%DATADIR%%/www/docs/example/VeraSeBd.ttf
%%DATADIR%%/www/docs/example/background.png
%%DATADIR%%/www/docs/example/example.conf
%%DATADIR%%/www/docs/example/example.html
%%DATADIR%%/www/docs/example/example.png
%%DATADIR%%/www/docs/example/graph_image.png
%%DATADIR%%/www/docs/example/graph_page.html
%%DATADIR%%/www/docs/example/my_router.png
%%DATADIR%%/www/docs/example/overlib.js
%%DATADIR%%/www/docs/howto.pdf
%%DATADIR%%/www/docs/howto.png
%%DATADIR%%/www/docs/images/arrowstyle-classic.png
%%DATADIR%%/www/docs/images/arrowstyle-compact.png
%%DATADIR%%/www/docs/images/bwstyle-angled.png
%%DATADIR%%/www/docs/images/bwstyle-classic.png
%%DATADIR%%/www/docs/images/cacti_mainscreen.png
%%DATADIR%%/www/docs/images/cacti_maps_manage.png
%%DATADIR%%/www/docs/images/cacti_step1.png
%%DATADIR%%/www/docs/images/cacti_step2.png
%%DATADIR%%/www/docs/images/cacti_user_manage.png
%%DATADIR%%/www/docs/images/cacti_wmap_settings.png
%%DATADIR%%/www/docs/images/commentstyle-center.png
%%DATADIR%%/www/docs/images/commentstyle-edge.png
%%DATADIR%%/www/docs/images/compass-points.png
%%DATADIR%%/www/docs/images/contrast.png
%%DATADIR%%/www/docs/images/font-sizes.png
%%DATADIR%%/www/docs/images/howto-thumb.jpg
%%DATADIR%%/www/docs/images/keystyle-classic.png
%%DATADIR%%/www/docs/images/keystyle-horizontal.png
%%DATADIR%%/www/docs/images/keystyle-inverted.png
%%DATADIR%%/www/docs/images/keystyle-tags.png
%%DATADIR%%/www/docs/images/keystyle-vertical.png
%%DATADIR%%/www/docs/images/labelangle+labeloffset.png
%%DATADIR%%/www/docs/images/link-comments.png
%%DATADIR%%/www/docs/images/linkoffset-defaults.png
%%DATADIR%%/www/docs/images/linkoffset-east50west50.png
%%DATADIR%%/www/docs/images/linkoffset-eastwest.png
%%DATADIR%%/www/docs/images/linkoffset-parallel.png
%%DATADIR%%/www/docs/images/linkoffset-radial.png
%%DATADIR%%/www/docs/images/viastyle-angled.png
%%DATADIR%%/www/docs/images/viastyle-curved.png
%%DATADIR%%/www/docs/images/weathermap-example.png
%%DATADIR%%/www/docs/images/weathermap-mini.png
%%DATADIR%%/www/docs/index.html
%%DATADIR%%/www/docs/pages/advanced.html
%%DATADIR%%/www/docs/pages/cacti-plugin.html
%%DATADIR%%/www/docs/pages/changes.html
%%DATADIR%%/www/docs/pages/cli-reference.html
%%DATADIR%%/www/docs/pages/config-reference.html
%%DATADIR%%/www/docs/pages/editor.html
%%DATADIR%%/www/docs/pages/errorcodes.html
%%DATADIR%%/www/docs/pages/faq.html
%%DATADIR%%/www/docs/pages/install-cacti-editor.html
%%DATADIR%%/www/docs/pages/install-cacti.html
%%DATADIR%%/www/docs/pages/install-cli-editor.html
%%DATADIR%%/www/docs/pages/install-cli.html
%%DATADIR%%/www/docs/pages/main.html
%%DATADIR%%/www/docs/pages/targets.html
%%DATADIR%%/www/docs/pages/upgrading.html
%%DATADIR%%/www/docs/pages/weathermap.css
%%DATADIR%%/www/editor-config.php-dist
%%DATADIR%%/www/editor-resources/jquery-latest.min.js
%%DATADIR%%/www/editor.css
%%DATADIR%%/www/editor.inc.php
%%DATADIR%%/www/editor.js
%%DATADIR%%/www/editor.php
%%DATADIR%%/www/images/Cloud-Filled.png
%%DATADIR%%/www/images/Cloud-line.png
%%DATADIR%%/www/images/Firewall.png
%%DATADIR%%/www/images/HPMini.png
%%DATADIR%%/www/images/Host.png
%%DATADIR%%/www/images/PAD.png
%%DATADIR%%/www/images/Router.png
%%DATADIR%%/www/images/WorkgroupSwitch.png
%%DATADIR%%/www/images/application.png
%%DATADIR%%/www/images/application_side_list.png
%%DATADIR%%/www/images/application_xp_terminal.png
%%DATADIR%%/www/images/background1_950x625_197.jpg
%%DATADIR%%/www/images/blue-ball-64.png
%%DATADIR%%/www/images/blueboard1024.png
%%DATADIR%%/www/images/btn_recalc.png
%%DATADIR%%/www/images/button_editgroups.png
%%DATADIR%%/www/images/button_settings.gif
%%DATADIR%%/www/images/bw_gradient_1024.png
%%DATADIR%%/www/images/comment.png
%%DATADIR%%/www/images/cross.png
%%DATADIR%%/www/images/emoticon_smile.png
%%DATADIR%%/www/images/emoticon_unhappy.png
%%DATADIR%%/www/images/error.png
%%DATADIR%%/www/images/exclamation.png
%%DATADIR%%/www/images/filecabinet.png
%%DATADIR%%/www/images/flag_blue.png
%%DATADIR%%/www/images/flag_green.png
%%DATADIR%%/www/images/flag_orange.png
%%DATADIR%%/www/images/flag_pink.png
%%DATADIR%%/www/images/flag_purple.png
%%DATADIR%%/www/images/flag_yellow.png
%%DATADIR%%/www/images/green-ball-64.png
%%DATADIR%%/www/images/grey-ball-64.png
%%DATADIR%%/www/images/hollow32.png
%%DATADIR%%/www/images/index.php
%%DATADIR%%/www/images/monitor.png
%%DATADIR%%/www/images/page_white.png
%%DATADIR%%/www/images/red-ball-64.png
%%DATADIR%%/www/images/s_tab_weathermap.gif
%%DATADIR%%/www/images/s_tab_weathermap_red.gif
%%DATADIR%%/www/images/tab_weathermap.gif
%%DATADIR%%/www/images/tab_weathermap_red.gif
%%DATADIR%%/www/images/tick.png
%%DATADIR%%/www/images/uk1024.png
%%DATADIR%%/www/images/updown_0.png
%%DATADIR%%/www/images/updown_1.png
%%DATADIR%%/www/images/updown_2.png
%%DATADIR%%/www/images/world.png
%%DATADIR%%/www/images/world_link.png
%%DATADIR%%/www/images/wrench.png
%%DATADIR%%/www/images/wrench_orange.png
%%DATADIR%%/www/images/yellow-ball-64.png
%%DATADIR%%/www/overlib.js
@dirrm %%DATADIR%%/www/images
@dirrm %%DATADIR%%/www/editor-resources
@dirrm %%DATADIR%%/www/docs/pages
@dirrm %%DATADIR%%/www/docs/images
@dirrm %%DATADIR%%/www/docs/example
@dirrm %%DATADIR%%/www/docs
@dirrm %%DATADIR%%/www/configs
@dirrm %%DATADIR%%/www
@dirrm %%DATADIR%%/lib/pre
@dirrm %%DATADIR%%/lib/post
@dirrm %%DATADIR%%/lib/datasources
@dirrm %%DATADIR%%/lib
@dirrm %%DATADIR%%