summaryrefslogtreecommitdiff
path: root/net/ucd-snmp-current/Makefile
blob: 6557596a706821f181b9ab7a9b67a236fb5e864f (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
# $NetBSD: Makefile,v 1.6 2001/02/17 18:19:49 wiz Exp $
#

DISTNAME=	ucd-snmp-4.0.1
PKGNAME=	${DISTNAME}.12
CATEGORIES=	net
MASTER_SITES= 	ftp://ucd-snmp.ucdavis.edu/ \
		ftp://sunsite.cnlab-switch.ch/mirror/ucd-snmp/

# This patch is malformed (first Index line is missing, other
# Index lines are relative to the agent directory), so I've
# put a fixed copy in ${FILESDIR}.  (kim 1999-09-21)

#PATCH_SITES=	http://ucd-snmp.ucdavis.edu/patches/
#PATCHFILES=	012.patch
#DIST_SUBDIR=	ucd-snmp

MAINTAINER=	packages@netbsd.org
HOMEPAGE=	http://www.ece.ucdavis.edu/ucd-snmp/
COMMENT=	Extensible SNMP implementation

BUILD_DEPENDS+=	${LOCALBASE}/bin/autoconf:../../devel/autoconf

GNU_CONFIGURE=	yes
CONFIGURE_ARGS+= --with-defaults
CONFIGURE_ARGS+= --with-dummy-values
CONFIGURE_ARGS+= --with-libwrap
CONFIGURE_ARGS+= --with-sys-contact=root
# note the default appends a redundant and silly ".log"
CONFIGURE_ARGS+= --with-logfile="/var/log/snmpd"
# this might make it easier to use scotty's mibs, and local ones too
CONFIGURE_ARGS+= --with-mibdirs="${PREFIX}/share/snmp/mibs:${PREFIX}/lib/tnm2.1.8/mibs:/usr/local/share/snmp/mibs"

# pass down PKG_PREFIX to simulate pkg_add's environment
MAKE_ENV+=	PKG_PREFIX="${PREFIX}"

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

pre-configure:
	(cd ${WRKSRC}; autoreconf --force)

# Need to run INSTALL script as this doesn't happen automagically from pkgsrc.
post-install:
	@${MKDIR} ${PREFIX}/share/examples/ucd-snmp
	@for F in ${WRKSRC}/etc/* ; do \
		${INSTALL_DATA} $$F ${PREFIX}/share/examples/ucd-snmp ; \
	done
	${ECHO} "Creating ${PREFIX}/etc/rc.d/snmpd startup file."; \
	${ECHO} "#!/bin/sh" > ${PREFIX}/etc/rc.d/snmpd; \
	${ECHO} "[ -x ${PREFIX}/sbin/snmpd ] && ${PREFIX}/sbin/snmpd && ${ECHO} -n ' snmpd'" >> ${PREFIX}/etc/rc.d/snmpd
	${CHMOD} 755 ${PREFIX}/etc/rc.d/snmpd
	${INSTALL_DATA_DIR} ${PREFIX}/lib/snmp/dlmod
	${TOUCH} ${PREFIX}/lib/snmp/dlmod/.keepme

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