[73752] trunk/dports/net

and.damore at macports.org and.damore at macports.org
Tue Nov 23 14:45:38 PST 2010


Revision: 73752
          http://trac.macports.org/changeset/73752
Author:   and.damore at macports.org
Date:     2010-11-23 14:45:35 -0800 (Tue, 23 Nov 2010)
Log Message:
-----------
committing xymon-server, closes ticket #26175

Added Paths:
-----------
    trunk/dports/net/xymon-server/
    trunk/dports/net/xymon-server/Portfile
    trunk/dports/net/xymon-server/files/
    trunk/dports/net/xymon-server/files/org.macports.xymon-server.plist
    trunk/dports/net/xymon-server/files/patch-build-Makefile.rules.diff
    trunk/dports/net/xymon-server/files/patch-client-xymonclient-darwin.sh.diff
    trunk/dports/net/xymon-server/files/patch-lib-Makefile.diff

Added: trunk/dports/net/xymon-server/Portfile
===================================================================
--- trunk/dports/net/xymon-server/Portfile	                        (rev 0)
+++ trunk/dports/net/xymon-server/Portfile	2010-11-23 22:45:35 UTC (rev 73752)
@@ -0,0 +1,178 @@
+# -*- 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
+# $Id$
+
+PortSystem              1.0
+
+name                    xymon-server
+set shortname           xymon
+conflicts               xymon
+version                 4.3.0.beta3
+categories              net
+platforms               darwin
+maintainers             free.fr:fclaire
+
+description             Xymon network monitor Server
+
+long_description        Xymon is a system for monitoring of hosts and networks, \
+                        inspired by the Big Brother system. It provides real-time \
+                        monitoring, an easy web-interface, historical data, \
+                        availability reports and performance graphs. \
+                        Xymon was previously known as \"Hobbit\".
+
+homepage                http://www.xymon.com/
+master_sites            sourceforge:${shortname}
+distname                ${shortname}-${version}
+dist_subdir             ${shortname}
+
+checksums               md5 1d400f81ef5a30c8908a452dab7ba7cf \
+                        sha1 45e9957d71edc2dfc94702e40aa81f4efcf5893f \
+                        rmd160 4343c7fd1da4872d0e21066ec567cd90e8078613
+
+depends_lib             port:rrdtool \
+                        port:fping \
+                        port:pcre \
+                        port:libpng \
+                        port:openssl \
+                        port:openldap
+
+patchfiles              patch-build-Makefile.rules.diff \
+                        patch-lib-Makefile.diff \
+                        patch-client-xymonclient-darwin.sh.diff
+
+if {"darwin" == ${os.platform} && ${os.major} > 8} {
+    set xymonuser       _xymon
+} else {
+    set xymonuser       xymon
+}
+set xymongroup          ${xymonuser}
+set xytopdir            ${prefix}/lib/${shortname}
+set xyetcdir            ${xytopdir}/etc
+set xybindir            ${xytopdir}/server/bin
+set xylogdir            ${prefix}/var/log/${shortname}
+set xytmpdir            ${xytopdir}/tmp
+set xyvardir            ${xytopdir}/data
+set xywebdir            ${xytopdir}/web
+set xywwwdir            ${xytopdir}/www
+
+configure.cmd           ./configure.server
+configure.args-append   --rrdinclude ${prefix}/include \
+                        --rrdlib ${prefix}/lib \
+                        --pcreinclude ${prefix}/include \
+                        --pcrelib ${prefix}/lib \
+                        --sslinclude ${prefix}/include \
+                        --ssllib ${prefix}/lib \
+                        --ldapinclude ${prefix}/include \
+                        --ldaplib ${prefix}/lib \
+                        --fping ${prefix}/sbin/fping
+configure.env-append    ENABLESSL=y \
+                        ENABLELDAP=y \
+                        ENABLELDAPSSL=y \
+                        XYMONUSER=${xymonuser} \
+                        USEXYMONPING=n \
+                        XYMONTOPDIR=${xytopdir} \
+                        XYMONHOSTURL=/${shortname} \
+                        CGIDIR=${xytopdir}/cgi-bin \
+                        XYMONCGIURL=/${shortname}-cgi \
+                        SECURECGIDIR=${xytopdir}/cgi-secure \
+                        SECUREXYMONCGIURL=/${shortname}-secgci \
+                        HTTPDGID=_www \
+                        XYMONLOGDIR=${xylogdir} \
+                        XYMONHOSTNAME=localhost \
+                        XYMONHOSTIP=127.0.0.1 \
+                        XYMONHOSTOS=${os.platform} \
+                        MANROOT=${prefix}/share/man \
+                        INSTALLBINDIR=${xytopdir}/server/bin \
+                        INSTALLETCDIR=${xyetcdir} \
+                        INSTALLEXTDIR=${xytopdir}/server/ext \
+                        INSTALLTMPDIR=${xytmpdir} \
+                        INSTALLWEBDIR=${xywebdir} \
+                        INSTALLWWWDIR=${xywwwdir} \
+                        XYMONVAR=${xyvardir}
+
+destroot.env-append     INSTALLROOT=${destroot}
+destroot.keepdirs       ${destroot}${xytopdir} \
+                        ${destroot}${xylogdir} \
+                        ${destroot}${xytmpdir} \
+                        ${destroot}${xyvardir}/acks \
+                        ${destroot}${xyvardir}/data \
+                        ${destroot}${xyvardir}/disabled \
+                        ${destroot}${xyvardir}/hist \
+                        ${destroot}${xyvardir}/histlogs \
+                        ${destroot}${xyvardir}/hostdata \
+                        ${destroot}${xyvardir}/logs \
+                        ${destroot}${xyvardir}/rrd \
+                        ${destroot}${xyvardir} \
+                        ${destroot}${xywebdir} \
+                        ${destroot}${xywwwdir}/html \
+                        ${destroot}${xywwwdir}/rep \
+                        ${destroot}${xywwwdir}/snap \
+                        ${destroot}${xywwwdir}/notes \
+                        ${destroot}${xywwwdir}/wml
+
+pre-destroot {
+    addgroup ${xymongroup}
+    adduser ${xymonuser} gid=[existsgroup ${xymongroup}] realname=Xymon\ User home=${xytopdir} shell=/bin/bash
+}
+
+post-destroot {
+    # Adding own startupitem - xymon needs to be run under ${xymonuser} user
+    xinstall -d ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/
+    xinstall -m 644 ${filespath}/org.macports.${name}.plist ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/
+    # The startup script needs to be adapted to use ${xymonuser} user
+    reinplace s%@XYMONUSER@%${xymonuser}%g ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist
+    reinplace s%@XYMONLAUNCH@%${xybindir}/xymonlaunch%g ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist
+    reinplace s%@XYMONTASKS@%${xyetcdir}/tasks.cfg%g ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist
+    reinplace s%@XYMONSERVER@%${xyetcdir}/xymonserver.cfg%g ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist
+    reinplace s%@XYMONLAUNCHLOG@%${xylogdir}/xymonlaunch.log%g ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist
+    reinplace s%@XYMONLAUNCHPID@%${xylogdir}/xymonlaunch.pid%g ${destroot}${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist
+
+    # Creation of a symbolic link towards startupitem
+    xinstall -d -m 755 ${destroot}/Library/LaunchDaemons
+    ln -sf ${prefix}/etc/LaunchDaemons/org.macports.${name}/org.macports.${name}.plist ${destroot}/Library/LaunchDaemons/
+    # And a link to have the xymon client working
+    ln -sf ${xytmpdir} ${destroot}${xytopdir}/client/
+
+    # Adding a suffix to config files
+    foreach f { alerts.cfg analysis.cfg cgioptions.cfg client-local.cfg columndoc.csv combo.cfg critical.cfg graphs.cfg holidays.cfg \
+                hosts.cfg protocols.cfg rrddefinitions.cfg snmpmibs.cfg tasks.cfg xymon-apache.conf xymonmenu.cfg xymonserver.cfg } {
+        move ${destroot}${xyetcdir}/${f} ${destroot}${xyetcdir}/${f}.${version}
+    }
+}
+
+post-activate {
+    # If not already present we put default config files
+    foreach f { alerts.cfg analysis.cfg cgioptions.cfg client-local.cfg columndoc.csv combo.cfg critical.cfg graphs.cfg holidays.cfg \
+                hosts.cfg protocols.cfg rrddefinitions.cfg snmpmibs.cfg tasks.cfg xymon-apache.conf xymonmenu.cfg xymonserver.cfg } {
+        if {![file exists ${xyetcdir}/${f}]} {
+            file copy ${xyetcdir}/${f}.${version} ${xyetcdir}/${f}
+            system "chown ${xymonuser} ${xyetcdir}/${f}"
+        }
+    }
+}
+
+notes "  *** To complete the Xymon install ***
+
+Run the following commands in your terminal:
+    $ sudo echo \"kern.sysv.shmmni=64\" >> /etc/sysctl.conf
+    $ sudo echo \"kern.sysv.shmseg=12\" >> /etc/sysctl.conf
+    $ sudo mv ${xyetcdir}/xymon-apache.conf /etc/apache2/\[other|sites\]/
+    $ sudo /usr/sbin/apachectl restart
+    $ sudo dscl . -append /Groups/admin GroupMembership ${xymonuser}
+Reboot your system
+Start xymon server:
+    $ sudo launchctl load -w /Library/LaunchDaemons/org.macports.xymon-server.plist
+Open \"http://localhost/xymon/\" in your server's browser
+
+Full install instructions here: http://trac.macports.org/wiki/howto/SetupXymonServer
+
+"
+
+use_parallel_build  no
+
+livecheck.type      regex
+livecheck.url       http://sourceforge.net/projects/${shortname}/files/
+livecheck.regex     ${shortname}-(\[0-9.\]+)\\.tar.gz
+
+variant snmp description {add integrated SNMP support} {
+    configure.env-append    SNMP=1
+}


Property changes on: trunk/dports/net/xymon-server/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/net/xymon-server/files/org.macports.xymon-server.plist
===================================================================
--- trunk/dports/net/xymon-server/files/org.macports.xymon-server.plist	                        (rev 0)
+++ trunk/dports/net/xymon-server/files/org.macports.xymon-server.plist	2010-11-23 22:45:35 UTC (rev 73752)
@@ -0,0 +1,21 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
+"http://www.apple.com/DTDs/PropertyList-1.0.dtd" >
+<plist version='1.0'>
+<dict>
+<key>Label</key><string>org.macports.xymon-server</string>
+<key>UserName</key>
+<string>@XYMONUSER@</string>
+<key>ProgramArguments</key>
+<array>
+	<string>@XYMONLAUNCH@</string>
+	<string>--config=@XYMONTASKS@</string>
+	<string>--env=@XYMONSERVER@</string>
+	<string>--log=@XYMONLAUNCHLOG@</string>
+	<string>--pidfile=@XYMONLAUNCHPID@</string>
+</array>
+<key>Debug</key><false/>
+<key>Disabled</key><true/>
+<key>RunAtLoad</key><true/>
+</dict>
+</plist>

Added: trunk/dports/net/xymon-server/files/patch-build-Makefile.rules.diff
===================================================================
--- trunk/dports/net/xymon-server/files/patch-build-Makefile.rules.diff	                        (rev 0)
+++ trunk/dports/net/xymon-server/files/patch-build-Makefile.rules.diff	2010-11-23 22:45:35 UTC (rev 73752)
@@ -0,0 +1,11 @@
+--- build/Makefile.rules.orig	2010-04-08 06:26:27.000000000 +0200
++++ build/Makefile.rules	2010-04-08 06:26:38.000000000 +0200
+@@ -8,7 +8,7 @@
+ # Build targets
+ #####################
+ 
+-CFLAGS += -I. -I$(BUILDTOPDIR)/include
++CFLAGS += -I$(BUILDTOPDIR)/include
+ 
+ ifeq ($(CLIENTONLY),yes)
+ 	BUILDTARGETS = client

Added: trunk/dports/net/xymon-server/files/patch-client-xymonclient-darwin.sh.diff
===================================================================
--- trunk/dports/net/xymon-server/files/patch-client-xymonclient-darwin.sh.diff	                        (rev 0)
+++ trunk/dports/net/xymon-server/files/patch-client-xymonclient-darwin.sh.diff	2010-11-23 22:45:35 UTC (rev 73752)
@@ -0,0 +1,18 @@
+--- client/xymonclient-darwin.sh.orig	2010-08-06 11:29:52.000000000 +0200
++++ client/xymonclient-darwin.sh	2010-08-06 11:57:09.000000000 +0200
+@@ -44,12 +44,12 @@
+ ps -ax -ww -o pid,ppid,user,start,state,pri,pcpu,time,pmem,rss,vsz,command
+ 
+ # $TOP must be set, the install utility should do that for us if it exists.
+-if test "$TOP" != ""
++if test "$TOP" != "" -a "$AWK" != ""
+ then
+-    if test -x "$TOP"
++    if test -x "$TOP" -a -x "$AWK"
+     then
+         echo "[top]"
+-	$TOP -l 1 -n 20
++	$TOP -l 2 -n 20 -o cpu | $AWK '/^Processes:/ {toprun++} toprun == 2'
+     fi
+ fi
+ 

Added: trunk/dports/net/xymon-server/files/patch-lib-Makefile.diff
===================================================================
--- trunk/dports/net/xymon-server/files/patch-lib-Makefile.diff	                        (rev 0)
+++ trunk/dports/net/xymon-server/files/patch-lib-Makefile.diff	2010-11-23 22:45:35 UTC (rev 73752)
@@ -0,0 +1,11 @@
+--- lib/Makefile.orig	2010-04-08 06:28:03.000000000 +0200
++++ lib/Makefile	2010-04-08 06:28:13.000000000 +0200
+@@ -9,7 +9,7 @@
+ endif
+ 
+ 
+-CFLAGS += -I. -I../include 
++CFLAGS += -I../include 
+ 
+ all: test-endianness libbbgen.a hobbitclient.a loadhosts stackio availability md5 sha1 rmd160 locator
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101123/7360e323/attachment-0001.html>


More information about the macports-changes mailing list