aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/nagios-snmp-plugins/Makefile
blob: d2cbe422bf9fd90ac1d68fbc35ffad8d754a0007 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# New ports collection makefile for:    nagios-snmp-plugins
# Date created:             19 Jul 2004
# Whom:                 Bruce M Simpson <bms@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   nagios-snmp-plugins
PORTVERSION=    1.0
CATEGORIES= net-mgmt
MASTER_SITES=   ftp://ftp.hometree.net/pub/${PORTNAME}/

MAINTAINER= bms@spc.org
COMMENT=    Additional SNMP plugins for Nagios

LIB_DEPENDS=    netsnmp.6:${PORTSDIR}/net-mgmt/net-snmp
RUN_DEPENDS=    ${LOCALBASE}/libexec/nagios:${PORTSDIR}/net-mgmt/nagios-plugins

GNU_CONFIGURE=      yes
USE_AUTOMAKE_VER=   14
USE_AUTOCONF_VER=   213
USE_AUTOHEADER_VER= 213
USE_GETOPT_LONG=    yes
USE_GMAKE=      yes
USE_PERL5=      yes

NAGIOS_PLUGIN_DIR=  ${PREFIX}/libexec/nagios

AUTOMAKE_ARGS=      --add-missing
CONFIGURE_ARGS= --sbindir=${PREFIX}/share/nagios/cgi-bin \
        --libexecdir=${NAGIOS_PLUGIN_DIR} \
        --datadir=${PREFIX}/share/nagios \
        --sysconfdir=${PREFIX}/etc/nagios \
        --localstatedir=/var/spool/nagios \
        --with-snmp=${PREFIX}
CONFIGURE_ENV=  LOCALBASE=${LOCALBASE}

# Workaround configure.in lameness.
CONFIGURE_ENV+= CPPFLAGS="`net-snmp-config --cflags`"

pre-configure:
    @(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOMAKE_ENV} ${ACLOCAL} \
        --acdir=${ACLOCAL_DIR})
    @(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOMAKE_ENV} ${AUTOHEADER})
    @(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOMAKE_ENV} ${AUTOMAKE} \
        ${AUTOMAKE_ARGS})
    @(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${AUTOMAKE_ENV} ${AUTOCONF} \
        ${AUTOCONF_ARGS})

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/check_snmp_disk ${NAGIOS_PLUGIN_DIR}
    ${INSTALL_PROGRAM} ${WRKSRC}/check_snmp_proc ${NAGIOS_PLUGIN_DIR}
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
.endif

.include <bsd.port.mk>