summaryrefslogtreecommitdiff
path: root/net/ucd-snmp/Makefile
blob: c22abb9af490550de9df3f3754a4142df806afba (plain)
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
59
60
# $NetBSD: Makefile,v 1.25 2000/12/16 09:04:40 hubertf Exp $
# FreeBSD Id: Makefile,v 1.18 1998/04/06 20:50:31 andreas Exp
#

DISTNAME=	ucd-snmp-4.1.2
CATEGORIES=	net
MASTER_SITES=	ftp://download.sourceforge.net/net-snmp/ \
		ftp://ucd-snmp.ucdavis.edu/ \
		ftp://sunsite.cnlab-switch.ch/mirror/ucd-snmp/ \
		ftp://ftp.win.or.jp/pub/network/snmp/ucd-snmp/

#PATCH_SITES=	ftp://ftp.kame.net/pub/kame/misc/
#PATCHFILES=	ucd-snmp-4.0.1-v6-20000124b.diff.gz
#PATCH_DIST_STRIP=	-p1

MAINTAINER=	packages@netbsd.org
HOMEPAGE=	http://net-snmp.sourceforge.net/

BUILD_DEPENDS+=	autoreconf:../../devel/autoconf

BUILD_DEFS+=	USE_INET6

.include "../../mk/bsd.prefs.mk"

USE_LIBTOOL=	yes
USE_SSL=	yes

GNU_CONFIGURE=	yes
CONFIGURE_ARGS+=--with-defaults --with-libwrap --with-logfile="/var/log/snmpd"
CONFIGURE_ARGS+=--enable-shared
.if defined(USE_INET6) && ${USE_INET6} == "YES"
CONFIGURE_ARGS+=--enable-ipv6
.else
CONFIGURE_ARGS+=--disable-ipv6
.endif

# this might make it easier to use scotty's mibs, and local ones too
CONFIGURE_ARGS+=--with-mibdirs="${PREFIX}/share/snmp/mibs:${PREFIX}/lib/tcl/tnm2.1.10/mibs:/usr/local/share/snmp/mibs"

# deal with libwrap bogosity by providing these variables to programs which
# do not supply them:
post-extract:
	@${ECHO} 'int allow_severity, deny_severity;' >${WRKSRC}/snmplib/libwrap.c

pre-configure:
	@(cd ${WRKSRC} && autoreconf)

post-install:
	${MKDIR} ${PREFIX}/share/examples/ucd-snmp
	${INSTALL_DATA} ${WRKSRC}/EXAMPLE.conf ${PREFIX}/share/examples/ucd-snmp
	${INSTALL_DATA_DIR} ${PREFIX}/lib/snmp/dlmod
	${SED} -e 's,@PREFIX@,${PREFIX},' \
	    < ${FILESDIR}/snmpd.sh > ${WRKDIR}/snmpd.sh
	${INSTALL_SCRIPT} ${WRKDIR}/snmpd.sh ${PREFIX}/etc/rc.d

.if (${OPSYS} == "NetBSD")
CFLAGS+=	-Dnetbsd1
.endif

.include "../../mk/bsd.pkg.mk"