diff options
author | demon <demon@FreeBSD.org> | 2013-12-26 19:44:20 +0800 |
---|---|---|
committer | demon <demon@FreeBSD.org> | 2013-12-26 19:44:20 +0800 |
commit | 2a56687d1be08426e80d13b703a1646bc1610fca (patch) | |
tree | 91e19a782220863a672e09eae19f180fae954230 /net-mgmt | |
parent | d9a24d9ffb50001c93d9a9f1debc869dc0b37686 (diff) | |
download | freebsd-ports-gnome-2a56687d1be08426e80d13b703a1646bc1610fca.tar.gz freebsd-ports-gnome-2a56687d1be08426e80d13b703a1646bc1610fca.tar.zst freebsd-ports-gnome-2a56687d1be08426e80d13b703a1646bc1610fca.zip |
Do not overwrite config.inc.php;
Convert to staging;
Use new LIB_DEPENDS format.
PR: 185187
Submitted by: mat
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/nagios/Makefile | 38 | ||||
-rw-r--r-- | net-mgmt/nagios/pkg-plist | 4 |
2 files changed, 15 insertions, 27 deletions
diff --git a/net-mgmt/nagios/Makefile b/net-mgmt/nagios/Makefile index afd4fa5b2175..4a4ecc220844 100644 --- a/net-mgmt/nagios/Makefile +++ b/net-mgmt/nagios/Makefile @@ -11,10 +11,10 @@ COMMENT= Extremely powerful network monitoring system LICENSE= GPLv2 -LIB_DEPENDS= gd:${PORTSDIR}/graphics/gd +LIB_DEPENDS= libgd.so:${PORTSDIR}/graphics/gd RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagios-plugins -USES= iconv perl5 +USES= iconv perl5 uidfix USE_PERL5= build USE_AUTOTOOLS= autoconf libltdl USE_PHP= yes @@ -83,41 +83,27 @@ NANOSLEEP_DESC= Use nanosleep in event timing EVENT_BROKER_DESC= Enable event broker functionality UNHANDLED_HACK_DESC= Display passive checks in unhandled queries -NO_STAGE= yes -.include <bsd.port.options.mk> - -.if ${PORT_OPTIONS:MEMBEDDED_PERL} -USE_PERL5+= run -CONFIGURE_ARGS+=--enable-embedded-perl \ - --with-perlcache -PLIST_SUB+= EMBEDDED_PERL="" -.else -PLIST_SUB+= EMBEDDED_PERL="@comment " -.endif - -.if ${PORT_OPTIONS:MNANOSLEEP} -CONFIGURE_ARGS+=--enable-nanosleep -.endif +OPTIONS_SUB= -.if ${PORT_OPTIONS:MEVENT_BROKER} -CONFIGURE_ARGS+=--enable-event-broker -.else -CONFIGURE_ARGS+=--disable-event-broker -.endif +EMBEDDED_PERL_USE= perl5=run +EMBEDDED_PERL_CONFIGURE_ENABLE= embedded-perl +EMBEDDED_PERL_CONFIGURE_WITH= perlcache +NANOSLEEP_CONFIGURE_ENABLE= nanosleep +EVENT_BROKER_CONFIGURE_ENABLE= event-broker post-extract: @${MV} ${WRKDIR}/${PORTNAME} ${WRKSRC} +.include <bsd.port.options.mk> + post-patch: + @${REINPLACE_CMD} -e '/^INSTALL_OPTS=/d' `${FIND} ${WRKSRC} -name Makefile.in` .if ${PORT_OPTIONS:MUNHANDLED_HACK} @${REINPLACE_CMD} -e 's#;serviceprops=42\&#;serviceprops=10\&#g' \ -e 's#;hostprops=42\"#;hostprops=10\"#g' ${WRKSRC}/html/side.php .endif post-install: - @${CHMOD} 775 ${NAGIOSDIR} ${NAGIOSDIR}/archives ${NAGIOSDIR}/checkresults ${NAGIOSDIR}/rw - @${CHOWN} ${NAGIOSUSER}:${NAGIOSGROUP} ${NAGIOSDIR} ${NAGIOSDIR}/archives ${NAGIOSDIR}/checkresults - @${CHOWN} ${NAGIOSUSER}:${WWWGRP} ${NAGIOSDIR}/rw - @${CAT} ${PKGMESSAGE} + @${MV} ${STAGEDIR}${PREFIX}/${NAGIOSWWWDIR}/config.inc.php ${STAGEDIR}${PREFIX}/${NAGIOSWWWDIR}/config.inc.php.sample .include <bsd.port.mk> diff --git a/net-mgmt/nagios/pkg-plist b/net-mgmt/nagios/pkg-plist index 0ab4320fdf18..a3f2822fe469 100644 --- a/net-mgmt/nagios/pkg-plist +++ b/net-mgmt/nagios/pkg-plist @@ -33,7 +33,9 @@ etc/nagios/resource.cfg-sample %%NAGIOSWWWDIR%%/cgi-bin/summary.cgi %%NAGIOSWWWDIR%%/cgi-bin/tac.cgi %%NAGIOSWWWDIR%%/cgi-bin/trends.cgi -%%NAGIOSWWWDIR%%/config.inc.php +@unexec if cmp -s %D/%%NAGIOSWWWDIR%%/config.inc.php.sample %D/%%NAGIOSWWWDIR%%/config.inc.php; then rm -f %D/%%NAGIOSWWWDIR%%/config.inc.php; fi +%%NAGIOSWWWDIR%%/config.inc.php.sample +@exec if [ ! -f %D/%%NAGIOSWWWDIR%%/config.inc.php ] ; then cp -p %D/%F %B/config.inc.php; fi %%NAGIOSWWWDIR%%/contexthelp/A1.html %%NAGIOSWWWDIR%%/contexthelp/A2.html %%NAGIOSWWWDIR%%/contexthelp/A3.html |