aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/snmp4nagios/Makefile
blob: cb340e37ca320d92bada8eb204d396b53c8ec8df (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
# Created by: Ryan Steinmetz
# $FreeBSD$

PORTNAME=   SNMP4Nagios
PORTVERSION=    0.4
PORTREVISION=   2
CATEGORIES= net-mgmt
MASTER_SITES=   SF/${PORTNAME:tl}/${PORTNAME}/${PORTVERSION}

MAINTAINER= zi@FreeBSD.org
COMMENT=    Vendor specific SNMP plugins for Nagios

BUILD_DEPENDS=  snmpcheck:${PORTSDIR}/net-mgmt/net-snmp
RUN_DEPENDS=    snmpcheck:${PORTSDIR}/net-mgmt/net-snmp

GNU_CONFIGURE=  yes

NAGIOSWWWDIR?=  www/nagios
NAGIOSDIR?= /var/spool/nagios

OPTIONS_DEFINE= RRDTOOL
RRDTOOL_DESC=   Build with rrdtool support

.include <bsd.port.options.mk>

CONFIGURE_ARGS= --sbindir=${PREFIX}/${NAGIOSWWWDIR}/cgi-bin \
        --bindir=${PREFIX}/libexec/nagios \
        --libexecdir=${PREFIX}/libexec/nagios \
        --datadir=${PREFIX}/share \
        --sysconfdir=${PREFIX}/etc/nagios \
        --localstatedir=${NAGIOSDIR} \
        --with-rrddir=${NAGIOSDIR}/snmp4nagios/rrd \
        --with-pngdir=${NAGIOSDIR}/snmp4nagios/png \
        --prefix=${PREFIX}

CONFIGURE_ENV=  LIBS="-L${LOCALBASE}/lib"
CFLAGS+=    -I${LOCALBASE}/include

.include <bsd.port.pre.mk>

.if ${PORT_OPTIONS:MRRDTOOL}
LIB_DEPENDS+=   rrd:${PORTSDIR}/databases/rrdtool
CONFIGURE_ARGS+=--with-rrd
PLIST_SUB+= RRD=""
.else
CONFIGURE_ARGS+=--with-rrd=no
PLIST_SUB+= RRD="@comment "
.endif

.include <bsd.port.post.mk>