source: trunk/dports/net/network-weathermap/Portfile @ 37929

Last change on this file since 37929 was 37929, checked in by ryandesign@…, 12 years ago

Set svn:keywords to Id on all portfiles per current guidelines

  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1# $Id: Portfile 37929 2008-06-29 22:28:34Z ryandesign@macports.org $
2
3PortSystem      1.0
4
5name                    network-weathermap
6version                 0.95b
7revision                1
8categories              net
9maintainers             markd
10platforms               darwin
11
12description             Weathermap is a network visualisation tool, to take graphs you \
13                        already have and display an overview of your network as a map. \
14                        It supports RRD, MRTG (RRD and old log-format), and tab-delimited \
15                        text files. Other sources are via plugins or external scripts.
16
17long_description        ${description}
18
19homepage                http://www.network-weathermap.com/
20master_sites            http://www.network-weathermap.com/files
21
22use_zip                 yes
23distfiles               php-weathermap-${version}${extract.suffix}
24checksums               md5 6481970ad971dfe659eed535b440e678
25worksrcdir              weathermap
26
27depends_lib             port:cacti
28
29use_configure   no
30build {}
31
32set cactidir ${prefix}/share/cacti
33set pluginsdir ${cactidir}/plugins
34
35variant plugins description {Triggers plugins variant when installing Cacti} {}
36variant_set plugins
37
38post-patch {
39# Set the rrdtool & php paths to point to the MacPorts versions
40        reinplace "s|/usr/local/|/opt/local/|g" \
41                ${worksrcpath}/weathermap \
42                ${worksrcpath}/weathermap-cacti-rebuild.php
43}
44
45destroot {
46        file mkdir ${destroot}${pluginsdir}/weathermap
47        system "cp -R ${worksrcpath}/* ${destroot}${pluginsdir}/weathermap"
48
49        system "chown -R www:www ${destroot}${pluginsdir}/weathermap/"
50}
51
52post-activate {
53
54ui_msg "\n **** To complete the Network Weather Map installation ****
55
56To complete the Network Weather Map installation follow the steps below.  Read the documentation
57at http://www.cacti.net/documentation.php for operational instructions.
58
59
601) Set the PHP path in ${pluginsdir}/weathermap to point to your PHP binary
61
62
632) Set Network Weather Map permissions to match the Cacti user permissions
64   sudo chown -R <cacti-user>:<cacti-group> ${prefix}/share/${pluginsdir}/weathermap
65
66
673) Import the PA schema.
68        cd ${cactidir}
69        sudo cat ${cactidir}/pa.sql | mysql5 -u root -p cacti (cacti is the db name)
70
71
724) Edit ${cactidir}/include/global.php - add an entry to load the weathermap plugin as shown:
73
74        \$plugins = array();
75        \$plugins[] = 'weathermap';
76
77
785) Rename & edit the Network Weathermap Editor's config file
79        cd ${pluginsdir}/weathermap
80        cp editor-config.php-dist editor-config.php
81        nano editor-config.php
82
83
846) Set the editor-config.php variables as shown:
85
86        cacti_base = '${cactidir}';
87        \$cacti_url = \"http://example.com/cacti/\";
88
89
907) Login to the Cacti interface and enable the Network Weather Map plugin; this
91   creates a top-level tab for the plugin in the Cacti interface.
92        Console -> User Management  (select a Cacti user and check the 'View Weathermaps' checkboxes)
93
94\n"
95
96}
Note: See TracBrowser for help on using the repository browser.