[37036] trunk/dports/net

markd at macports.org markd at macports.org
Fri May 23 18:10:22 PDT 2008


Revision: 37036
          http://trac.macosforge.org/projects/macports/changeset/37036
Author:   markd at macports.org
Date:     2008-05-23 18:10:21 -0700 (Fri, 23 May 2008)

Log Message:
-----------
New port.

Added Paths:
-----------
    trunk/dports/net/network-weathermap/
    trunk/dports/net/network-weathermap/Portfile

Added: trunk/dports/net/network-weathermap/Portfile
===================================================================
--- trunk/dports/net/network-weathermap/Portfile	                        (rev 0)
+++ trunk/dports/net/network-weathermap/Portfile	2008-05-24 01:10:21 UTC (rev 37036)
@@ -0,0 +1,101 @@
+# $Id: Portfile 34453 2008-02-25 18:46:00Z markd at macports.org $
+
+PortSystem	1.0
+
+name			network-weathermap
+version			0.95b
+categories		net
+maintainers		markd
+platforms		darwin
+
+description		Weathermap is a network visualisation tool, to take graphs you \
+                        already have and display an overview of your network as a map. \
+			It supports RRD, MRTG (RRD and old log-format), and tab-delimited \
+                        text files. Other sources are via plugins or external scripts.
+
+long_description	${description}
+
+homepage		http://www.network-weathermap.com/
+master_sites		http://www.network-weathermap.com/files
+
+use_zip			yes
+distfiles		php-weathermap-${version}${extract.suffix}
+checksums		md5 6481970ad971dfe659eed535b440e678
+worksrcdir		weathermap
+
+depends_lib		port:cacti
+
+use_configure   no
+build {}
+
+set cactidir ${prefix}/share/cacti
+set pluginsdir ${cactidir}/plugins
+
+variant plugins description {Triggers plugins variant when installing Cacti} {}
+variant_set plugins
+
+post-patch {
+# Set the rrdtool & php paths to point to the MacPorts versions
+	reinplace "s|/usr/local/|/opt/local/|g" \
+		${worksrcpath}/weathermap \
+		${worksrcpath}/weathermap-cacti-rebuild.php
+}
+
+destroot {
+	file mkdir ${destroot}${pluginsdir}
+	system "cp -R ${worksrcpath}/* ${destroot}${pluginsdir}"
+
+	system "chown -R www:www ${destroot}${pluginsdir}"
+
+        file rename ${destroot}${pluginsdir}/index.php \
+		${destroot}${pluginsdir}/index.php.weathermap
+}
+
+post-activate {
+
+ui_msg "\n **** To complete the Network Weather Map installation ****
+
+To complete the Network Weather Map installation follow the steps below.  Read the documentation
+at http://www.cacti.net/documentation.php for operational instructions.
+
+
+1) Set the PHP path in ${pluginsdir}/weathermap to point to your PHP binary
+
+
+2) Set Network Weather Map permissions to match the Cacti user permissions
+   sudo chown -R <cacti-user>:<cacti-group> ${prefix}/share/${pluginsdir}/weathermap
+
+
+3) Import the PA schema.
+	cd ${cactidir}
+	sudo cat ${cactidir}/pa.sql | mysql5 -u root -p cacti (cacti is the db name)
+
+
+4) Edit ${cactidir}/include/global.php - modify the url_path to reflect Cacti's default
+   URL and add an entry to load the weathermap plugin as shown:
+
+	\$config\['url_path'\] = '/cacti/';
+
+	\$plugins = array();
+	\$plugins[] = 'weathermap';
+
+
+5) Rename & edit the Network Weathermap Editor's config file
+	cd ${pluginsdir}/weathermap
+	cp editor-config.php-dist editor-config.php
+	nano editor-config.php
+
+
+6) Set the editor-config.php variables as shown:
+
+	cacti_base = '${cactidir}';
+	\$cacti_url = \"http://example.com/cacti/\";
+
+
+7) Login to the Cacti interface and enable the Network Weather Map plugin; this
+   creates a top-level tab for the plugin in the Cacti interface.
+        Console -> User Management  (select a Cacti user and check the 'View Weathermaps' checkboxes)
+
+\n"
+
+}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080523/3af8d57d/attachment-0001.htm 


More information about the macports-changes mailing list