[73753] trunk/dports/net

and.damore at macports.org and.damore at macports.org
Tue Nov 23 14:46:35 PST 2010


Revision: 73753
          http://trac.macports.org/changeset/73753
Author:   and.damore at macports.org
Date:     2010-11-23 14:46:30 -0800 (Tue, 23 Nov 2010)
Log Message:
-----------
committing xymon, closes ticket #26174

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

Added: trunk/dports/net/xymon/Portfile
===================================================================
--- trunk/dports/net/xymon/Portfile	                        (rev 0)
+++ trunk/dports/net/xymon/Portfile	2010-11-23 22:46:30 UTC (rev 73753)
@@ -0,0 +1,131 @@
+# -*- 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
+conflicts               xymon-server
+version                 4.3.0.beta3
+categories              net
+platforms               darwin
+maintainers             free.fr:fclaire
+
+description             Xymon network monitor Client
+
+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
+
+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/${name}
+set xyetcdir            ${xytopdir}/client/etc
+set xylogdir            ${xytopdir}/client/logs
+set xytmpdir            ${xytopdir}/client/tmp
+set xyvardir            ${xytopdir}/data
+set xywebdir            ${xytopdir}/web
+set xywwwdir            ${xytopdir}/www
+
+configure.cmd           ./configure.client
+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 \
+                        XYMONUSER=${xymonuser} \
+                        XYMONTOPDIR=${xytopdir} \
+                        XYMONHOSTIP=127.0.0.1 \
+                        XYMONHOSTOS=${os.platform} \
+                        MANROOT=${prefix}/share/man \
+                        INSTALLBINDIR=${xytopdir}/client/bin \
+                        INSTALLETCDIR=${xyetcdir} \
+                        INSTALLEXTDIR=${xytopdir}/client/ext \
+                        INSTALLTMPDIR=${xytmpdir} \
+                        INSTALLWEBDIR=${xywebdir} \
+                        INSTALLWWWDIR=${xywwwdir} \
+                        XYMONVAR=${xyvardir}
+
+destroot.env-append     INSTALLROOT=${destroot}
+destroot.keepdirs       ${destroot}${xytopdir} \
+                        ${destroot}${xylogdir} \
+                        ${destroot}${xytmpdir} \
+                        ${destroot}${xyvardir}/logs \
+                        ${destroot}${xyvardir} \
+                        ${destroot}${xywebdir}
+
+startupitem.create      yes
+startupitem.start       "sudo su ${xymonuser} -c \"${xytopdir}/client/runclient.sh start\""
+startupitem.stop        "sudo su ${xymonuser} -c \"${xytopdir}/client/runclient.sh stop\""
+startupitem.restart     "sudo su ${xymonuser} -c \"${xytopdir}/client/runclient.sh restart\""
+#startupitem.pidfile     auto ${xylogdir}/clientlaunch.*.pid
+startupitem.pidfile     none
+
+pre-destroot {
+    addgroup ${xymongroup}
+    adduser ${xymonuser} gid=[existsgroup ${xymongroup}] realname=Xymon\ User home=${xytopdir} shell=/bin/bash
+}
+
+post-destroot {
+    xinstall -d -o ${xymonuser} -g ${xymongroup} ${destroot}${xylogdir}
+    xinstall -d -o ${xymonuser} -g ${xymongroup} ${destroot}${xytmpdir}
+    # Adding a suffix to config files
+    foreach f { clientlaunch.cfg localclient.cfg xymonclient.cfg } {
+        move ${destroot}${xyetcdir}/${f} ${destroot}${xyetcdir}/${f}.${version}
+    }
+}
+
+post-activate {
+    # If not already present we put default config files
+    foreach f { clientlaunch.cfg localclient.cfg xymonclient.cfg } {
+        if {![file exists ${xyetcdir}/${f}]} {
+            file copy ${xyetcdir}/${f}.${version} ${xyetcdir}/${f}
+        }
+    }
+}
+
+notes "\nSet your Xymon server's IP address with the following command:
+    $ sudo vi ${xyetcdir}/xymonclient.cfg
+
+If you wish your xymon client to report logfiles to your xymon server
+you need to add the user ${xymonuser} to the admin group like this:
+    $ sudo dscl . -append /Groups/admin GroupMembership ${xymonuser}
+
+You can start,stop and restart the xymon client with:
+    $ sudo -u ${xymonuser} ${xytopdir}/client/runclient.sh \[start|stop|restart\]
+"
+
+use_parallel_build  no
+
+livecheck.type      regex
+livecheck.url       http://sourceforge.net/projects/${name}/files/
+livecheck.regex     ${name}-(\[0-9.\]+)\\.tar.gz
+


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

Added: trunk/dports/net/xymon/files/patch-build-Makefile.rules.diff
===================================================================
--- trunk/dports/net/xymon/files/patch-build-Makefile.rules.diff	                        (rev 0)
+++ trunk/dports/net/xymon/files/patch-build-Makefile.rules.diff	2010-11-23 22:46:30 UTC (rev 73753)
@@ -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/files/patch-client-xymonclient-darwin.sh.diff
===================================================================
--- trunk/dports/net/xymon/files/patch-client-xymonclient-darwin.sh.diff	                        (rev 0)
+++ trunk/dports/net/xymon/files/patch-client-xymonclient-darwin.sh.diff	2010-11-23 22:46:30 UTC (rev 73753)
@@ -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/files/patch-lib-Makefile.diff
===================================================================
--- trunk/dports/net/xymon/files/patch-lib-Makefile.diff	                        (rev 0)
+++ trunk/dports/net/xymon/files/patch-lib-Makefile.diff	2010-11-23 22:46:30 UTC (rev 73753)
@@ -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/9f5239af/attachment.html>


More information about the macports-changes mailing list