# New ports collection makefile for: nagios # Date created: 19 May 2002 # Whom: Blaz Zupan # # $FreeBSD$ # PORTNAME= nagios PORTVERSION= 2.0.b4 PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR=nagios DISTNAME= nagios-2.0b4 MAINTAINER= ports@FreeBSD.org COMMENT= Extremely powerful network monitoring system LIB_DEPENDS= gd.4:${PORTSDIR}/graphics/gd RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagios-plugins USE_GETOPT_LONG=yes GNU_CONFIGURE= yes USE_AUTOCONF_VER= 259 USE_RC_SUBR= yes USE_PERL5_BUILD=yes PKGINSTALL= ${WRKDIR}/INSTALL PKGDEINSTALL= ${WRKDIR}/DEINSTALL PKGMESSAGE= ${WRKDIR}/MESSAGE NAGIOSUSER?= nagios NAGIOSGROUP?= nagios NAGIOSDIR?= /var/spool/nagios NAGIOSHTMURL?= /nagios NAGIOSCGIURL?= ${NAGIOSHTMURL}/cgi-bin .include CPPFLAGS= -I${LOCALBASE}/include -fPIC CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \ LDFLAGS="${LDFLAGS}" \ CFLAGS="${CPPFLAGS} ${CFLAGS}" \ LIBS="-L${LOCALBASE}/lib -lgd" CONFIGURE_ARGS= --with-command-user=${NAGIOSUSER} \ --with-command-group=www \ --with-nagios-user=${NAGIOSUSER} \ --with-nagios-group=${NAGIOSGROUP} \ --with-htmurl=${NAGIOSHTMURL} \ --with-cgiurl=${NAGIOSCGIURL} \ --sbindir=${PREFIX}/share/nagios/cgi-bin \ --libexecdir=${PREFIX}/libexec/nagios \ --datadir=${PREFIX}/share/nagios \ --sysconfdir=${PREFIX}/etc/nagios \ --localstatedir=${NAGIOSDIR} \ --prefix=${PREFIX} SED_SCRIPT= -e 's,%%NAGIOSUSER%%,${NAGIOSUSER},g' \ -e 's,%%NAGIOSGROUP%%,${NAGIOSGROUP},g' \ -e 's,%%NAGIOSDIR%%,${NAGIOSDIR},g' \ -e 's,%%PREFIX%%,${PREFIX},g' \ -e 's,%%RC_SUBR%%,${RC_SUBR},g' INSTALL_TARGET= all install config install-config install-commandmode pre-build: for myfile in nagios.sh INSTALL DEINSTALL MESSAGE; do \ ${SED} ${SED_SCRIPT} < ${FILESDIR}/$${myfile}.tmpl >${WRKDIR}/$${myfile}; \ done pre-install: @${SH} ${PKGINSTALL} ${DISTNAME} PRE-INSTALL post-install: @${INSTALL_SCRIPT} ${WRKDIR}/nagios.sh ${PREFIX}/etc/rc.d/ @${CHMOD} 775 ${NAGIOSDIR} ${NAGIOSDIR}/archives ${NAGIOSDIR}/rw @${CHOWN} ${NAGIOSUSER}:${NAGIOSGROUP} ${NAGIOSDIR} ${NAGIOSDIR}/archives @${CHOWN} ${NAGIOSUSER}:www ${NAGIOSDIR}/rw @${CAT} ${PKGMESSAGE} .include