diff options
Diffstat (limited to 'net-mgmt/net-snmp-devel/Makefile')
-rw-r--r-- | net-mgmt/net-snmp-devel/Makefile | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/net-mgmt/net-snmp-devel/Makefile b/net-mgmt/net-snmp-devel/Makefile index 3591319a53cd..a44dec58eb36 100644 --- a/net-mgmt/net-snmp-devel/Makefile +++ b/net-mgmt/net-snmp-devel/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> |