2005-08-06 08:19:03 +02:00
|
|
|
# $NetBSD: Makefile,v 1.36 2005/08/06 06:19:24 jlam Exp $
|
2002-10-24 10:29:33 +02:00
|
|
|
|
2005-07-08 09:49:27 +02:00
|
|
|
DISTNAME= net-snmp-5.2.1.2
|
2005-08-06 08:19:03 +02:00
|
|
|
PKGREVISION= 1
|
2002-10-24 10:29:33 +02:00
|
|
|
CATEGORIES= net
|
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=net-snmp/} \
|
|
|
|
ftp://ftp.net-smnp.org/pub/sourceforge/net-snmp/
|
|
|
|
|
2005-03-30 14:10:58 +02:00
|
|
|
MAINTAINER= adam@NetBSD.org
|
2002-10-24 10:29:33 +02:00
|
|
|
HOMEPAGE= http://www.net-snmp.org/
|
|
|
|
COMMENT= Extensible SNMP implementation
|
|
|
|
|
|
|
|
CONFLICTS= ucd-snmp-[0-9]*
|
|
|
|
|
2005-08-01 13:55:55 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2004-02-14 18:21:32 +01:00
|
|
|
USE_LIBTOOL= yes
|
|
|
|
|
2004-11-05 11:33:07 +01:00
|
|
|
# The self-test of Perl modules only works after installation because perl
|
|
|
|
# can't load the shared libraries from WRKSRC/
|
|
|
|
# Until this is fixed you can test them after installation by doing
|
|
|
|
# `make test TEST_TARGET=perltest'
|
|
|
|
TEST_TARGET?= test
|
|
|
|
|
2003-01-28 23:03:00 +01:00
|
|
|
USE_PKGINSTALL= yes
|
2003-08-31 00:51:11 +02:00
|
|
|
DEINSTALL_EXTRA_TMPL+= ${.CURDIR}/DEINSTALL
|
|
|
|
|
2005-08-01 13:55:55 +02:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
|
|
|
.if ${OPSYS} == "NetBSD"
|
|
|
|
OSVERSION_SPECIFIC= YES
|
|
|
|
. if empty(CFLAGS:U:M*-Dnetbsd1*)
|
2002-10-24 10:29:33 +02:00
|
|
|
CFLAGS+= -Dnetbsd1
|
2005-08-01 13:55:55 +02:00
|
|
|
. endif
|
2002-10-24 10:29:33 +02:00
|
|
|
.endif
|
|
|
|
|
2005-08-01 13:55:55 +02:00
|
|
|
.if (${OPSYS} == "NetBSD") || !exists(/usr/bin/lpstat)
|
|
|
|
CONFIGURE_ENV+= ac_cv_path_LPSTAT_PATH=no
|
|
|
|
.endif
|
|
|
|
|
|
|
|
NET_SNMP_SYS_CONTACT?= default_user@contact.domain
|
|
|
|
NET_SNMP_SYS_LOCATION?= defaultlocation
|
|
|
|
NET_SNMP_PERSISTENTDIR?= ${VARBASE}/net-snmp
|
|
|
|
NET_SNMP_MIBDIRS?= \$$HOME/.snmp/mibs:${PREFIX}/share/snmp/mibs:${PREFIX}/lib/tcl/tnm2.1.10/mibs:/usr/local/share/snmp/mibs
|
2003-09-12 14:07:18 +02:00
|
|
|
|
2002-10-24 10:29:33 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-shared
|
|
|
|
CONFIGURE_ARGS+= --with-defaults
|
|
|
|
CONFIGURE_ARGS+= --with-libwrap
|
|
|
|
CONFIGURE_ARGS+= --with-sys-contact="${NET_SNMP_SYS_CONTACT}"
|
|
|
|
CONFIGURE_ARGS+= --with-sys-location="${NET_SNMP_SYS_LOCATION}"
|
2003-09-12 14:07:18 +02:00
|
|
|
#
|
|
|
|
# NOTE: if you specify a logfile then this file will be written to by
|
|
|
|
# default and although it can be disabled on the command line, the
|
|
|
|
# daemon must be stopped to cycle it properly. Remember rc.d/snmpd
|
|
|
|
# will use '-s' to enable standard syslog logging anyway.
|
|
|
|
#
|
2003-10-30 09:36:03 +01:00
|
|
|
CONFIGURE_ARGS+= --with-logfile=none
|
2002-10-24 10:29:33 +02:00
|
|
|
CONFIGURE_ARGS+= --with-persistent-directory="${NET_SNMP_PERSISTENTDIR}"
|
|
|
|
.if !empty(NET_SNMP_MIBDIRS)
|
|
|
|
CONFIGURE_ARGS+= --with-mibdirs="${NET_SNMP_MIBDIRS}"
|
|
|
|
.endif
|
2003-09-12 14:07:18 +02:00
|
|
|
CONFIGURE_ARGS+= --with-mib-modules="smux host"
|
2004-07-10 19:59:57 +02:00
|
|
|
.if (${OPSYS} == "Darwin")
|
|
|
|
CONFIGURE_ARGS+= --with-out-mib-modules="ucd-snmp/diskio mibII"
|
|
|
|
.endif
|
2002-10-24 10:29:33 +02:00
|
|
|
#
|
|
|
|
# Using "dummy" values is technically not compliant with SNMP specs, but
|
|
|
|
# otherwise, some tools, e.g. net/tcl-scotty, net/tkined, may ignore results
|
|
|
|
# when they shouldn't.
|
|
|
|
#
|
|
|
|
CONFIGURE_ARGS+= --with-dummy-values
|
2002-10-24 11:34:07 +02:00
|
|
|
#
|
|
|
|
# Install the UCD-SNMP look-alike headers and libraries to ease porting of
|
|
|
|
# older software to use net-snmp.
|
|
|
|
#
|
|
|
|
CONFIGURE_ARGS+= --enable-ucd-snmp-compatibility
|
2004-11-05 11:33:07 +01:00
|
|
|
#
|
|
|
|
# Enable the perl modules build and installation
|
|
|
|
#
|
|
|
|
CONFIGURE_ARGS+= --with-perl-modules=${MAKE_PARAMS:Q}
|
|
|
|
PERL5_CONFIGURE= NO
|
2005-07-13 20:01:18 +02:00
|
|
|
PERL5_PACKLIST= auto/Bundle/NetSNMP/.packlist
|
2002-10-24 10:29:33 +02:00
|
|
|
CONFIGURE_ENV+= PERLPROG="${PERL5}"
|
|
|
|
|
2005-08-01 13:55:55 +02:00
|
|
|
.include "options.mk"
|
2003-09-14 13:58:43 +02:00
|
|
|
|
2002-10-24 10:29:33 +02:00
|
|
|
# Handle ${PREFIX}/share/snmp in the DEINSTALL script since it may contain
|
|
|
|
# leftover config files or pidfiles after deinstallation.
|
|
|
|
#
|
|
|
|
OWN_DIRS= ${PREFIX}/share/snmp
|
|
|
|
RCD_SCRIPTS= snmpd snmptrapd
|
|
|
|
|
2004-11-28 20:19:51 +01:00
|
|
|
post-wrapper:
|
2002-10-24 10:29:33 +02:00
|
|
|
.if !empty(MACHINE_PLATFORM:MNetBSD-1.5.[123]*-i386)
|
|
|
|
${MKDIR} ${BUILDLINK_DIR}/include/sys
|
|
|
|
${CP} ${FILESDIR}/disklabel.h ${BUILDLINK_DIR}/include/sys
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-install:
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/net-snmp
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/EXAMPLE.conf \
|
|
|
|
${PREFIX}/share/examples/net-snmp/EXAMPLE.conf
|
|
|
|
|
2005-08-01 13:55:55 +02:00
|
|
|
.include "../../lang/perl5/module.mk"
|
|
|
|
.include "../../security/tcp_wrappers/buildlink3.mk"
|
2002-10-24 10:29:33 +02:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|