Ticket #43008: patch-nagios-Portfile.diff

File patch-nagios-Portfile.diff, 3.2 KB (added by jul_bsd@…, 11 years ago)
  • net/nagios/Portfile

    old new  
    33PortSystem      1.0
    44
    55name                    nagios
    6 version                 3.5.0
    7 revision                2
     6version                 4.0.4
     7revision                0
    88categories              net
    99license                 GPL-2
    1010maintainers             markd openmaintainer
     
    1919                        other things.
    2020
    2121homepage                http://nagios.org
     22master_sites            sourceforge:project/nagios/nagios-4.x/nagios-${version}
     23checksums           rmd160  40c133b62d4f469cebd454366473affc4abf0902 \
     24                    sha256  aedbcd15c2fb536dcfaff015498dc77361194762432c2c505bd10d2b44417bb5
    2225
    2326livecheck.regex         nagios-(\[0-9.\]+)${extract.suffix}
    2427
    25 master_sites            sourceforge:project/nagios/nagios-3.x/nagios-${version}
    26 checksums               rmd160 d75a764486fd3dc0462fb49924698754852d39be \
    27                         sha256 469381b2954392689c85d3db733e8da4bd43b806b3d661d1a7fbd52dacc084db
    28 
    29 worksrcdir              ${name}
    30 
    3128depends_build           port:gd2
    3229depends_lib             port:openssl \
    3330                        port:nagios-plugins
     
    8885        foreach cfgfile [glob ${destroot}${sysconfdir}/objects/*.cfg] {
    8986                file rename ${cfgfile} ${cfgfile}-sample
    9087        }
     88
     89        xinstall -d ${destroot}${prefix}/share/examples/${name}/
     90        copy ${filespath}/apache-nagios.conf ${destroot}${prefix}/share/examples/${name}/
     91        copy ${filespath}/nginx-nagios.conf ${destroot}${prefix}/share/examples/${name}/
     92        reinplace "s|%%PREFIX%%|${prefix}|g" \
     93                ${destroot}${prefix}/share/examples/${name}/apache-nagios.conf \
     94                ${destroot}${prefix}/share/examples/${name}/nginx-nagios.conf
    9195}
    9296
    9397
     
    103107           nagios as that user.
    104108
    105109
    106 
    107 1) Setup Apache's httpd.conf file for Nagios (restart Apache when done)
     1101) Setup your webserver
     111  a) Apache's httpd.conf file for Nagios (restart Apache when done)
     112     Example configuration in ${prefix}/share/examples/${name}/apache-nagios.conf
    108113
    109114   Insert the \"Nagios stuff\" text block somewhere *above* your Apache cgi-bin\
    110115   ScriptAlias statement:
    111116
    112117        ScriptAlias /cgi-bin/ \"/Library/WebServer/CGI-Executables/\"
    113118
    114 #
    115 # Nagios stuff
    116 
    117 ScriptAlias /nagios/cgi-bin/ \"${prefix}/sbin/nagios/\"
    118 <Directory \"${prefix}/sbin/nagios\">
    119  AllowOverride None
    120     Options ExecCGI
    121     Order allow,deny
    122     Allow from all
    123     AuthName \"Nagios Access\"
    124     AuthType Basic
    125     AuthUserFile ${prefix}/etc/nagios/htpasswd.users
    126     require valid-user
    127 </Directory>
    128 
    129 Alias /nagios \"${prefix}/share/nagios\"
    130 <Directory \"${prefix}/share/nagios\">
    131     Options None
    132     AllowOverride AuthConfig
    133     Order allow,deny
    134     Allow from all
    135 </Directory>
     119   (is it only relevant to Apple Apache or also macports?)
    136120
    137 # End Nagios stuff
    138 #
     121  a) Nginx w php*-fpm
     122     Example configuration in ${prefix}/share/examples/${name}/nginx-nagios.conf
    139123
    140124
    1411252) Configure the Nagios sample files in ${prefix}/etc/nagios.
     
    204188        HTML URL:  http://localhost/nagios/
    205189        CGI URL:  http://localhost/nagios/cgi-bin/
    206190"
     191
     192subport ${name}3 {
     193        version                 3.5.1
     194        master_sites            sourceforge:project/nagios/nagios-3.x/nagios-${version}
     195        checksums           rmd160  0ce5693a745f617c9fbf627f18af27b793de884d \
     196                            sha256  ca9dd68234fa090b3c35ecc8767b2c9eb743977eaf32612fa9b8341cc00a0f99
     197        worksrcdir              ${name}
     198
     199        conflicts ${name}
     200
     201}