2002-05-29 06:35:18 +00:00
|
|
|
# New ports collection makefile for: nagios
|
|
|
|
# Date created: 19 May 2002
|
|
|
|
# Whom: Blaz Zupan <blaz@si.FreeBSD.org>
|
2000-07-12 18:43:32 +00:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2002-05-29 06:35:18 +00:00
|
|
|
PORTNAME= nagios
|
2005-04-06 10:00:52 +00:00
|
|
|
PORTVERSION= 1.2
|
|
|
|
PORTREVISION= 2
|
|
|
|
PORTEPOCH= 1
|
2004-02-23 04:42:13 +00:00
|
|
|
CATEGORIES= net-mgmt
|
2002-05-29 06:35:18 +00:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
|
|
|
MASTER_SITE_SUBDIR=nagios
|
2000-07-12 18:43:32 +00:00
|
|
|
|
2005-04-06 10:00:52 +00:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2003-02-21 13:28:59 +00:00
|
|
|
COMMENT= Extremely powerful network monitoring system
|
2000-07-12 18:43:32 +00:00
|
|
|
|
2003-08-18 16:15:10 +00:00
|
|
|
LIB_DEPENDS= gd.4:${PORTSDIR}/graphics/gd
|
2004-02-23 04:42:13 +00:00
|
|
|
RUN_DEPENDS= ${LOCALBASE}/libexec/nagios/check_nagios:${PORTSDIR}/net-mgmt/nagios-plugins
|
2000-07-12 18:43:32 +00:00
|
|
|
|
2003-07-14 02:53:03 +00:00
|
|
|
USE_GETOPT_LONG=yes
|
2000-07-12 18:43:32 +00:00
|
|
|
GNU_CONFIGURE= yes
|
2004-02-11 04:56:00 +00:00
|
|
|
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
|
2003-07-14 02:53:03 +00:00
|
|
|
|
2005-04-06 10:00:52 +00:00
|
|
|
OPTIONS= MYSQL "MySQL suport" off \
|
|
|
|
PGSQL "PostgreSQL suport" off \
|
|
|
|
FILE_PERFDATA "Save performance data to files" off
|
|
|
|
|
|
|
|
CONFLICTS= nagios-2*
|
2005-04-06 10:09:43 +00:00
|
|
|
LATEST_LINK= nagios12
|
2005-04-06 10:00:52 +00:00
|
|
|
|
2004-07-25 18:48:12 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2005-04-06 10:00:52 +00:00
|
|
|
CPPFLAGS= -I${LOCALBASE}/include
|
2003-07-14 02:53:03 +00:00
|
|
|
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
|
|
|
|
LDFLAGS="${LDFLAGS}" \
|
2004-07-25 18:48:12 +00:00
|
|
|
CFLAGS="${CPPFLAGS} ${CFLAGS}" \
|
|
|
|
LIBS="-L${LOCALBASE}/lib -lgd"
|
2004-02-11 04:56:00 +00:00
|
|
|
CONFIGURE_ARGS= --with-command-user=${NAGIOSUSER} \
|
2005-04-06 10:00:52 +00:00
|
|
|
--with-command-grp=www \
|
2004-02-11 04:56:00 +00:00
|
|
|
--with-nagios-user=${NAGIOSUSER} \
|
2005-04-06 10:00:52 +00:00
|
|
|
--with-nagios-grp=${NAGIOSGROUP} \
|
|
|
|
--with-template-objects \
|
2002-06-24 01:54:02 +00:00
|
|
|
--sbindir=${PREFIX}/share/nagios/cgi-bin \
|
2002-07-22 03:19:03 +00:00
|
|
|
--libexecdir=${PREFIX}/libexec/nagios \
|
2002-05-29 06:35:18 +00:00
|
|
|
--datadir=${PREFIX}/share/nagios \
|
|
|
|
--sysconfdir=${PREFIX}/etc/nagios \
|
2004-02-11 04:56:00 +00:00
|
|
|
--localstatedir=${NAGIOSDIR} \
|
2002-05-29 06:35:18 +00:00
|
|
|
--prefix=${PREFIX}
|
2001-04-03 22:07:20 +00:00
|
|
|
|
2005-04-06 10:00:52 +00:00
|
|
|
.if defined(WITH_MYSQL)
|
|
|
|
USE_MYSQL= yes
|
|
|
|
CONFIGURE_ARGS+= --with-mysql-lib=${LOCALBASE}/lib/mysql \
|
|
|
|
--with-mysql-inc=${LOCALBASE}/include/mysql \
|
|
|
|
--with-mysql-xdata
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --with-template-extinfo
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_FILE_PERFDATA)
|
|
|
|
CONFIGURE_ARGS+=--with-file-perfdata
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_PGSQL)
|
|
|
|
LIB_DEPENDS+= pq.3:${PORTSDIR}/databases/postgresql7
|
|
|
|
CONFIGURE_ARGS+=--with-pgsql-lib=${LOCALBASE}/pgsql \
|
|
|
|
--with-pgsql-inc=${LOCALBASE}/pgsql \
|
|
|
|
--with-pgsql-xdata
|
|
|
|
.endif
|
|
|
|
|
2004-02-11 04:56:00 +00:00
|
|
|
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:
|
2005-04-06 10:00:52 +00:00
|
|
|
for file in nagios.sh INSTALL DEINSTALL MESSAGE; do \
|
|
|
|
${SED} ${SED_SCRIPT} < ${FILESDIR}/$${file}.tmpl >${WRKDIR}/$${file}; \
|
2004-02-11 04:56:00 +00:00
|
|
|
done
|
2000-07-12 18:43:32 +00:00
|
|
|
|
|
|
|
pre-install:
|
2004-02-11 04:56:00 +00:00
|
|
|
@${SH} ${PKGINSTALL} ${DISTNAME} PRE-INSTALL
|
|
|
|
|
|
|
|
post-install:
|
|
|
|
@${INSTALL_SCRIPT} ${WRKDIR}/nagios.sh ${PREFIX}/etc/rc.d/
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
2000-07-12 18:43:32 +00:00
|
|
|
|
2004-07-25 18:48:12 +00:00
|
|
|
.include <bsd.port.post.mk>
|