source: trunk/dports/net/xymon-server/Portfile

Last change on this file was 146517, checked in by raimue@…, 19 months ago

Mass rev-bump dependents of port openssl due to ABI change

Disabling SSLv2 in r146162 changed the ABI of the library, leading to loading
errors for binaries with references to SSLv2 symbols.

https://lists.macosforge.org/pipermail/macports-dev/2016-March/032531.html

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 8.5 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 146517 2016-03-10 17:49:28Z ryandesign@macports.org $
3
4PortSystem              1.0
5
6name                    xymon-server
7set shortname           xymon
8conflicts               xymon-client
9epoch                   1
10version                 4.3.26
11revision                1
12categories              net
13platforms               darwin
14license                 {GPL-2 OpenSSLException}
15maintainers             free.fr:fclaire openmaintainer
16
17description             Xymon network monitor Server
18
19long_description        Xymon is a system for monitoring of hosts and networks, \
20                        inspired by the Big Brother system. It provides real-time \
21                        monitoring, an easy web-interface, historical data, \
22                        availability reports and performance graphs. \
23                        Xymon was previously known as \"Hobbit\".
24
25homepage                http://www.xymon.com/
26master_sites            sourceforge:project/xymon/Xymon/${version}
27distname                ${shortname}-${version}
28dist_subdir             ${shortname}
29
30checksums               sha256  cbd0586c77378c92d9866497c8e5ddc64ec9973e4078e44860f572258f8521c5 \
31                        rmd160  c43ac804be298dca61d0f310bd599caea0b804de
32
33depends_lib             port:rrdtool \
34                        port:fping \
35                        port:pcre \
36                        port:libpng \
37                        path:lib/libssl.dylib:openssl \
38                        port:openldap
39
40universal_variant       no
41
42if {${os.platform} eq "darwin" && ${os.major} > 8} {
43    set xymonuser       _xymon
44} else {
45    set xymonuser       xymon
46}
47set xymongroup          ${xymonuser}
48set xytopdir            ${prefix}/lib/${shortname}
49set xyetcdir            ${xytopdir}/etc
50set xybindir            ${xytopdir}/server/bin
51set xylogdir            ${prefix}/var/log/${shortname}
52set xytmpdir            ${xytopdir}/tmp
53set xyvardir            ${xytopdir}/data
54set xywebdir            ${xytopdir}/web
55set xywwwdir            ${xytopdir}/www
56
57configure.cmd           ./configure.server
58configure.args-append   --rrdinclude ${prefix}/include \
59                        --rrdlib ${prefix}/lib \
60                        --pcreinclude ${prefix}/include \
61                        --pcrelib ${prefix}/lib \
62                        --sslinclude ${prefix}/include \
63                        --ssllib ${prefix}/lib \
64                        --ldapinclude ${prefix}/include \
65                        --ldaplib ${prefix}/lib \
66                        --fping ${prefix}/sbin/fping
67configure.env-append    ENABLESSL=y \
68                        ENABLELDAP=y \
69                        ENABLELDAPSSL=y \
70                        XYMONUSER=${xymonuser} \
71                        USEXYMONPING=n \
72                        XYMONTOPDIR=${xytopdir} \
73                        XYMONHOSTURL=/${shortname} \
74                        CGIDIR=${xytopdir}/cgi-bin \
75                        XYMONCGIURL=/${shortname}-cgi \
76                        SECURECGIDIR=${xytopdir}/cgi-secure \
77                        SECUREXYMONCGIURL=/${shortname}-secgci \
78                        HTTPDGID=_www \
79                        XYMONLOGDIR=${xylogdir} \
80                        XYMONHOSTNAME=localhost \
81                        XYMONHOSTIP=127.0.0.1 \
82                        XYMONHOSTOS=${os.platform} \
83                        MANROOT=${prefix}/share/man \
84                        INSTALLBINDIR=${xytopdir}/server/bin \
85                        INSTALLETCDIR=${xyetcdir} \
86                        INSTALLEXTDIR=${xytopdir}/server/ext \
87                        INSTALLTMPDIR=${xytmpdir} \
88                        INSTALLWEBDIR=${xywebdir} \
89                        INSTALLWWWDIR=${xywwwdir} \
90                        XYMONVAR=${xyvardir}
91
92destroot.env-append     INSTALLROOT=${destroot}
93destroot.keepdirs       ${destroot}${xytopdir} \
94                        ${destroot}${xylogdir} \
95                        ${destroot}${xytmpdir} \
96                        ${destroot}${xyvardir}/acks \
97                        ${destroot}${xyvardir}/data \
98                        ${destroot}${xyvardir}/disabled \
99                        ${destroot}${xyvardir}/hist \
100                        ${destroot}${xyvardir}/histlogs \
101                        ${destroot}${xyvardir}/hostdata \
102                        ${destroot}${xyvardir}/logs \
103                        ${destroot}${xyvardir}/rrd \
104                        ${destroot}${xyvardir} \
105                        ${destroot}${xywebdir} \
106                        ${destroot}${xywwwdir}/html \
107                        ${destroot}${xywwwdir}/rep \
108                        ${destroot}${xywwwdir}/snap \
109                        ${destroot}${xywwwdir}/notes \
110                        ${destroot}${xywwwdir}/wml
111
112add_users ${xymonuser} group=${xymongroup} realname=Xymon\ User home=${xytopdir} shell=/bin/bash
113
114post-destroot {
115    # Adding own startupitem - xymon needs to be run under ${xymonuser} user
116    xinstall -d ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/
117    xinstall -m 644 ${filespath}/org.macports.${name}.plist ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/
118    # The startup script needs to be adapted to use ${xymonuser} user
119    reinplace s%@XYMONUSER@%${xymonuser}%g ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist
120    reinplace s%@XYMONLAUNCH@%${xybindir}/xymonlaunch%g ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist
121    reinplace s%@XYMONTASKS@%${xyetcdir}/tasks.cfg%g ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist
122    reinplace s%@XYMONSERVER@%${xyetcdir}/xymonserver.cfg%g ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist
123    reinplace s%@XYMONLAUNCHLOG@%${xylogdir}/xymonlaunch.log%g ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist
124    reinplace s%@XYMONLAUNCHPID@%${xylogdir}/xymonlaunch.pid%g ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist
125
126    # Creation of a symbolic link towards startupitem
127    xinstall -d -m 755 ${destroot}/Library/LaunchDaemons
128    ln -sf ${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist ${destroot}/Library/LaunchDaemons/
129    # And a link to have the xymon client working
130    ln -sf ${xytmpdir} ${destroot}${xytopdir}/client/
131
132    # Adding a suffix to config files
133    foreach f { alerts.cfg analysis.cfg cgioptions.cfg client-local.cfg columndoc.csv combo.cfg critical.cfg graphs.cfg holidays.cfg \
134                hosts.cfg protocols.cfg rrddefinitions.cfg snmpmibs.cfg tasks.cfg xymon-apache.conf xymonmenu.cfg xymonserver.cfg } {
135        move ${destroot}${xyetcdir}/${f} ${destroot}${xyetcdir}/${f}.${version}
136    }
137}
138
139post-activate {
140    # If not already present we put default config files
141    foreach f { alerts.cfg analysis.cfg cgioptions.cfg client-local.cfg columndoc.csv combo.cfg critical.cfg graphs.cfg holidays.cfg \
142                hosts.cfg protocols.cfg rrddefinitions.cfg snmpmibs.cfg tasks.cfg xymon-apache.conf xymonmenu.cfg xymonserver.cfg } {
143        if {![file exists ${xyetcdir}/${f}]} {
144            file copy ${xyetcdir}/${f}.${version} ${xyetcdir}/${f}
145            system "chown ${xymonuser} ${xyetcdir}/${f}"
146        }
147    }
148}
149
150notes "  *** To complete the Xymon install ***
151
152Run the following commands in your terminal:
153    $ sudo bash -c \"echo kern.sysv.shmmax=16777216 >> /etc/sysctl.conf\"
154    $ sudo bash -c \"echo kern.sysv.shmmni=128 >> /etc/sysctl.conf\"
155    $ sudo bash -c \"echo kern.sysv.shmseg=32 >> /etc/sysctl.conf\"
156    $ sudo bash -c \"echo kern.sysv.shmall=4096 >> /etc/sysctl.conf\"
157    $ sudo mv ${xyetcdir}/xymon-apache.conf /etc/apache2/\[other|sites\]/
158    $ sudo /usr/sbin/apachectl restart
159    $ sudo dscl . -append /Groups/admin GroupMembership ${xymonuser}
160Make sure the following line is uncommented in your /etc/apache2/httpd.conf:
161LoadModule cgi_module libexec/apache2/mod_cgi.so
162Reboot your system
163Start xymon server:
164    $ sudo launchctl load -w /Library/LaunchDaemons/org.macports.xymon-server.plist
165Open \"http://localhost/xymon/\" in your server's browser
166
167Full install instructions here: http://trac.macports.org/wiki/howto/SetupXymonServer
168
169"
170
171use_parallel_build  no
172
173livecheck.type      regex
174livecheck.url       http://sourceforge.net/projects/${shortname}/files/
175livecheck.regex     ${shortname}-(\[0-9.\]+)\\.tar.gz
176
177variant snmp description {add integrated SNMP support} {
178    configure.env-append    SNMP=1
179}
Note: See TracBrowser for help on using the repository browser.