2013-04-22 00:29:06 +02:00
|
|
|
# Created by: Blaz Zupan <blaz@si.FreeBSD.org>
|
2000-07-12 20:57:26 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2002-07-22 03:03:42 +02:00
|
|
|
PORTNAME= nagios-plugins
|
2013-12-10 15:29:31 +01:00
|
|
|
PORTVERSION= 1.5
|
2005-02-12 20:20:48 +01:00
|
|
|
PORTEPOCH= 1
|
2004-02-23 05:42:13 +01:00
|
|
|
CATEGORIES= net-mgmt
|
2013-12-10 15:29:31 +01:00
|
|
|
MASTER_SITES= https://www.nagios-plugins.org/download/
|
2000-07-12 20:57:26 +02:00
|
|
|
|
2013-07-24 15:32:38 +02:00
|
|
|
MAINTAINER= demon@FreeBSD.org
|
2006-05-15 15:07:20 +02:00
|
|
|
COMMENT= Plugins for Nagios
|
2004-07-26 20:15:21 +02:00
|
|
|
|
2013-09-14 18:38:28 +02:00
|
|
|
USES= charsetfix gmake perl5
|
2013-06-20 17:57:33 +02:00
|
|
|
CHARSETFIX_MAKEFILEIN=Makefile.am
|
2002-03-25 10:19:20 +01:00
|
|
|
USE_SUBMAKE= yes
|
2010-12-04 08:34:27 +01:00
|
|
|
USE_AUTOTOOLS= libtool aclocal autoconf automake
|
2009-12-26 11:18:11 +01:00
|
|
|
ACLOCAL_ARGS= -I m4 -I gl/m4
|
2013-07-16 07:42:36 +02:00
|
|
|
AUTOMAKE_ARGS= --add-missing
|
2006-05-15 15:07:20 +02:00
|
|
|
|
2013-12-10 15:29:31 +01:00
|
|
|
OPTIONS_DEFINE= QSTAT FPING NETSNMP RADIUS MYSQL PGSQL LDAP IPV6 JAIL NLS DBI
|
2013-11-22 12:43:19 +01:00
|
|
|
OPTIONS_DEFAULT=IPV6
|
2012-08-22 02:55:25 +02:00
|
|
|
|
|
|
|
QSTAT_DESC= Game server query support (check_game)
|
|
|
|
FPING_DESC= Support for non-flooding fast ping (check_fping)
|
|
|
|
NETSNMP_DESC= SNMP support (check_snmp)
|
|
|
|
RADIUS_DESC= Radius support (check_radius)
|
|
|
|
MYSQL_DESC= MySQL support (check_mysql)
|
|
|
|
PGSQL_DESC= PostgreSQL support (check_pgsql)
|
|
|
|
LDAP_DESC= OpenLDAP support (check_ldap)
|
|
|
|
JAIL_DESC= Compilation within jail(8) (see Makefile)
|
2013-12-10 15:29:31 +01:00
|
|
|
DBI_DESC= Check database using DBI
|
2006-05-15 15:07:20 +02:00
|
|
|
|
2001-03-30 21:08:16 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2006-05-15 15:07:20 +02:00
|
|
|
|
2007-05-27 19:42:13 +02:00
|
|
|
NAGIOSUSER?= nagios
|
|
|
|
NAGIOSGROUP?= nagios
|
2006-05-15 15:07:20 +02:00
|
|
|
NAGIOSDIR?= /var/spool/nagios
|
|
|
|
|
|
|
|
NAGIOSWWWDIR?= www/nagios
|
|
|
|
NAGIOSHTMURL?= /nagios
|
|
|
|
NAGIOSCGIURL?= ${NAGIOSHTMURL}/cgi-bin
|
|
|
|
|
2009-04-09 01:53:22 +02:00
|
|
|
NAGIOSPOLLIP?= 127.0.0.1
|
2010-07-07 09:04:31 +02:00
|
|
|
NAGIOSPOLLIP6?= ::1
|
2009-04-09 01:53:22 +02:00
|
|
|
|
2013-12-10 15:29:31 +01:00
|
|
|
NEED_ROOT= yes # check_icmp, check_dhcp
|
|
|
|
|
2013-05-02 08:49:34 +02:00
|
|
|
.include <bsd.port.options.mk>
|
2006-05-15 15:07:20 +02:00
|
|
|
|
2007-05-27 19:42:13 +02:00
|
|
|
CONFIGURE_ARGS= --with-nagios-user=${NAGIOSUSER} \
|
|
|
|
--with-nagios-group=${NAGIOSGROUP} \
|
|
|
|
--with-cgiurl=${NAGIOSCGIURL} \
|
2006-05-15 15:07:20 +02:00
|
|
|
--sbindir=${PREFIX}/${NAGIOSWWWDIR}/cgi-bin \
|
2002-07-22 03:03:42 +02:00
|
|
|
--libexecdir=${PREFIX}/libexec/nagios \
|
2007-06-09 10:21:38 +02:00
|
|
|
--datadir=${PREFIX}/share \
|
2002-07-22 03:03:42 +02:00
|
|
|
--sysconfdir=${PREFIX}/etc/nagios \
|
2006-05-15 15:07:20 +02:00
|
|
|
--localstatedir=${NAGIOSDIR} \
|
|
|
|
--prefix=${PREFIX}
|
|
|
|
|
2011-09-24 00:26:39 +02:00
|
|
|
CONFIGURE_ENV= PERL=${PERL}
|
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
|
|
|
CFLAGS+= -I${LOCALBASE}/include
|
2004-07-26 20:15:21 +02:00
|
|
|
|
2012-08-22 02:55:25 +02:00
|
|
|
.if ${PORT_OPTIONS:MQSTAT}
|
2004-07-26 20:15:21 +02:00
|
|
|
BUILD_DEPENDS+= qstat:${PORTSDIR}/games/qstat
|
|
|
|
RUN_DEPENDS+= qstat:${PORTSDIR}/games/qstat
|
2006-05-15 15:07:20 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-qstat
|
2004-07-26 20:15:21 +02:00
|
|
|
PLIST_SUB+= SUB_QSTAT=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= SUB_QSTAT="@comment "
|
|
|
|
.endif
|
|
|
|
|
2012-08-22 02:55:25 +02:00
|
|
|
.if ${PORT_OPTIONS:MIPV6}
|
2006-05-15 15:07:20 +02:00
|
|
|
CONFIGURE_ARGS+= --with-ipv6
|
2005-10-15 13:45:50 +02:00
|
|
|
.else
|
2006-05-15 15:07:20 +02:00
|
|
|
CONFIGURE_ARGS+= --without-ipv6
|
2005-10-15 13:45:50 +02:00
|
|
|
.endif
|
|
|
|
|
2012-08-22 02:55:25 +02:00
|
|
|
.if ${PORT_OPTIONS:MFPING}
|
2004-07-26 20:15:21 +02:00
|
|
|
BUILD_DEPENDS+= fping:${PORTSDIR}/net/fping
|
|
|
|
RUN_DEPENDS+= fping:${PORTSDIR}/net/fping
|
2006-05-15 15:07:20 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-fping
|
2004-07-26 20:15:21 +02:00
|
|
|
PLIST_SUB+= SUB_FPING=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= SUB_FPING="@comment "
|
|
|
|
.endif
|
|
|
|
|
2012-08-22 02:55:25 +02:00
|
|
|
.if ${PORT_OPTIONS:MNETSNMP}
|
2004-07-26 20:15:21 +02:00
|
|
|
BUILD_DEPENDS+= snmpcheck:${PORTSDIR}/net-mgmt/net-snmp \
|
2012-06-30 14:42:52 +02:00
|
|
|
p5-Net-SNMP>=0:${PORTSDIR}/net-mgmt/p5-Net-SNMP
|
2004-07-26 20:15:21 +02:00
|
|
|
RUN_DEPENDS+= snmpcheck:${PORTSDIR}/net-mgmt/net-snmp \
|
2012-06-30 14:42:52 +02:00
|
|
|
p5-Net-SNMP>=0:${PORTSDIR}/net-mgmt/p5-Net-SNMP
|
2006-05-15 15:07:20 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-snmp
|
2004-07-26 20:15:21 +02:00
|
|
|
PLIST_SUB+= SUB_SNMP=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= SUB_SNMP="@comment "
|
|
|
|
.endif
|
|
|
|
|
2012-08-22 02:55:25 +02:00
|
|
|
.if ${PORT_OPTIONS:MRADIUS}
|
|
|
|
LIB_DEPENDS+= radiusclient-ng:${PORTSDIR}/net/radiusclient
|
2004-07-26 20:15:21 +02:00
|
|
|
PLIST_SUB+= SUB_RADIUS=""
|
|
|
|
.else
|
2013-12-10 15:29:31 +01:00
|
|
|
CONFIGURE_ARGS+= --without-radius
|
2004-07-26 20:15:21 +02:00
|
|
|
PLIST_SUB+= SUB_RADIUS="@comment "
|
|
|
|
.endif
|
|
|
|
|
2012-08-22 02:55:25 +02:00
|
|
|
.if ${PORT_OPTIONS:MMYSQL}
|
2004-07-26 20:15:21 +02:00
|
|
|
USE_MYSQL= YES
|
2006-05-15 15:07:20 +02:00
|
|
|
CONFIGURE_ARGS+= --with-mysql=${LOCALBASE}
|
2004-07-26 20:15:21 +02:00
|
|
|
PLIST_SUB+= SUB_MYSQL=""
|
|
|
|
.else
|
2006-11-01 11:39:08 +01:00
|
|
|
CONFIGURE_ARGS+= --without-mysql
|
2004-07-26 20:15:21 +02:00
|
|
|
PLIST_SUB+= SUB_MYSQL="@comment "
|
|
|
|
.endif
|
|
|
|
|
2012-08-22 02:55:25 +02:00
|
|
|
.if ${PORT_OPTIONS:MPGSQL}
|
2005-01-31 01:35:55 +01:00
|
|
|
USE_PGSQL= YES
|
2006-05-15 15:07:20 +02:00
|
|
|
CONFIGURE_ARGS+= --with-pgsql=${LOCALBASE}
|
2004-07-26 20:15:21 +02:00
|
|
|
PLIST_SUB+= SUB_PGSQL=""
|
|
|
|
.else
|
2006-05-15 15:07:20 +02:00
|
|
|
CONFIGURE_ARGS+= --with-pgsql=${NONEXISTENT}
|
2004-07-26 20:15:21 +02:00
|
|
|
PLIST_SUB+= SUB_PGSQL="@comment "
|
|
|
|
.endif
|
|
|
|
|
2012-08-22 02:55:25 +02:00
|
|
|
.if ${PORT_OPTIONS:MLDAP}
|
2004-07-26 20:15:21 +02:00
|
|
|
USE_OPENLDAP= YES
|
|
|
|
PLIST_SUB+= SUB_LDAP=""
|
|
|
|
.else
|
2013-12-10 15:29:31 +01:00
|
|
|
CONFIGURE_ARGS+= --without-ldap
|
2004-07-26 20:15:21 +02:00
|
|
|
PLIST_SUB+= SUB_LDAP="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-05-02 08:49:34 +02:00
|
|
|
.if ${PORT_OPTIONS:MNLS}
|
|
|
|
USES+= gettext
|
|
|
|
PLIST_SUB+= NLS=""
|
|
|
|
.else
|
2007-06-09 10:21:38 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-nls
|
|
|
|
PLIST_SUB+= NLS="@comment "
|
|
|
|
.endif
|
|
|
|
|
2013-12-10 15:29:31 +01:00
|
|
|
.if ${PORT_OPTIONS:MDBI}
|
|
|
|
PLIST_SUB+= SUB_DBI=""
|
|
|
|
LIB_DEPENDS+= libdbi.so:${PORTSDIR}/databases/libdbi
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-dbi
|
|
|
|
PLIST_SUB+= SUB_DBI="@comment "
|
|
|
|
.endif
|
|
|
|
|
2005-02-11 22:24:20 +01:00
|
|
|
post-patch:
|
2006-05-15 15:07:20 +02:00
|
|
|
.for file in check_by_ssh.c check_disk.c check_http.c check_mrtgtraf.c \
|
2012-08-22 02:55:25 +02:00
|
|
|
check_nagios.c check_ntp.c check_ntp_peer.c check_ntp_time.c \
|
|
|
|
check_pgsql.c check_snmp.c check_ssh.c check_swap.c check_time.c \
|
|
|
|
check_users.c
|
2005-02-11 22:24:20 +01:00
|
|
|
@${REINPLACE_CMD} -e 's|setlocale (LC_ALL, "");|setlocale (LC_ALL, ""); setlocale(LC_NUMERIC, "C");|g' ${WRKSRC}/plugins/${file}
|
|
|
|
.endfor
|
2012-08-22 02:55:25 +02:00
|
|
|
.if ${PORT_OPTIONS:MJAIL}
|
2009-04-09 01:53:22 +02:00
|
|
|
@${REINPLACE_CMD} -e 's# 127.0.0.1 # ${NAGIOSPOLLIP} #g' ${WRKSRC}/configure.in
|
2010-07-07 09:04:31 +02:00
|
|
|
@${REINPLACE_CMD} -e 's# ::1 # ${NAGIOSPOLLIP6} #g' ${WRKSRC}/configure.in
|
2009-04-09 01:53:22 +02:00
|
|
|
.endif
|
2000-07-12 20:57:26 +02:00
|
|
|
|
2013-05-02 08:49:34 +02:00
|
|
|
.include <bsd.port.mk>
|