[27253] trunk/dports/net

source_changes at macosforge.org source_changes at macosforge.org
Wed Jul 25 21:48:25 PDT 2007


Revision: 27253
          http://trac.macosforge.org/projects/macports/changeset/27253
Author:   markd at macports.org
Date:     2007-07-25 21:48:24 -0700 (Wed, 25 Jul 2007)

Log Message:
-----------
New port.

Added Paths:
-----------
    trunk/dports/net/argus-monitor/
    trunk/dports/net/argus-monitor/Portfile
    trunk/dports/net/argus-monitor/files/
    trunk/dports/net/argus-monitor/files/patch-Makefile.tplt

Added: trunk/dports/net/argus-monitor/Portfile
===================================================================
--- trunk/dports/net/argus-monitor/Portfile	                        (rev 0)
+++ trunk/dports/net/argus-monitor/Portfile	2007-07-26 04:48:24 UTC (rev 27253)
@@ -0,0 +1,198 @@
+# $Id$
+PortSystem	1.0
+
+name			argus-monitor
+version			3.5
+categories		net
+maintainers		markd at macports.org
+description		The All Seeing System and Network Monitoring Software
+long_description	${description}
+homepage		http://argus.tcp4me.com/
+platforms		darwin
+master_sites		http://www.tcp4me.com/code/argus-archive/
+checksums		md5 7a946b17a61edeb1b455f2ab45acf77d
+distfiles		argus-${version}.tgz
+worksrcdir		argus-${version}
+
+
+depends_lib		port:perl5.8 \
+			port:openssl \
+			port:freetype \
+			port:gd2 \
+			port:fping \
+			port:db44 \
+			port:p5-dbi \
+			port:p5-berkeleydb \
+			port:p5-socket6 \
+			port:p5-gd \
+			port:p5-time-hires \
+			port:p5-net-ssleay \
+			port:p5-digest-hmac \
+			port:p5-digest-md5 \
+			port:p5-digest-sha1 \
+			port:p5-crypt-des
+
+patchfiles		patch-Makefile.tplt
+
+startupitem.create	yes
+startupitem.name	argusd  
+startupitem.executable	"${prefix}/sbin/argusd"
+
+# Set the --data_dir configure argument and give me a pointer to it for later reference.
+set argus_data_dir ${prefix}/var/argus-monitor
+
+# Set the Argus' htdocs directory.
+set argus_htdocs ${prefix}/share/${name}/htdocs
+
+configure.args		--bin_dir=${prefix}/bin \
+			--sbin_dir=${prefix}/sbin \
+			--lib_dir=${prefix}/lib/argus-monitor \
+			--data_dir=${argus_data_dir} \
+			--cgi_dir=${argus_htdocs}/cgi-bin
+
+post-patch {
+	reinplace "s|/lib/sendmail|/usr/sbin/sendmail|g" \
+		${worksrcpath}/examples/config	
+}
+
+post-destroot {
+	xinstall -m 755 -d ${destroot}${argus_htdocs}/sound
+	xinstall -m 755 -d ${destroot}${argus_htdocs}/img
+	xinstall -m 755 ${worksrcpath}/misc/whoopwhoop.wav ${destroot}${argus_htdocs}/sound	
+	eval xinstall -m 640 [glob ${worksrcpath}/misc/*.gif] ${destroot}${argus_htdocs}/img
+	xinstall -m 644 -W ${worksrcpath}/misc argus.css argus.js \
+		${destroot}${argus_htdocs}
+
+	file copy ${worksrcpath}/examples ${destroot}${prefix}/share/${name}
+
+	system "chown -R www:www ${destroot}${argus_data_dir}"
+	system "chown -R www:www ${destroot}${argus_htdocs}"
+
+	destroot.keepdirs \
+		${destroot}${argus_data_dir}/gdata \
+		${destroot}${argus_data_dir}/perl \
+		${destroot}${argus_data_dir}/stats \
+		${destroot}${argus_data_dir}/html \
+		${destroot}${argus_data_dir}/notify \
+		${destroot}${argus_data_dir}/auth
+}
+
+post-install {
+ui_msg "\n  *** To complete the Argus install ***
+
+1) Modify the httpd.conf for Argus
+----------------------------------------------
+-Uncomment the line:
+        AddHandler cgi-script .cgi
+
+-Add a directive for the Argus data directory           
+ 
+        ScriptAlias /argus \"${argus_htdocs}/cgi-bin/argus.cgi\"
+        <Directory \"${argus_htdocs}/cgi-bin\">
+            Allow from all
+            Options ExecCGI
+        </Directory>
+
+
+2) Setup the Argus config files
+----------------------------------------------
+-Remove the suffix \".example\" from the files config and user in
+ ${argus_data_dir} and customize them.  Also see ${prefix}/share/${name}/examples.
+
+
+3) Make the Argus files owned by the Apache user/group (default is \"www\")
+----------------------------------------------
+-Execute this terminal command:
+	sudo chown -R <apache-user>:<apache-group> ${prefix}/share/${name}/
+	sudo chown -R <apache-user>:<apache-group> ${argus_data_dir}/
+
+
+4) Rename config.example and user.example to config and user and customize them.
+----------------------------------------------
+For full config file information, see the developer documentation at
+http://argus.tcp4me.com/docs.html. But in a nutshell, it goes like this ....
+
+-The Argus config file is hierarchical; parameters that can be specified at
+ an upper level are inherited by objects below when not explicitly specified.
+
+So you may use service groups:
+
+	Group \"WebServers\" {
+		frequency:	5min
+		retries:	5
+		retrydelay:	10min
+		notify: mail:netadmins at mycompany.com
+
+		Host \"webserver.mycompany.com\" {
+			Service TCP/HTTP
+			Service TCP/HTTPS
+			Service Ping
+		}
+
+		Host \"webmail.mycompany.com\" {
+			Service TCP/HTTP
+			Service TCP/HTTPS
+			Service TCP/POP
+			Service TCP/POPS
+			Service TCP/IMAP
+			Service TCP/IMAPS
+			Service TCP/SMTP
+			Service TCP/SMTPS
+			Service Ping
+			Service UDP {
+				port:   501
+			}
+
+		}
+
+		Host \"dns1.mycompany.com\" {
+			Service UDP/DNS
+
+		}
+	}
+
+-Or you may use the \"shorthand\" notation and fully specify the characteristics
+ of individual hosts completely.
+
+	Host \"www.example.com\" {
+		Service TCP/HTTP
+		Service TCP/HTTPS
+		Service Ping
+		Service TCP {
+			port: 12345
+			info: YoyoDyne Application Server
+		}
+	}
+
+NOTE: Unlike C or Perl, you cannot place the opening \{ on a different line,
+      and the closing \} must be on a line by itself (with optional whitespace).
+
+-Rename config.example to config and customize it with your login passwords.
+
+
+5) Start argusd.
+----------------------------------------------
+
+-Start argusd in the foreground to test it:
+	sudo argusd -fd  (foreground & debug)
+
+-When you have argusd starting without errors, shutdown the foreground
+ processs using argusctl (or Control-C) and use launchctl to start argusd
+ in the background and set it to run at boot:
+
+	argusctl shutdown
+	sudo launchctl load -w /Library/LaunchDaemons/org.macports.argusd.plist 
+
+-NOTE: Config file changes are detected automatically by Argus within a few minutes,
+        but the impatient may use argusctl:
+
+	argusctl hup 
+
+
+5) Login to the Argus web interface
+----------------------------------------------
+Login at http://localhost/argus
+
+
+\n"
+}


Property changes on: trunk/dports/net/argus-monitor/Portfile
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/dports/net/argus-monitor/files/patch-Makefile.tplt
===================================================================
--- trunk/dports/net/argus-monitor/files/patch-Makefile.tplt	                        (rev 0)
+++ trunk/dports/net/argus-monitor/files/patch-Makefile.tplt	2007-07-26 04:48:24 UTC (rev 27253)
@@ -0,0 +1,101 @@
+--- Makefile.tplt.org	2007-06-01 16:30:47.000000000 -0700
++++ Makefile.tplt	2007-07-25 20:41:28.000000000 -0700
+@@ -131,23 +131,23 @@
+ 	$(INSTALL_DATA)/gdata $(INSTALL_DATA)/perl install-locale install-message
+ 
+ install-lib:
+-	-mkdir -p $(INSTALL_LIB)
++	-mkdir -p $(DESTDIR)$(INSTALL_LIB)
+ 	$(PERL) tools/install_lib -s src -l $(INSTALL_LIB) $(LIBS)
+-	cp $(TEXT) $(INSTALL_LIB)/
++	cp $(TEXT) $(DESTDIR)$(INSTALL_LIB)/
+ 
+ install-prog: upgrade-cgi
+-	-mkdir -p $(INSTALL_SBIN)
+-	-mkdir -p $(INSTALL_BIN)
+-	-mkdir -p $(INSTALL_CGI)
+-	-mkdir -p $(INSTALL_LIB)
+-	cp built/argusd   $(INSTALL_SBIN)/
+-	cp built/argusctl $(INSTALL_SBIN)/
+-	cp built/arguscgi $(INSTALL_CGI)/
+-	cp built/graphd   $(INSTALL_LIB)/
+-	cp built/picasso  $(INSTALL_LIB)/
+-	cp built/argus-config $(INSTALL_BIN)/
+-	cp built/argus-agent  $(INSTALL_SBIN)/
+-	cp built/argusvxml    $(INSTALL_CGI)/
++	-mkdir -p $(DESTDIR)$(INSTALL_SBIN)
++	-mkdir -p $(DESTDIR)$(INSTALL_BIN)
++	-mkdir -p $(DESTDIR)$(INSTALL_CGI)
++	-mkdir -p $(DESTDIR)$(INSTALL_LIB)
++	cp built/argusd   $(DESTDIR)$(INSTALL_SBIN)/
++	cp built/argusctl $(DESTDIR)$(INSTALL_SBIN)/
++	cp built/arguscgi $(DESTDIR)$(INSTALL_CGI)/
++	cp built/graphd   $(DESTDIR)$(INSTALL_LIB)/
++	cp built/picasso  $(DESTDIR)$(INSTALL_LIB)/
++	cp built/argus-config $(DESTDIR)$(INSTALL_BIN)/
++	cp built/argus-agent  $(DESTDIR)$(INSTALL_SBIN)/
++	cp built/argusvxml    $(DESTDIR)$(INSTALL_CGI)/
+ 
+ # previously, cgi was installed in sbin with symlink
+ # cleanup old the files
+@@ -164,16 +164,16 @@
+ # while a+rwx may be not be optimal security-wise,
+ # it reduces the amount of support email the author receives
+ $(INSTALL_DATA):
+-	mkdir -p $(INSTALL_DATA)/stats $(INSTALL_DATA)/html $(INSTALL_DATA)/notify
+-	touch $(INSTALL_DATA)/log
+-	$(PERL) -e 'print getppid, "\n"' > $(INSTALL_DATA)/notno
+-	chmod a+rwx $(INSTALL_DATA)
+-	chmod a+r $(INSTALL_DATA)/html $(INSTALL_DATA)/log
++	mkdir -p $(DESTDIR)$(INSTALL_DATA)/stats $(DESTDIR)$(INSTALL_DATA)/html $(DESTDIR)$(INSTALL_DATA)/notify
++	touch $(DESTDIR)$(INSTALL_DATA)/log
++	$(PERL) -e 'print getppid, "\n"' > $(DESTDIR)$(INSTALL_DATA)/notno
++	chmod a+rwx $(DESTDIR)$(INSTALL_DATA)
++	chmod a+r $(DESTDIR)$(INSTALL_DATA)/html $(DESTDIR)$(INSTALL_DATA)/log
+ 	@echo ''
+ 	@echo creating example files...
+ 	@sleep 1
+-	@cp examples/users  $(INSTALL_DATA)/users.example
+-	@cp examples/config $(INSTALL_DATA)/config.example
++	@cp examples/users  $(DESTDIR)$(INSTALL_DATA)/users.example
++	@cp examples/config $(DESTDIR)$(INSTALL_DATA)/config.example
+ 	@echo ''
+ 	@echo '***' you will need to create/edit the files \'$(INSTALL_DATA)/config\' 
+ 	@echo '***      ' and \'$(INSTALL_DATA)/users\'
+@@ -182,26 +182,26 @@
+ 
+ # if this is an upgrade, gdata might not exist even though data does
+ $(INSTALL_DATA)/gdata: $(INSTALL_DATA)
+-	if test ! -d $(INSTALL_DATA)/gdata;  then mkdir $(INSTALL_DATA)/gdata;  \
+-		chmod a+rwx $(INSTALL_DATA)/gdata;  fi
+-	if test ! -d $(INSTALL_DATA)/gcache; then mkdir $(INSTALL_DATA)/gcache; \
+-		chmod a+rwx $(INSTALL_DATA)/gcache; fi
++	if test ! -d $(INSTALL_DATA)/gdata;  then mkdir $(DESTDIR)$(INSTALL_DATA)/gdata;  \
++		chmod a+rwx $(DESTDIR)$(INSTALL_DATA)/gdata;  fi
++	if test ! -d $(INSTALL_DATA)/gcache; then mkdir $(DESTDIR)$(INSTALL_DATA)/gcache; \
++		chmod a+rwx $(DESTDIR)$(INSTALL_DATA)/gcache; fi
+ 
+ $(INSTALL_DATA)/perl: $(INSTALL_DATA)
+ 	if test ! -d $(INSTALL_DATA)/perl;  then \
+-		mkdir $(INSTALL_DATA)/perl;  \
+-		chmod a+rwx $(INSTALL_DATA)/perl;  \
++		mkdir $(DESTDIR)$(INSTALL_DATA)/perl;  \
++		chmod a+rwx $(DESTDIR)$(INSTALL_DATA)/perl;  \
+ 	fi
+ 
+ install-locale: $(INSTALL_DATA)
+ 	if test ! -d $(INSTALL_DATA)/locale; then \
+-		mkdir $(INSTALL_DATA)/locale; \
+-		chmod a+rx $(INSTALL_DATA)/locale;  \
++		mkdir $(DESTDIR)$(INSTALL_DATA)/locale; \
++		chmod a+rx $(DESTDIR)$(INSTALL_DATA)/locale;  \
+ 	fi
+-	-cp locale/* $(INSTALL_DATA)/locale
++	-cp locale/* $(DESTDIR)$(INSTALL_DATA)/locale
+ 
+ install-conf:
+-	cp built/conf.pl  $(INSTALL_LIB)
++	cp built/conf.pl  $(DESTDIR)$(INSTALL_LIB)
+ 
+ HTML/config-details.html: $(BUILD)
+ 	built/argusd -DH > HTML/config-details.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070725/7cab3fdc/attachment.html


More information about the macports-changes mailing list