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 xymon |
---|
7 | conflicts xymon-server |
---|
8 | version 4.3.0.beta3 |
---|
9 | categories net |
---|
10 | platforms darwin |
---|
11 | maintainers free.fr:fclaire |
---|
12 | |
---|
13 | description Xymon network monitor Client |
---|
14 | |
---|
15 | long_description Xymon is a system for monitoring of hosts and networks, \ |
---|
16 | inspired by the Big Brother system. It provides real-time \ |
---|
17 | monitoring, an easy web-interface, historical data, \ |
---|
18 | availability reports and performance graphs. \ |
---|
19 | Xymon was previously known as \"Hobbit\". |
---|
20 | |
---|
21 | homepage http://www.xymon.com/ |
---|
22 | master_sites sourceforge |
---|
23 | |
---|
24 | checksums md5 1d400f81ef5a30c8908a452dab7ba7cf \ |
---|
25 | sha1 45e9957d71edc2dfc94702e40aa81f4efcf5893f \ |
---|
26 | rmd160 4343c7fd1da4872d0e21066ec567cd90e8078613 |
---|
27 | |
---|
28 | depends_lib port:rrdtool \ |
---|
29 | port:fping \ |
---|
30 | port:pcre \ |
---|
31 | port:libpng \ |
---|
32 | port:openssl \ |
---|
33 | port:openldap |
---|
34 | |
---|
35 | patchfiles patch-build-Makefile.rules.diff \ |
---|
36 | patch-lib-Makefile.diff \ |
---|
37 | patch-client-xymonclient-darwin.sh.diff |
---|
38 | |
---|
39 | if {"darwin" == ${os.platform} && ${os.major} > 8} { |
---|
40 | set xymonuser _xymon |
---|
41 | } else { |
---|
42 | set xymonuser xymon |
---|
43 | } |
---|
44 | set xymongroup ${xymonuser} |
---|
45 | set xytopdir ${prefix}/lib/${name} |
---|
46 | set xyetcdir ${xytopdir}/client/etc |
---|
47 | set xylogdir ${xytopdir}/client/logs |
---|
48 | set xytmpdir ${xytopdir}/client/tmp |
---|
49 | set xyvardir ${xytopdir}/data |
---|
50 | set xywebdir ${xytopdir}/web |
---|
51 | set xywwwdir ${xytopdir}/www |
---|
52 | |
---|
53 | configure.cmd ./configure.client |
---|
54 | configure.args-append --rrdinclude ${prefix}/include \ |
---|
55 | --rrdlib ${prefix}/lib \ |
---|
56 | --pcreinclude ${prefix}/include \ |
---|
57 | --pcrelib ${prefix}/lib \ |
---|
58 | --sslinclude ${prefix}/include \ |
---|
59 | --ssllib ${prefix}/lib \ |
---|
60 | --ldapinclude ${prefix}/include \ |
---|
61 | --ldaplib ${prefix}/lib \ |
---|
62 | --fping ${prefix}/sbin/fping |
---|
63 | configure.env-append ENABLESSL=y \ |
---|
64 | XYMONUSER=${xymonuser} \ |
---|
65 | XYMONTOPDIR=${xytopdir} \ |
---|
66 | XYMONHOSTIP=127.0.0.1 \ |
---|
67 | XYMONHOSTOS=${os.platform} \ |
---|
68 | MANROOT=${prefix}/share/man \ |
---|
69 | INSTALLBINDIR=${xytopdir}/client/bin \ |
---|
70 | INSTALLETCDIR=${xyetcdir} \ |
---|
71 | INSTALLEXTDIR=${xytopdir}/client/ext \ |
---|
72 | INSTALLTMPDIR=${xytmpdir} \ |
---|
73 | INSTALLWEBDIR=${xywebdir} \ |
---|
74 | INSTALLWWWDIR=${xywwwdir} \ |
---|
75 | XYMONVAR=${xyvardir} |
---|
76 | |
---|
77 | destroot.env-append INSTALLROOT=${destroot} |
---|
78 | destroot.keepdirs ${destroot}${xytopdir} \ |
---|
79 | ${destroot}${xylogdir} \ |
---|
80 | ${destroot}${xytmpdir} \ |
---|
81 | ${destroot}${xyvardir}/logs \ |
---|
82 | ${destroot}${xyvardir} \ |
---|
83 | ${destroot}${xywebdir} |
---|
84 | |
---|
85 | startupitem.create yes |
---|
86 | startupitem.start "sudo su ${xymonuser} -c \"${xytopdir}/client/runclient.sh start\"" |
---|
87 | startupitem.stop "sudo su ${xymonuser} -c \"${xytopdir}/client/runclient.sh stop\"" |
---|
88 | startupitem.restart "sudo su ${xymonuser} -c \"${xytopdir}/client/runclient.sh restart\"" |
---|
89 | #startupitem.pidfile auto ${xylogdir}/clientlaunch.*.pid |
---|
90 | startupitem.pidfile none |
---|
91 | |
---|
92 | pre-destroot { |
---|
93 | addgroup ${xymongroup} |
---|
94 | adduser ${xymonuser} gid=[existsgroup ${xymongroup}] realname=Xymon\ User home=${xytopdir} shell=/bin/bash |
---|
95 | } |
---|
96 | |
---|
97 | post-destroot { |
---|
98 | xinstall -d -o ${xymonuser} -g ${xymongroup} ${destroot}${xylogdir} |
---|
99 | xinstall -d -o ${xymonuser} -g ${xymongroup} ${destroot}${xytmpdir} |
---|
100 | # Adding a suffix to config files |
---|
101 | foreach f { clientlaunch.cfg localclient.cfg xymonclient.cfg } { |
---|
102 | move ${destroot}${xyetcdir}/${f} ${destroot}${xyetcdir}/${f}.${version} |
---|
103 | } |
---|
104 | } |
---|
105 | |
---|
106 | post-activate { |
---|
107 | # If not already present we put default config files |
---|
108 | foreach f { clientlaunch.cfg localclient.cfg xymonclient.cfg } { |
---|
109 | if {![file exists ${xyetcdir}/${f}]} { |
---|
110 | file copy ${xyetcdir}/${f}.${version} ${xyetcdir}/${f} |
---|
111 | } |
---|
112 | } |
---|
113 | } |
---|
114 | |
---|
115 | notes "\nSet your Xymon server's IP address with the following command: |
---|
116 | $ sudo vi ${xyetcdir}/xymonclient.cfg |
---|
117 | |
---|
118 | If you wish your xymon client to report logfiles to your xymon server |
---|
119 | you need to add the user ${xymonuser} to the admin group like this: |
---|
120 | $ sudo dscl . -append /Groups/admin GroupMembership ${xymonuser} |
---|
121 | |
---|
122 | You can start,stop and restart the xymon client with: |
---|
123 | $ sudo -u ${xymonuser} ${xytopdir}/client/runclient.sh \[start|stop|restart\] |
---|
124 | " |
---|
125 | |
---|
126 | use_parallel_build no |
---|
127 | |
---|
128 | livecheck.type regex |
---|
129 | livecheck.url http://sourceforge.net/projects/${name}/files/ |
---|
130 | livecheck.regex ${name}-(\[0-9.\]+)\\.tar.gz |
---|
131 | |
---|