[22347] trunk/dports/net/zabbix

source_changes at macosforge.org source_changes at macosforge.org
Mon Feb 26 20:57:47 PST 2007


Revision: 22347
          http://trac.macosforge.org/projects/macports/changeset/22347
Author:   markd at macports.org
Date:     2007-02-26 20:57:47 -0800 (Mon, 26 Feb 2007)

Log Message:
-----------
Split off the agent from this port and make a separte port.  Update to 1.1.6.

Modified Paths:
--------------
    trunk/dports/net/zabbix/Portfile
    trunk/dports/net/zabbix/files/patch-configure

Removed Paths:
-------------
    trunk/dports/net/zabbix/files/zabbix_agentd.init

Modified: trunk/dports/net/zabbix/Portfile
===================================================================
--- trunk/dports/net/zabbix/Portfile	2007-02-27 04:33:51 UTC (rev 22346)
+++ trunk/dports/net/zabbix/Portfile	2007-02-27 04:57:47 UTC (rev 22347)
@@ -3,29 +3,26 @@
 PortSystem	1.0
 
 name			zabbix
-version			1.1.2
+version			1.1.6
 categories		net
-maintainers		markd at opendarwin.org
+maintainers		markd at macports.org
 platforms		darwin
 
 description		An open source application and network monitor
-
 long_description	${description}
 
 homepage		http://www.zabbix.com
-
 master_sites		sourceforge
-checksums		md5 f3d409b08629c005ed30d9bd4e93fca9
+checksums		md5 baa6896c5f41ed286bca3c40e419e1cf
+default_variants	+server
 
 patchfiles		patch-configure
-
 depends_lib		port:mysql5 \
 				port:fping
 
 configure.pre_args     --prefix=${prefix}
 
 configure.args		--enable-server \
-			--enable-agent \
 			--with-mysql=${prefix} \
 			--with-net-snmp \
 			--bindir=${prefix}/bin/zabbix \
@@ -36,54 +33,18 @@
 			--localstatedir=${prefix}/var/zabbix \
 			--mandir=${prefix}/man
 
-if { [variant_isset agent_only] } {
 	startupitem.create      yes
-	startupitem.start       "${prefix}/share/zabbix/zabbix_agentd.init start"
-	startupitem.stop        "${prefix}/share/zabbix/zabbix_agentd.init stop"
-} else {
-	startupitem.create      yes
 	startupitem.start       "${prefix}/share/zabbix/zabbix_server.init start"
 	startupitem.stop        "${prefix}/share/zabbix/zabbix_server.init stop"
-}
 
-variant agent_only {
-	depends_lib-delete		port:mysql5 \
-							port:fping
-
-	configure.args-delete	--enable-server \
-							--with-mysql=${prefix} \
-							--with-net-snmp
-							
+variant server  {
+# This variant doesn't do anything in this port.  Its only purpose is to trigger the server
+# variant in the mysql5 port.
 }
 
 build {}
         
-pre-fetch {
-if { [variant_isset agent_only] } {
-# If agent_only don'y display MySQL ui_msg
-} else {
-
-        ui_msg "\n
-
-                   ************************************************
-	           **** It is highly recommended you           ****
-	           **** pre-install MySQL with the +server     ****
-		   **** variant so MySQL will run at system    ****
-		   **** boot.  So for new MySQL installs:      ****
-
-	              1) Cancel this install now with Cntrl-C.
-	              2) Type \"port install mysql5 +server\"
-	              3) Re-install ZABBIX
-	           ************************************************
-
-		\n"
-}
-}
-
-post-extract {
-        reinplace "s|PACKETSZ|NS_PACKETSZ|g" \
-                ${worksrcpath}/src/libs/zbxsysinfo/common/common.c
-
+post-patch {
         reinplace "s|#DBSocket=/tmp/mysql.sock|DBSocket=${prefix}/var/run/mysql5/mysqld.sock|g" \
                 ${worksrcpath}/misc/conf/zabbix_server.conf
                 
@@ -97,33 +58,8 @@
 }
 
 post-destroot {
-
-if { [variant_isset agent_only] } {
-# Don't install MySQL data and frontend stuff for agent_only
-
-# Copy sample agent .conf files
+# Copy sample server .conf files
 	xinstall -d -m 755 -d ${destroot}${prefix}/etc/zabbix
-	xinstall -m 755  ${worksrcpath}/misc/conf/zabbix_agent.conf \
-		${destroot}${prefix}/etc/zabbix/zabbix_agent.conf.sample
-        xinstall -m 755  ${worksrcpath}/misc/conf/zabbix_agentd.conf \
-                ${destroot}${prefix}/etc/zabbix/zabbix_agentd.conf.sample
-
-
-# Copy a startup script for the agent
-		xinstall -d -m 755 -d ${destroot}${prefix}/share/zabbix
-		xinstall -m 755 ${portpath}/${filesdir}/zabbix_agentd.init \
-			${destroot}${prefix}/share/zabbix
-		reinplace "s|__PREFIX__|${prefix}|g" \
-                ${destroot}${prefix}/share/zabbix/zabbix_agentd.init
-                
-} else {
-
-# Copy sample server and agent .conf files
-	xinstall -d -m 755 -d ${destroot}${prefix}/etc/zabbix
-	xinstall -m 755 ${worksrcpath}/misc/conf/zabbix_agent.conf \
-		${destroot}${prefix}/etc/zabbix/zabbix_agent.conf.sample
-        xinstall -m 755 ${worksrcpath}/misc/conf/zabbix_agentd.conf \
-                ${destroot}${prefix}/etc/zabbix/zabbix_agentd.conf.sample
         xinstall -m 755 ${worksrcpath}/misc/conf/zabbix_server.conf \
                 ${destroot}${prefix}/etc/zabbix/zabbix_server.conf.sample
 		
@@ -174,63 +110,13 @@
 		reinplace "s|__PREFIX__|${prefix}|g" \
            	${destroot}${prefix}/share/zabbix/zabbix_server.init
 
-# Create a startup script for the agent
-		xinstall -m 755 ${portpath}/${filesdir}/zabbix_agentd.init \
-			${destroot}${prefix}/share/zabbix
-		reinplace "s|__PREFIX__|${prefix}|g" \
-            ${destroot}${prefix}/share/zabbix/zabbix_agentd.init
-                
 # Set permissions for etc (protect passwords) and the frontend
 		system "chmod 660 ${destroot}${prefix}/etc/zabbix/*"
 		system "chown zabbix:zabbix ${destroot}${prefix}/etc/zabbix/*"
 		system "chown -R www:www ${destroot}${prefix}/share/zabbix/frontends/*"
-
-# End else clause - Done with server stuff
 }
 
-# Copy Win32 agent for normal and agent_only installs
-		xinstall -d -m 755 -d ${destroot}${prefix}/share/zabbix/zabbix_agent_win32
-		xinstall -m 755 ${worksrcpath}/src/zabbix_agent_win32/Release/ZabbixW32.exe \
-			${destroot}${prefix}/share/zabbix/zabbix_agent_win32
-		xinstall -m 755 ${worksrcpath}/src/zabbix_agent_win32/doc/ReadMe.txt \
-			${destroot}${prefix}/share/zabbix/zabbix_agent_win32
-}
-
 post-activate {
-
-if { [variant_isset agent_only] } {
-
-ui_msg "\n#### To complete the ZABBIX agent installation ####
-
-
-1) Edit the sample .conf file ${prefix}/etc/zabbix/zabbix_agentd.conf (rename & omit .sample)
-
-   Set the following variable to the ip address of your ZABBIX server to
-   allow it access to the agent.
-
-	Server=x.x.x.x
-   
-   
-2) Set zabbix_agentd to run at system boot, then start it
-
-	OS X 10.4 - Run launchctl so ZABBIX will start at system boot
-	sudo launchctl load -w /Library/LaunchDaemons/org.macports.zabbix.plist
-
-	OS X 10.3 and previous - A startup item was created in /Library/StartupItems
-	Add \"ZABBIX=-YES-\" to the /etc/hostconfig file to run ZABBIX at system boot
-	        
-	${prefix}/share/zabbix/zabbix_agentd.init start (stop|status)
-
-
-3) A Win32 agent is in ${prefix}/share/zabbix/zabbix_agent_win32 for
-   installation on Windows NT 4.0, Windows 2000, and Windows XP.  See
-   the ReadMe.txt for instructions.
-
-
-\n"
-
-} else {
-
 ui_msg "\n#### To complete the ZABBIX installation ####
 
 
@@ -311,17 +197,9 @@
    ${prefix}/share/zabbix/zabbix_server.init start (stop|status)
 
 
-7) A Win32 agent is in ${prefix}/share/zabbix/zabbix_agent_win32 for
-   installation on Windows NT 4.0, Windows 2000, and Windows XP.  See
-   the ReadMe.txt for instructions.
-
-
-8) Login at http://localhost/zabbix with default user 'admin' with no password, then
+7) Login at http://localhost/zabbix with default user 'admin' with no password, then
    be sure to read the manual: http://www.zabbix.com/manual/v1.1/index.php
 
 \n"
-# End else clause
-
 }
-}
 

Modified: trunk/dports/net/zabbix/files/patch-configure
===================================================================
--- trunk/dports/net/zabbix/files/patch-configure	2007-02-27 04:33:51 UTC (rev 22346)
+++ trunk/dports/net/zabbix/files/patch-configure	2007-02-27 04:57:47 UTC (rev 22347)
@@ -1,6 +1,16 @@
---- configure.org	2006-05-31 00:06:26.000000000 -0700
-+++ configure	2006-06-01 18:08:54.000000000 -0700
-@@ -6664,6 +6664,9 @@
+--- configure	2007-02-26 20:29:48.000000000 -0800
++++ configure.new	2007-02-26 20:33:14.000000000 -0800
+@@ -275,6 +275,9 @@
+ # Factoring default headers for most tests.
+ ac_includes_default="\
+ #include <stdio.h>
++#include <sys/socket.h>
++#include <sys/param.h>
++#include <netinet/in.h>
+ #if HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+@@ -6666,6 +6669,9 @@
  			elif test -f $withval/include/mysql.h; then
  				MYSQL_INCDIR=$withval/include
  				MYSQL_LIBDIR=$withval/lib

Deleted: trunk/dports/net/zabbix/files/zabbix_agentd.init
===================================================================
--- trunk/dports/net/zabbix/files/zabbix_agentd.init	2007-02-27 04:33:51 UTC (rev 22346)
+++ trunk/dports/net/zabbix/files/zabbix_agentd.init	2007-02-27 04:57:47 UTC (rev 22347)
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-case "$1" in
-    start)
-        echo -n "Starting zabbix_agentd "
-        sudo -u zabbix __PREFIX__/bin/zabbix/zabbix_agentd -c __PREFIX__/etc/zabbix/zabbix_agentd.conf
-        ;;
-
-    stop)
-        echo -n "Shutting down zabbix_agentd"
-        pid=`ps axc|awk "{if (\\$5==\"zabbix_agent\") print \\$1}"`
-        /bin/kill $pid
-       rm /var/tmp/zabbix_agentd.pid
-        ;;
-    restart)
-        $0 stop
-        $0 start
-        ;;
-    status)
-        /bin/ps -ax |/usr/bin/grep zabbix_agentd
-        ;;
-        *)
-        echo "Usage: $0 {start|stop|restart|status}"
-        exit 1
-esac
-

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070226/3c0ddf99/attachment.html


More information about the macports-changes mailing list