diff options
author | Ade Lovett <ade@FreeBSD.org> | 2004-07-26 18:15:21 +0000 |
---|---|---|
committer | Ade Lovett <ade@FreeBSD.org> | 2004-07-26 18:15:21 +0000 |
commit | 4faf15b65ec18d699f4433982d62f380d97bcdaf (patch) | |
tree | 893f8584541906d96b800d21d72412aac1dc8d4c /net-mgmt | |
parent | a875e8c45b9c618da7e21254ba13adf6ed2b05d0 (diff) | |
download | ports-4faf15b65ec18d699f4433982d62f380d97bcdaf.tar.gz ports-4faf15b65ec18d699f4433982d62f380d97bcdaf.zip |
Notes
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/nagios-plugins/Makefile | 89 | ||||
-rw-r--r-- | net-mgmt/nagios-plugins/files/patch-check_http.c | 12 | ||||
-rw-r--r-- | net-mgmt/nagios-plugins/pkg-plist | 2 | ||||
-rw-r--r-- | net-mgmt/nagios-plugins/scripts/configure | 128 |
4 files changed, 88 insertions, 143 deletions
diff --git a/net-mgmt/nagios-plugins/Makefile b/net-mgmt/nagios-plugins/Makefile index 6463a3f17f8e..4118d477e489 100644 --- a/net-mgmt/nagios-plugins/Makefile +++ b/net-mgmt/nagios-plugins/Makefile @@ -7,7 +7,7 @@ PORTNAME= nagios-plugins PORTVERSION= 1.3.1 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= net-mgmt MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED} MASTER_SITE_SUBDIR= nagiosplug @@ -15,6 +15,16 @@ MASTER_SITE_SUBDIR= nagiosplug MAINTAINER= blaz@si.FreeBSD.org COMMENT= Plugins for nagios +OPTIONS= QSTAT "Game server query support" off \ + FPING "Support for non-flooding fast ping" off \ + NETSNMP "SNMP support" off \ + RADIUS "Radius support" off \ + MYSQL "MySQL support" off \ + PGSQL "PostgreSQL support" off \ + LDAP "OpenLDAP support" off + +.include <bsd.port.pre.mk> + USE_SUBMAKE= yes GNU_CONFIGURE= yes CONFIGURE_ARGS= --sbindir=${PREFIX}/share/nagios/cgi-bin \ @@ -23,26 +33,77 @@ CONFIGURE_ARGS= --sbindir=${PREFIX}/share/nagios/cgi-bin \ --sysconfdir=${PREFIX}/etc/nagios \ --localstatedir=/var/spool/nagios \ --with-df-command="/bin/df -Pkt noprocfs" + +.if defined(WITH_QSTAT) +BUILD_DEPENDS+= qstat:${PORTSDIR}/games/qstat +RUN_DEPENDS+= qstat:${PORTSDIR}/games/qstat +CONFIGURE_ARGS+=--enable-qstat +PLIST_SUB+= SUB_QSTAT="" +.else +PLIST_SUB+= SUB_QSTAT="@comment " +.endif + +.if defined(WITH_FPING) +BUILD_DEPENDS+= fping:${PORTSDIR}/net/fping +RUN_DEPENDS+= fping:${PORTSDIR}/net/fping +CONFIGURE_ARGS+=--enable-fping +PLIST_SUB+= SUB_FPING="" +.else +PLIST_SUB+= SUB_FPING="@comment " +.endif + +.if defined(WITH_NETSNMP) +BUILD_DEPENDS+= snmpcheck:${PORTSDIR}/net-mgmt/net-snmp \ + ${SITE_PERL}/Net/SNMP.pm:${PORTSDIR}/net-mgmt/p5-Net-SNMP +RUN_DEPENDS+= snmpcheck:${PORTSDIR}/net-mgmt/net-snmp \ + ${SITE_PERL}/Net/SNMP.pm:${PORTSDIR}/net-mgmt/p5-Net-SNMP +CONFIGURE_ARGS+=--enable-snmp +PLIST_SUB+= SUB_SNMP="" +.else +PLIST_SUB+= SUB_SNMP="@comment " +.endif + +.if defined(WITH_RADIUS) +LIB_DEPENDS+= radiusclient.0:${PORTSDIR}/net/radiusclient +CONFIGURE_ARGS+=--enable-radius +PLIST_SUB+= SUB_RADIUS="" +.else +PLIST_SUB+= SUB_RADIUS="@comment " +.endif + +.if defined(WITH_MYSQL) +USE_MYSQL= YES +CONFIGURE_ARGS+=--with-mysql=${LOCALBASE} +PLIST_SUB+= SUB_MYSQL="" +.else +PLIST_SUB+= SUB_MYSQL="@comment " +.endif + +.if defined(WITH_PGSQL) +POSTGRESQL_PORT?=databases/postgresql7 +LIB_DEPENDS+= pq.3:${PORTSDIR}/${POSTGRESQL_PORT} +CONFIGURE_ARGS+=--with-pgsql=${LOCALBASE} +PLIST_SUB+= SUB_PGSQL="" +.else +PLIST_SUB+= SUB_PGSQL="@comment " +.endif + +.if defined(WITH_LDAP) +USE_OPENLDAP= YES +CONFIGURE_ARGS+=--enable-ldap +PLIST_SUB+= SUB_LDAP="" +.else +PLIST_SUB+= SUB_LDAP="@comment " +.endif + CONFIGURE_ENV= LOCALBASE=${LOCALBASE} -SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ - MKDIR="${MKDIR}" USE_AUTOMAKE_VER= 14 USE_AUTOCONF_VER= 213 USE_GMAKE= yes USE_PERL5= yes -pre-fetch: - @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure - -.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) -.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" -.endif - pre-configure: @(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOMAKE_ENV} ${ACLOCAL} \ --acdir=${ACLOCAL_DIR}) -post-clean: - @${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc - -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/net-mgmt/nagios-plugins/files/patch-check_http.c b/net-mgmt/nagios-plugins/files/patch-check_http.c new file mode 100644 index 000000000000..f36426c5a0f9 --- /dev/null +++ b/net-mgmt/nagios-plugins/files/patch-check_http.c @@ -0,0 +1,12 @@ +--- plugins/check_http.c.orig Mon Jun 30 11:56:08 2003 ++++ plugins/check_http.c Fri Dec 19 23:03:52 2003 +@@ -198,3 +198,3 @@ + +-char timestamp[17] = ""; ++char timestamp[256] = ""; + int specify_port = FALSE; +@@ -975,3 +975,3 @@ + snprintf +- (timestamp, 16, "%02d/%02d/%04d %02d:%02d", ++ (timestamp, sizeof(timestamp), "%02d/%02d/%04d %02d:%02d", + stamp.tm_mon + 1, diff --git a/net-mgmt/nagios-plugins/pkg-plist b/net-mgmt/nagios-plugins/pkg-plist index 67bdc4487c11..c4684c01aa21 100644 --- a/net-mgmt/nagios-plugins/pkg-plist +++ b/net-mgmt/nagios-plugins/pkg-plist @@ -54,4 +54,4 @@ libexec/nagios/negate libexec/nagios/urlize libexec/nagios/utils.pm libexec/nagios/utils.sh -@dirrm libexec/nagios +@unexec rmdir %D/libexec/nagios 2>/dev/null || true diff --git a/net-mgmt/nagios-plugins/scripts/configure b/net-mgmt/nagios-plugins/scripts/configure deleted file mode 100644 index 17d3c798d47a..000000000000 --- a/net-mgmt/nagios-plugins/scripts/configure +++ /dev/null @@ -1,128 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then - exit -fi - -tempfile=`mktemp -t checklist` - -if [ "${NAGIOS_PLUGINS_OPTIONS}" ]; then - set ${NAGIOS_PLUGINS_OPTIONS} -fi - -for i; do - eval status_$i=ON -done - -if [ -z "${BATCH}" ]; then - /usr/bin/dialog --title "Nagios plugins configuration options" --clear \ - --checklist "\n\ -Please select desired options:" -1 -1 16 \ -QStat "Game server query support" "$status_QStat" \ -FPing "Support for non-flooding fast ping" "$status_FPing" \ -NetSNMP "SNMP support" "$status_NetSNMP" \ -Radius "Radius support" "$status_Radius" \ -MySQL "MySQL support" "$status_MySQL" \ -PgSQL "PostgreSQL support" "$status_PgSQL" \ -OpenLDAP "OpenLDAP support" "$status_OpenLDAP" \ -2> $tempfile - - retval=$? - - if [ -s $tempfile ]; then - set `sed 's/"//g' $tempfile` - fi - rm -f $tempfile - - case $retval in - 0) if [ -z "$*" ]; then - echo "Nothing selected" - fi - ;; - 1) echo "Cancel pressed." - exit 1 - ;; - esac -fi - -${MKDIR} ${WRKDIRPREFIX}${CURDIR} -exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - -echo "PREFIX= ${PREFIX}" - -SUB_QSTAT="@comment " -SUB_FPING="@comment " -SUB_SNMP="@comment " -SUB_RADIUS="@comment " -SUB_MYSQL="@comment " -SUB_PGSQL="@comment " -SUB_LDAP="@comment " - -while [ "$1" ]; do - case $1 in - QStat) - echo "BUILD_DEPENDS+= qstat:\${PORTSDIR}/games/qstat" - echo "RUN_DEPENDS+= qstat:\${PORTSDIR}/games/qstat" - echo "CONFIGURE_ARGS+= --enable-qstat" - SUB_QSTAT="" - ;; - FPing) - echo "BUILD_DEPENDS+= fping:\${PORTSDIR}/net/fping" - echo "RUN_DEPENDS+= fping:\${PORTSDIR}/net/fping" - echo "CONFIGURE_ARGS+= --enable-fping" - SUB_FPING="" - ;; - NetSNMP) - echo "BUILD_DEPENDS+= snmpcheck:\${PORTSDIR}/net-mgmt/net-snmp" - echo "RUN_DEPENDS+= snmpcheck:\${PORTSDIR}/net-mgmt/net-snmp" - echo "BUILD_DEPENDS+= \${LOCALBASE}/lib/perl5/site_perl/\${PERL_VER}/Net/SNMP.pm:\${PORTSDIR}/net-mgmt/p5-Net-SNMP" - echo "RUN_DEPENDS+= \${LOCALBASE}/lib/perl5/site_perl/\${PERL_VER}/Net/SNMP.pm:\${PORTSDIR}/net-mgmt/p5-Net-SNMP" - echo "CONFIGURE_ARGS+= --enable-snmp" - SUB_SNMP="" - ;; - Radius) - echo "LIB_DEPENDS+= radiusclient.0:\${PORTSDIR}/net/radiusclient" - echo "CONFIGURE_ARGS+= --enable-radius" - SUB_RADIUS="" - ;; - MySQL) - echo ".if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.12)" - echo "LIB_DEPENDS+= mysqlclient.12:${PORTSDIR}/databases/mysql40-client" - echo ".else" - echo ".if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.14)" - echo "LIB_DEPENDS+= mysqlclient.14:${PORTSDIR}/databases/mysql41-client" - echo ".else" - echo "LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client" - echo ".endif" - echo ".endif" - echo "CONFIGURE_ARGS+= --with-mysql=\${LOCALBASE}" - SUB_MYSQL="" - ;; - PgSQL) - echo "POSTGRESQL_PORT?= databases/postgresql7" - echo "LIB_DEPENDS+= pq.3:\${PORTSDIR}/\${POSTGRESQL_PORT}" - echo "CONFIGURE_ARGS+= --with-pgsql=\${LOCALBASE}" - SUB_PGSQL="" - ;; - OpenLDAP) - echo "USE_OPENLDAP= yes" - echo "CONFIGURE_ARGS+= --enable-ldap" - SUB_LDAP="" - ;; - *) - echo "Unknown option(s): $*" > /dev/stderr - rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc - exit 1 - ;; - esac - shift -done - -echo "PLIST_SUB+= SUB_QSTAT=\"${SUB_QSTAT}\"" -echo "PLIST_SUB+= SUB_FPING=\"${SUB_FPING}\"" -echo "PLIST_SUB+= SUB_SNMP=\"${SUB_SNMP}\"" -echo "PLIST_SUB+= SUB_RADIUS=\"${SUB_RADIUS}\"" -echo "PLIST_SUB+= SUB_MYSQL=\"${SUB_MYSQL}\"" -echo "PLIST_SUB+= SUB_PGSQL=\"${SUB_PGSQL}\"" -echo "PLIST_SUB+= SUB_LDAP=\"${SUB_LDAP}\"" |