2008-08-14 02:58:34 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= ndoutils
|
2009-12-26 22:29:54 +00:00
|
|
|
PORTVERSION= 1.4b8
|
2012-09-11 15:11:39 +00:00
|
|
|
PORTREVISION= 6
|
2008-08-14 02:58:34 +00:00
|
|
|
CATEGORIES= net-mgmt
|
2009-08-22 00:32:25 +00:00
|
|
|
MASTER_SITES= SF/nagios/${PORTNAME}-1.x/${PORTNAME}-${PORTVERSION}
|
2008-08-14 02:58:34 +00:00
|
|
|
|
2010-04-29 19:37:24 +00:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2008-08-14 02:58:34 +00:00
|
|
|
COMMENT= Keep Nagios perfdata in MySQL or Postgresql database
|
|
|
|
|
2008-12-25 14:42:24 +00:00
|
|
|
RUN_DEPENDS= ${LOCALBASE}/bin/nagios:${PORTSDIR}/net-mgmt/nagios
|
2008-08-14 02:58:34 +00:00
|
|
|
|
2012-09-11 15:11:39 +00:00
|
|
|
OPTIONS_MULTI= BACKEND
|
|
|
|
OPTIONS_MULTI_BACKEND= MYSQL PGSQL
|
|
|
|
OPTIONS_DEFAULT= MYSQL
|
|
|
|
MYSQL_DESC= MySQL backend support
|
|
|
|
PGSQL_DESC= Postgresql backend support
|
2009-12-26 22:29:54 +00:00
|
|
|
|
2009-05-01 19:18:56 +00:00
|
|
|
MAKE_JOBS_UNSAFE= yes
|
|
|
|
|
2008-08-14 02:58:34 +00:00
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
CFLAGS+= -I${LOCALBASE}/include -fPIC
|
|
|
|
CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc/ndoutils
|
|
|
|
|
|
|
|
CFG_FILES= misccommands ndo2db ndomod
|
|
|
|
|
2013-08-03 08:45:51 +00:00
|
|
|
USES= perl5
|
2008-08-14 02:58:34 +00:00
|
|
|
USE_RC_SUBR= ndo2db
|
|
|
|
SUB_FILES= pkg-message
|
|
|
|
|
2013-09-20 22:24:43 +00:00
|
|
|
NO_STAGE= yes
|
2009-12-26 22:29:54 +00:00
|
|
|
.include <bsd.port.options.mk>
|
2012-09-11 15:11:39 +00:00
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MMYSQL}
|
2008-08-14 02:58:34 +00:00
|
|
|
USE_MYSQL=yes
|
|
|
|
CONFIGURE_ARGS+= --enable-mysql \
|
|
|
|
--with-mysql-lib=${LOCALBASE}/lib/mysql \
|
|
|
|
--with-mysql-inc=${LOCALBASE}/include
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-mysql
|
|
|
|
.endif
|
|
|
|
|
2012-09-11 15:11:39 +00:00
|
|
|
.if ${PORT_OPTIONS:MPGSQL}
|
2008-08-14 02:58:34 +00:00
|
|
|
USE_PGSQL=yes
|
|
|
|
CONFIGURE_ARGS+= --enable-pgsql \
|
|
|
|
--with-pgsql-lib=${LOCALBASE}/lib/pgsql \
|
|
|
|
--with-pgsql-inc=${LOCALBASE}/include/pgsql
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-pgsql
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
PLIST_SUB+= PORTDOCS=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= PORTDOCS="@comment "
|
|
|
|
.endif
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
@${INSTALL_PROGRAM} ${WRKSRC}/src/ndo2db-3x ${PREFIX}/bin/
|
|
|
|
@${INSTALL_PROGRAM} ${WRKSRC}/src/ndomod-3x.o ${PREFIX}/bin/
|
|
|
|
@${INSTALL_PROGRAM} ${WRKSRC}/src/file2sock ${PREFIX}/bin/
|
|
|
|
@${INSTALL_PROGRAM} ${WRKSRC}/src/log2ndo ${PREFIX}/bin/
|
|
|
|
@${INSTALL_PROGRAM} ${WRKSRC}/src/sockdebug ${PREFIX}/bin/
|
|
|
|
@(cd ${WRKSRC}/db && ${COPYTREE_SHARE} \* ${DATADIR}/)
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@${MKDIR} ${DOCSDIR}
|
|
|
|
@(cd ${WRKSRC}/docs && ${COPYTREE_SHARE} \* ${DOCSDIR}/)
|
|
|
|
.endif
|
|
|
|
@for i in ${CFG_FILES}; do \
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/config/$${i}.cfg ${PREFIX}/etc/nagios/$${i}.cfg-sample; \
|
|
|
|
done
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/config/nagios.cfg ${PREFIX}/etc/nagios/ndoutils.cfg-sample
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|