--- _orig/net/nagios/Portfile 2013-08-15 09:30:15.000000000 -0400
+++ net/nagios/Portfile 2014-03-20 18:00:02.000000000 -0400
@@ -3,8 +3,8 @@
PortSystem 1.0
name nagios
-version 3.5.0
-revision 2
+version 4.0.4
+revision 0
categories net
license GPL-2
maintainers markd openmaintainer
@@ -19,15 +19,12 @@
other things.
homepage http://nagios.org
+master_sites sourceforge:project/nagios/nagios-4.x/nagios-${version}
+checksums rmd160 40c133b62d4f469cebd454366473affc4abf0902 \
+ sha256 aedbcd15c2fb536dcfaff015498dc77361194762432c2c505bd10d2b44417bb5
livecheck.regex nagios-(\[0-9.\]+)${extract.suffix}
-master_sites sourceforge:project/nagios/nagios-3.x/nagios-${version}
-checksums rmd160 d75a764486fd3dc0462fb49924698754852d39be \
- sha256 469381b2954392689c85d3db733e8da4bd43b806b3d661d1a7fbd52dacc084db
-
-worksrcdir ${name}
-
depends_build port:gd2
depends_lib port:openssl \
port:nagios-plugins
@@ -88,6 +85,13 @@
foreach cfgfile [glob ${destroot}${sysconfdir}/objects/*.cfg] {
file rename ${cfgfile} ${cfgfile}-sample
}
+
+ xinstall -d ${destroot}${prefix}/share/examples/${name}/
+ copy ${filespath}/apache-nagios.conf ${destroot}${prefix}/share/examples/${name}/
+ copy ${filespath}/nginx-nagios.conf ${destroot}${prefix}/share/examples/${name}/
+ reinplace "s|%%PREFIX%%|${prefix}|g" \
+ ${destroot}${prefix}/share/examples/${name}/apache-nagios.conf \
+ ${destroot}${prefix}/share/examples/${name}/nginx-nagios.conf
}
@@ -103,39 +107,19 @@
nagios as that user.
-
-1) Setup Apache's httpd.conf file for Nagios (restart Apache when done)
+1) Setup your webserver
+ a) Apache's httpd.conf file for Nagios (restart Apache when done)
+ Example configuration in ${prefix}/share/examples/${name}/apache-nagios.conf
Insert the \"Nagios stuff\" text block somewhere *above* your Apache cgi-bin\
ScriptAlias statement:
ScriptAlias /cgi-bin/ \"/Library/WebServer/CGI-Executables/\"
-#
-# Nagios stuff
-
-ScriptAlias /nagios/cgi-bin/ \"${prefix}/sbin/nagios/\"
-
- AllowOverride None
- Options ExecCGI
- Order allow,deny
- Allow from all
- AuthName \"Nagios Access\"
- AuthType Basic
- AuthUserFile ${prefix}/etc/nagios/htpasswd.users
- require valid-user
-
-
-Alias /nagios \"${prefix}/share/nagios\"
-
- Options None
- AllowOverride AuthConfig
- Order allow,deny
- Allow from all
-
+ (is it only relevant to Apple Apache or also macports?)
-# End Nagios stuff
-#
+ a) Nginx w php*-fpm
+ Example configuration in ${prefix}/share/examples/${name}/nginx-nagios.conf
2) Configure the Nagios sample files in ${prefix}/etc/nagios.
@@ -204,3 +188,14 @@
HTML URL: http://localhost/nagios/
CGI URL: http://localhost/nagios/cgi-bin/
"
+
+subport ${name}3 {
+ version 3.5.1
+ master_sites sourceforge:project/nagios/nagios-3.x/nagios-${version}
+ checksums rmd160 0ce5693a745f617c9fbf627f18af27b793de884d \
+ sha256 ca9dd68234fa090b3c35ecc8767b2c9eb743977eaf32612fa9b8341cc00a0f99
+ worksrcdir ${name}
+
+ conflicts ${name}
+
+}