1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name munin |
---|
7 | version 1.2.6 |
---|
8 | categories net |
---|
9 | maintainers gmail.com:adambyrtek |
---|
10 | platforms darwin |
---|
11 | description Extensible system monitoring tool |
---|
12 | |
---|
13 | long_description Munin the monitoring tool surveys all your computers \ |
---|
14 | and remembers what it saw. It presents all the \ |
---|
15 | information in graphs through a web interface. Its \ |
---|
16 | emphasis is on plug and play capabilities. Using Munin \ |
---|
17 | you can easily monitor the performance of your \ |
---|
18 | computers, networks, SANs, applications, weather \ |
---|
19 | measurements and whatever comes to mind. \ |
---|
20 | \ |
---|
21 | Note: By default only Munin node is installed. To \ |
---|
22 | install the Munin server that gathers data from \ |
---|
23 | existing nodes and generates graphs please enable the \ |
---|
24 | server variant. |
---|
25 | |
---|
26 | homepage http://munin.projects.linpro.no/ |
---|
27 | master_sites sourceforge |
---|
28 | distname ${name}_${version} |
---|
29 | worksrcdir ${name}-${version} |
---|
30 | checksums md5 45f84d58f80642ce914f147232f0d396 \ |
---|
31 | sha1 bdc6d1767df1ea618071d76f0c4525dda2ea33d9 \ |
---|
32 | rmd160 1fe38f8da3b2c88b38d56eb86f7b584c7fded962 |
---|
33 | depends_lib port:perl5 port:p5-net-server |
---|
34 | |
---|
35 | use_configure no |
---|
36 | patchfiles patch-Makefile.config patch-munin-node.conf.in |
---|
37 | build.target build |
---|
38 | build.args PREFIX=${prefix} \ |
---|
39 | CONFDIR=${prefix}/etc/munin \ |
---|
40 | DBDIR=${prefix}/var/munin \ |
---|
41 | LOGDIR=${prefix}/var/log/munin \ |
---|
42 | STATEDIR=${prefix}/var/run/munin \ |
---|
43 | MANDIR=${prefix}/share/man \ |
---|
44 | DOCDIR=${prefix}/share/doc/munin \ |
---|
45 | LIBDIR=${prefix}/lib/munin \ |
---|
46 | HTMLDIR=${prefix}/www/munin \ |
---|
47 | CGIDIR=${prefix}/www/cgi-bin \ |
---|
48 | PERL=${prefix}/bin/perl |
---|
49 | destroot.args PREFIX=${destroot}${prefix} \ |
---|
50 | CONFDIR=${destroot}${prefix}/etc/munin \ |
---|
51 | DBDIR=${destroot}${prefix}/var/munin \ |
---|
52 | LOGDIR=${destroot}${prefix}/var/log/munin \ |
---|
53 | STATEDIR=${destroot}${prefix}/var/run \ |
---|
54 | MANDIR=${destroot}${prefix}/share/man \ |
---|
55 | DOCDIR=${destroot}${prefix}/share/doc/munin \ |
---|
56 | LIBDIR=${destroot}${prefix}/lib/munin \ |
---|
57 | HTMLDIR=${destroot}${prefix}/www/munin \ |
---|
58 | CGIDIR=${destroot}${prefix}/www/cgi-bin \ |
---|
59 | PERL=${prefix}/bin/perl |
---|
60 | destroot.keepdirs ${destroot}${prefix}/var/log/munin \ |
---|
61 | ${destroot}${prefix}/var/run/munin \ |
---|
62 | ${destroot}${prefix}/etc/munin/plugins \ |
---|
63 | ${destroot}${prefix}/var/munin \ |
---|
64 | ${destroot}${prefix}/www/munin |
---|
65 | destroot.target install-node install-node-plugins install-doc install-man |
---|
66 | |
---|
67 | startupitem.create yes |
---|
68 | startupitem.name munin-node |
---|
69 | startupitem.start "${prefix}/sbin/munin-node" |
---|
70 | startupitem.stop "kill `cat ${prefix}/var/run/munin/munin-node.pid`" |
---|
71 | |
---|
72 | variant server description {Install Munin server} { |
---|
73 | depends_lib-append port:rrdtool port:p5-html-template |
---|
74 | destroot.target-append install-main |
---|
75 | } |
---|
76 | |
---|
77 | pre-destroot { |
---|
78 | # Create munin user and group |
---|
79 | addgroup munin |
---|
80 | adduser munin gid=[existsgroup munin] |
---|
81 | } |
---|
82 | post-destroot { |
---|
83 | # State directory should be owned by munin |
---|
84 | xinstall -d -o munin ${destroot}${prefix}/var/run/munin |
---|
85 | |
---|
86 | if { [variant_isset server] } { |
---|
87 | # Create and symlink launchd item for munin-cron |
---|
88 | xinstall -d ${destroot}${prefix}/etc/LaunchDaemons/org.macports.munin-cron |
---|
89 | file copy ${portpath}/files/org.macports.munin-cron.plist.in \ |
---|
90 | ${destroot}${prefix}/etc/LaunchDaemons/org.macports.munin-cron/org.macports.munin-cron.plist |
---|
91 | reinplace s|@PREFIX@|${prefix}|g ${destroot}${prefix}/etc/LaunchDaemons/org.macports.munin-cron/org.macports.munin-cron.plist |
---|
92 | |
---|
93 | xinstall -d ${destroot}/Library/LaunchDaemons |
---|
94 | ln -s ${prefix}/etc/LaunchDaemons/org.macports.munin-cron/org.macports.munin-cron.plist \ |
---|
95 | ${destroot}/Library/LaunchDaemons/org.macports.munin-cron.plist |
---|
96 | |
---|
97 | ui_msg "###########################################################" |
---|
98 | ui_msg "# A startup item has been generated that will cause the" |
---|
99 | ui_msg "# Munin server to fetch data from all nodes every 5 mins." |
---|
100 | ui_msg "# It is disabled by default, please execute the following" |
---|
101 | ui_msg "# command to enable:" |
---|
102 | ui_msg "#" |
---|
103 | ui_msg "# sudo launchctl load -w /Library/LaunchDaemons/org.macports.munin-cron.plist" |
---|
104 | ui_msg "###########################################################" |
---|
105 | } |
---|
106 | } |
---|
107 | post-install { |
---|
108 | ui_msg "To detect supported Munin plugins please use the following command" |
---|
109 | ui_msg "$ sudo munin-node-configure --suggest --shell | sh" |
---|
110 | } |
---|