aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/net-snmp/Makefile
diff options
context:
space:
mode:
authorkuriyama <kuriyama@FreeBSD.org>2002-09-17 10:17:09 +0800
committerkuriyama <kuriyama@FreeBSD.org>2002-09-17 10:17:09 +0800
commit946b48dbdd2135fb62a70f5335246bf4f2b8e4a9 (patch)
tree5e7a855a1e084ed9f13db8b013ed0288ec9f3dd4 /net-mgmt/net-snmp/Makefile
parent95a10349a56b24191ae157765eb53eb3d416bbd0 (diff)
downloadfreebsd-ports-graphics-946b48dbdd2135fb62a70f5335246bf4f2b8e4a9.tar.gz
freebsd-ports-graphics-946b48dbdd2135fb62a70f5335246bf4f2b8e4a9.tar.zst
freebsd-ports-graphics-946b48dbdd2135fb62a70f5335246bf4f2b8e4a9.zip
HEADS UP: After this commit, snmpd is not enabled by default.
See pkg-message for details. * Use /etc/rc.conf variables to control snmpd invocation. * Add some make variables to set default values. Requested by: many people :-)
Diffstat (limited to 'net-mgmt/net-snmp/Makefile')
-rw-r--r--net-mgmt/net-snmp/Makefile25
1 files changed, 19 insertions, 6 deletions
diff --git a/net-mgmt/net-snmp/Makefile b/net-mgmt/net-snmp/Makefile
index 3591319a53c..a44dec58eb3 100644
--- a/net-mgmt/net-snmp/Makefile
+++ b/net-mgmt/net-snmp/Makefile
@@ -7,7 +7,7 @@
PORTNAME= net-snmp
PORTVERSION= 5.0.3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
ftp://sunsite.cnlab-switch.ch/mirror/ucd-snmp/ \
@@ -23,6 +23,11 @@ LIBTOOLFLAGS= --disable-ltlibs --release-ignore
NO_LATEST_LINK= yes
CONFIGURE_ARGS+= --enable-shared --with-mib-modules="host ucd-snmp/diskio" \
+ --with-default-snmp-version="${DEFAULT_SNMP_VERSION}" \
+ --with-sys-contact="${NET_SNMP_SYS_CONTACT}" \
+ --with-sys-location="${NET_SNMP_SYS_LOCATION}" \
+ --with-logfile="${NET_SNMP_LOGFILE}" \
+ --with-persistent-directory="${NET_SNMP_PERSISTENTDIR}" \
--with-gnu-ld --with-libwrap --with-libs="-lkvm -ldevstat"
.if defined(BATCH)
CONFIGURE_ARGS+= --with-defaults --with-sys-contact=nobody@no.where
@@ -30,6 +35,12 @@ CONFIGURE_ARGS+= --with-defaults --with-sys-contact=nobody@no.where
IS_INTERACTIVE= yes
.endif
+DEFAULT_SNMP_VERSION?= 3
+NET_SNMP_SYS_CONTACT?= nobody@no.where
+NET_SNMP_SYS_LOCATION?=
+NET_SNMP_LOGFILE?= /var/log/snmpd.log
+NET_SNMP_PERSISTENTDIR?=/var/net-snmp
+
MAN1= mib2c.1 \
snmpbulkget.1 snmpbulkwalk.1 snmpcmd.1 snmpconf.1 snmpd.1 \
snmpdelta.1 snmpdf.1 snmpget.1 snmpgetnext.1 snmpinform.1 \
@@ -81,15 +92,17 @@ PLIST_SUB+= shlib=${SHLIB_VERSION}
post-patch:
@${PERL} -pi -e "s|%%LOCALBASE%%|${LOCALBASE}|g" ${WRKSRC}/aclocal.m4
+pre-install:
+ -@[ -f ${STARTUP_FILE} ] && \
+ (echo "Remove old ${STARTUP_FILE} before install." && exit 1)
+
post-install:
@( cd ${PREFIX}/bin && ${STRIP_CMD} ${BIN} )
@( cd ${PREFIX}/sbin && ${STRIP_CMD} ${SBIN} )
@${FIND} ${PREFIX}/include/net-snmp ${PREFIX}/share/snmp/mibs -type f \
| ${XARGS} ${CHMOD} 644
- @${INSTALL_SCRIPT} -m 751 ${FILESDIR}/snmpd.sh.sample ${PREFIX}/etc/rc.d
- @if [ ! -f ${STARTUP_FILE} ]; then \
- ${ECHO} "Creating ${PREFIX}/etc/rc.d/snmpd.sh startup file."; \
- ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/snmpd.sh.sample ${STARTUP_FILE}; \
- fi
+ @${INSTALL_SCRIPT} -m 751 ${FILESDIR}/snmpd.sh.sample ${STARTUP_FILE}
+ @${ECHO_MSG}
+ @${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>