1 ################################################################################
5 ################################################################################
7 NETSNMP_VERSION
= 5.7.3
8 NETSNMP_SITE
= http
://downloads.sourceforge.net
/project
/net-snmp
/net-snmp
/$(NETSNMP_VERSION
)
9 NETSNMP_SOURCE
= net-snmp-
$(NETSNMP_VERSION
).
tar.gz
10 NETSNMP_LICENSE
= Various BSD-like
11 NETSNMP_LICENSE_FILES
= COPYING
12 NETSNMP_INSTALL_STAGING
= YES
13 NETSNMP_CONF_ENV
= ac_cv_NETSNMP_CAN_USE_SYSCTL
=no
15 --with-persistent-directory
=/var
/lib
/snmp \
20 --without-kmem-usage \
22 --without-perl-modules \
23 --disable-embedded-perl \
24 --disable-perl-cc-checks \
26 --with-default-snmp-version
="1" \
27 --enable-silent-libtool \
28 --enable-mfd-rewrites \
29 --with-sys-contact
="root@localhost" \
30 --with-sys-location
="Unknown" \
31 --with-mib-modules
="$(call qstrip,$(BR2_PACKAGE_NETSNMP_WITH_MIB_MODULES))" \
32 --with-out-mib-modules
="$(call qstrip,$(BR2_PACKAGE_NETSNMP_WITHOUT_MIB_MODULES))" \
33 --with-out-transports
="Unix" \
35 NETSNMP_INSTALL_STAGING_OPTS
= DESTDIR
=$(STAGING_DIR
) LIB_LDCONFIG_CMD
=true
install
36 NETSNMP_INSTALL_TARGET_OPTS
= DESTDIR
=$(TARGET_DIR
) LIB_LDCONFIG_CMD
=true
install
37 NETSNMP_MAKE
= $(MAKE1
)
38 NETSNMP_CONFIG_SCRIPTS
= net-snmp-config
39 NETSNMP_AUTORECONF
= YES
41 NETSNMP_BLOAT_MIBS
= BRIDGE DISMAN-EVENT DISMAN-SCHEDULE DISMAN-SCRIPT EtherLike RFC-1215 RFC1155-SMI RFC1213 SCTP SMUX
43 ifeq ($(BR2_ENDIAN
),"BIG")
44 NETSNMP_CONF_OPTS
+= --with-endianness
=big
46 NETSNMP_CONF_OPTS
+= --with-endianness
=little
49 ifeq ($(BR2_PACKAGE_LIBNL
),y
)
50 NETSNMP_DEPENDENCIES
+= host-pkgconf libnl
51 NETSNMP_CONF_OPTS
+= --with-nl
53 NETSNMP_CONF_OPTS
+= --without-nl
57 ifeq ($(BR2_PACKAGE_OPENSSL
),y
)
58 NETSNMP_DEPENDENCIES
+= openssl
59 NETSNMP_CONF_OPTS
+= \
60 --with-openssl
=$(STAGING_DIR
)/usr
/include/openssl \
61 --with-security-modules
="tsm,usm" \
62 --with-transports
="DTLSUDP,TLSTCP"
63 ifeq ($(BR2_STATIC_LIBS
),y
)
64 # openssl uses zlib, so we need to explicitly link with it when static
65 NETSNMP_CONF_ENV
+= LIBS
=-lz
67 else ifeq ($(BR2_PACKAGE_NETSNMP_OPENSSL_INTERNAL
),y
)
68 NETSNMP_CONF_OPTS
+= --with-openssl
=internal
70 NETSNMP_CONF_OPTS
+= --without-openssl
73 # There's no option to forcibly enable or disable it
74 ifeq ($(BR2_PACKAGE_PCIUTILS
),y
)
75 NETSNMP_DEPENDENCIES
+= pciutils
78 # For ucd-snmp/lmsensorsMib
79 ifeq ($(BR2_PACKAGE_LM_SENSORS
),y
)
80 NETSNMP_DEPENDENCIES
+= lm-sensors
83 ifneq ($(BR2_PACKAGE_NETSNMP_ENABLE_MIBS
),y
)
84 NETSNMP_CONF_OPTS
+= --disable-mib-loading
85 NETSNMP_CONF_OPTS
+= --disable-mibs
88 ifneq ($(BR2_PACKAGE_NETSNMP_ENABLE_DEBUGGING
),y
)
89 NETSNMP_CONF_OPTS
+= --disable-debugging
92 ifeq ($(BR2_PACKAGE_NETSNMP_SERVER
),y
)
93 NETSNMP_CONF_OPTS
+= --enable-agent
95 NETSNMP_CONF_OPTS
+= --disable-agent
98 ifeq ($(BR2_PACKAGE_NETSNMP_CLIENTS
),y
)
99 NETSNMP_CONF_OPTS
+= --enable-applications
101 NETSNMP_CONF_OPTS
+= --disable-applications
104 define NETSNMP_REMOVE_BLOAT_MIBS
105 for mib in
$(NETSNMP_BLOAT_MIBS
); do \
106 rm -f
$(TARGET_DIR
)/usr
/share
/snmp
/mibs
/$$mib-MIB.txt
; \
110 NETSNMP_POST_INSTALL_TARGET_HOOKS
+= NETSNMP_REMOVE_BLOAT_MIBS
112 ifeq ($(BR2_PACKAGE_NETSNMP_SERVER
),y
)
113 define NETSNMP_INSTALL_INIT_SYSV
114 $(INSTALL
) -D
-m
0755 package
/netsnmp
/S59snmpd \
115 $(TARGET_DIR
)/etc
/init.d
/S59snmpd
119 define NETSNMP_STAGING_NETSNMP_CONFIG_FIXUP
120 $(SED
) "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include\',g" \
121 -e
"s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \
122 $(STAGING_DIR
)/usr
/bin
/net-snmp-config
125 NETSNMP_POST_INSTALL_STAGING_HOOKS
+= NETSNMP_STAGING_NETSNMP_CONFIG_FIXUP
127 $(eval
$(autotools-package
))