source: trunk/dports/net/xymon/Portfile @ 75159

Last change on this file since 75159 was 75159, checked in by rmstonecipher@…, 7 years ago

graphics/libpng upgraded version from 1.2.44 to 1.4.5 per ticket #23125, increased revision on all ports directly dependent upon libpng12.dylib

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