diff options
author | edwin <edwin@FreeBSD.org> | 2008-08-17 14:49:35 +0800 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2008-08-17 14:49:35 +0800 |
commit | 7d5d4d895a60aff078d8c2280f80dbcd923f63ed (patch) | |
tree | b9ce9f677d661173713c71088bc2e787d7872b91 /net-mgmt/pnp/Makefile | |
parent | 94611b3d0d785827ba53b78dd5f4e301525844f4 (diff) | |
download | freebsd-ports-gnome-7d5d4d895a60aff078d8c2280f80dbcd923f63ed.tar.gz freebsd-ports-gnome-7d5d4d895a60aff078d8c2280f80dbcd923f63ed.tar.zst freebsd-ports-gnome-7d5d4d895a60aff078d8c2280f80dbcd923f63ed.zip |
New port: net-mgmt/pnp, modern graphing tool for Nagios
After evaluation of net-mgmt/nagiosgraph I decided to search for
something more useful -- Nagios Graph was too hackish and unpretty for
my taste. Digging through Nagios sites I had found PNP and was pleased
by its simplicity and power.
WWW: http://www.pnp4nagios.org/pnp/start
PR: ports/126576
Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Diffstat (limited to 'net-mgmt/pnp/Makefile')
-rw-r--r-- | net-mgmt/pnp/Makefile | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/net-mgmt/pnp/Makefile b/net-mgmt/pnp/Makefile new file mode 100644 index 000000000000..1c8f0a5b4626 --- /dev/null +++ b/net-mgmt/pnp/Makefile @@ -0,0 +1,89 @@ +# New ports collection makefile for: pnp +# Date created: unknown +# Whom: rea-fbsd@codelabs.ru +# +# $FreeBSD$ +# + +PORTNAME= pnp +PORTVERSION= 0.4.10 +CATEGORIES= net-mgmt +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= pnp4nagios + +MAINTAINER= rea-fbsd@codelabs.ru +COMMENT= Nagios performance data collector and grapher + +RUN_DEPENDS= ${LOCALBASE}/bin/rrdtool:${PORTSDIR}/databases/rrdtool \ + nagios:${PORTSDIR}/net-mgmt/nagios + +OPTIONS= PDF "Use built-in fpdf library to produce PDF views" ON + +USE_PHP= yes +WANT_PHP_WEB= yes +USE_RC_SUBR= npcd.sh + +NAGIOSDIR?= /var/spool/nagios +NAGIOSHTMURL?= /nagios +NAGIOSUSER?= nagios +NAGIOSGROUP?= nagios +PNP_STATE= ${NAGIOSDIR}/pnp +PNP_RRDS= ${PNP_STATE}/rrd +PNP_SPOOL= ${PNP_STATE}/perfspool +FPDF_DIR?= share/fpdf + +.if defined(WITH_PDF) +USE_PHP= zlib +.else +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-share::pnp::include::function.inc.php +.endif + +GNU_CONFIGURE= yes +CONFIGURE_ARGS+= \ + --prefix=${LOCALBASE} \ + --datadir=${WWWDIR} \ + --localstatedir=/var/log \ + --with-rrdtool=${LOCALBASE}/bin/rrdtool \ + --with-perfdata-dir=${PNP_RRDS} \ + --with-perfdata-spool-dir=${PNP_SPOOL} \ + --with-nagios-user=${NAGIOSUSER} \ + --with-nagios-group=${NAGIOSGROUP} +# Get rid of INSTALL_OPTS that are set by configure -- +# we want the things to be installed with root:wheel and +# NAGIOSUSER:NAGIOSGROUP are going to the configuration files. +MAKE_ARGS= INSTALL_OPTS= +INSTALL_TARGET= install install-config + +SUB_FILES= pkg-install \ + pkg-deinstall \ + pkg-message +SUB_LIST= PNP_STATE=${PNP_STATE} \ + PNP_RRDS=${PNP_RRDS} \ + PNP_SPOOL=${PNP_SPOOL} \ + NAGIOSUSER=${NAGIOSUSER} \ + NAGIOSGROUP=${NAGIOSGROUP} + +# All files in share/pnp/include/ are installed, so if we patched something +# in that directory, we must clean the '.orig' files -- they shouldn't be +# installed. +PNP_CLEAN_PATCHED= share/pnp/include/function.inc.php.orig + +.if defined(WITH_PDF) +PNP_USE_FPDF= 1 +.else +PNP_USE_FPDF= 0 +.endif +post-patch: + @${REINPLACE_CMD} \ + -e's|^\$$conf\['\''use_fpdf'\''\] = [[:digit:]];|$$conf['\''use_fpdf'\''] = ${PNP_USE_FPDF};|' \ + -e's|^\$$conf\['\''nagios_base'\''\] = "/nagios/cgi-bin";|$$conf\['\''nagios_base'\''\] = "${NAGIOSHTMURL}/cgi-bin";|' \ + "${WRKSRC}/sample-config/pnp/config.php.in" +.for pch in ${PNP_CLEAN_PATCHED} + @${RM} -f "${WRKSRC}/${pch}" +.endfor + +post-install: + @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> |