252N/A#
252N/A# CDDL HEADER START
252N/A#
252N/A# The contents of this file are subject to the terms of the
252N/A# Common Development and Distribution License (the "License").
252N/A# You may not use this file except in compliance with the License.
252N/A#
252N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
252N/A# or http://www.opensolaris.org/os/licensing.
252N/A# See the License for the specific language governing permissions
252N/A# and limitations under the License.
252N/A#
252N/A# When distributing Covered Code, include this CDDL HEADER in each
252N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
252N/A# If applicable, add the following below this CDDL HEADER, with the
252N/A# fields enclosed by brackets "[]" replaced with your own identifying
252N/A# information: Portions Copyright [yyyy] [name of copyright owner]
252N/A#
252N/A# CDDL HEADER END
252N/A#
5680N/A
5680N/A#
5425N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
252N/A#
5680N/A# net-snmp has a "special" build where only 32-bit items are installed into
5680N/A# proto area; so prefer 32-bit to preserve existing sourcing.
5680N/ABUILD_BITS= 32_and_64
252N/Ainclude ../../make-rules/shared-macros.mk
252N/A
5680N/APATH=$(SPRO_VROOT)/bin:$(GNUBIN):$(USRBINDIR)
252N/A
252N/ACOMPONENT_NAME= net-snmp
5865N/ACOMPONENT_VERSION= 5.7.2.1
618N/ACOMPONENT_PROJECT_URL= http://www.net-snmp.org/
844N/ACOMPONENT_ARCHIVE_HASH= \
5865N/A sha256:35dd20a2b17849f6d5a0a6109b4f52c1a777a3e1a00c79c4a175c520d23f3497
5865N/ACOMPONENT_ARCHIVE_URL= http://ftp.ntua.gr/mirror/net-snmp/net-snmp/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
1258N/ACOMPONENT_BUGDB= service/net-snmp utility/net-snmp library/net-snmp
252N/A
5865N/ATPNO= 13120
2899N/A
5680N/ABUILD_32_and_64 += $(BUILD_DIR_32)/.docs
5680N/AINSTALL_TARGET= build $(INSTALL_32_and_64)
5680N/Ainclude $(WS_MAKE_RULES)/common.mk
252N/A
5680N/Astudio_C99MODE= $(studio_C99_ENABLE)
252N/ACPPFLAGS += "-DFALSE_SHARING_ALIGN=64"
252N/A
4090N/ACONFIGURE_ENV += PYTHONPROG=$(PYTHON.$(BITS))
4090N/A
252N/ACONFIGURE_OPTIONS += --with-default-snmp-version=3
252N/ACONFIGURE_OPTIONS += --with-sys-contact="root@localhost"
252N/ACONFIGURE_OPTIONS += --with-sys-location=Unknown
5680N/ACONFIGURE_OPTIONS += --with-logfile=$(VARDIR)/log/snmpd.log
5680N/ACONFIGURE_OPTIONS += --with-persistent-directory=$(VARDIR)/net-snmp
252N/A
5680N/ACONFIGURE_OPTIONS += --with-mibdirs=$(ETCDIR)/net-snmp/snmp/mibs
5680N/ACONFIGURE_OPTIONS += --datadir=$(ETCDIR)/net-snmp
252N/ACONFIGURE_OPTIONS += --enable-agentx-dom-sock-only
252N/ACONFIGURE_OPTIONS += --enable-ucd-snmp-compatibility
252N/ACONFIGURE_OPTIONS += --enable-ipv6
252N/ACONFIGURE_OPTIONS += --enable-mfd-rewrites
5865N/ACONFIGURE_OPTIONS += --with-openssl=/lib/openssl
252N/ACONFIGURE_OPTIONS += --with-transports="UDP TCP UDPIPv6 TCPIPv6"
5680N/ACONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)/net-snmp
252N/A
252N/A# Which MIB modules do we want to build
252N/AMIB_MOBULES.sparc = ucd-snmp/lmSensors
252N/AMIB_MODULES = host disman/event-mib ucd-snmp/diskio udp-mib tcp-mib if-mib
252N/AMIB_MOBULES += $(MIB_MODULES.$(MACH))
252N/ACONFIGURE_OPTIONS += --with-mib-modules="$(MIB_MODULES)"
252N/A
790N/A# Python bindings support.
790N/APYTHON_ARGS = --basedir=/usr/bin
790N/ACONFIGURE_OPTIONS += --with-python-modules="$(PYTHON_ARGS)"
790N/A
5636N/A# Only build 64 bit Perl support
252N/APERL_ARGS = DESTDIR=$(PROTO_DIR) INSTALLDIRS=vendor
5636N/ACONFIGURE_OPTIONS.32 += --disable-embedded-perl
5636N/ACONFIGURE_OPTIONS.32 += --without-perl-modules
5636N/ACONFIGURE_OPTIONS.64 += PERLPROG="$(PERL)"
5636N/ACONFIGURE_OPTIONS.64 += --with-perl-modules="$(PERL_ARGS)"
5636N/ACONFIGURE_OPTIONS.64 += --disable-perl-cc-checks
252N/A
252N/ACOMPONENT_PRE_CONFIGURE_ACTION = \
252N/A ($(CLONEY) $(SOURCE_DIR) $(@D); $(CLONEY) $(COMPONENT_DIR)/sun $(@D)/sun)
252N/A
252N/A# for the goofy definition of ARCH in the extra Makefiles
252N/AARCH=32
252N/AARCH=$(BITS:64=$(MACH64))
252N/A
5680N/ACCSMAKE_ARGS = CC="$(CC)" CFGPREFIX=$(USRDIR) CFGLIB64=$(USRLIBDIR64)
5680N/ACCSMAKE_ARGS += CFGLIB=$(USRLIBDIR) ARCH=$(ARCH) ROOT=$(PROTO_DIR)
252N/A
3353N/ACOMPONENT_TEST_DIR = $(COMPONENT_DIR)
3353N/ACOMPONENT_TEST_CMD = $(KSH93)
3353N/ACOMPONENT_TEST_TARGETS = ./run-tests $(BUILD_DIR) $(MACH32) $(MACH64)
3353N/A
5636N/A# perl man pages hiding here in 64-bit PROTO_DIR
5636N/APKG_PROTO_DIRS += $(BUILD_DIR)/prototype/$(MACH64)
5636N/A
252N/A$(BUILD_32): COMPONENT_POST_BUILD_ACTION= \
252N/A (cd $(BUILD_DIR)/$(MACH32)/sun ; ls agent; $(CCSMAKE) -e $(CCSMAKE_ARGS))
252N/A
252N/A$(BUILD_64): COMPONENT_POST_BUILD_ACTION= \
252N/A (cd $(BUILD_DIR)/$(MACH64)/sun ; ls agent; $(CCSMAKE) -e $(CCSMAKE_ARGS))
252N/A
790N/A$(INSTALL_32): COMPONENT_INSTALL_ARGS += PYTHON_VENDOR_PACKAGES=$(PYTHON_VENDOR_PACKAGES)
790N/A
252N/A$(INSTALL_32): COMPONENT_POST_INSTALL_ACTION= \
252N/A ($(MKDIR) -p $(BUILD_DIR)/prototype/$(MACH)/etc/net-snmp/snmp/mibs; \
4982N/A cd $(BUILD_DIR)/$(MACH32)/sun ; ls agent; $(CCSMAKE) -e $(CCSMAKE_ARGS) install)
252N/A
252N/A$(INSTALL_64): COMPONENT_POST_INSTALL_ACTION= \
252N/A ($(MKDIR) -p $(BUILD_DIR)/prototype/$(MACH64)/etc/net-snmp/snmp/mibs; \
252N/A cd $(BUILD_DIR)/$(MACH64)/sun ; ls agent; $(CCSMAKE) -e $(CCSMAKE_ARGS) install)
252N/A
252N/A$(INSTALL_64): COMPONENT_INSTALL_ARGS += DESTDIR=$(BUILD_DIR)/prototype/$(MACH64)
252N/A
252N/A# build the docs
252N/A$(BUILD_DIR_32)/.docs:
252N/A (cd $(@D) ; $(ENV) srcdir=$(@D) $(DOXYGEN) -u $(@D)/doxygen.conf ; \
252N/A $(ENV) srcdir=$(@D) $(DOXYGEN) $(@D)/doxygen.conf)
252N/A $(TOUCH) $@
3817N/A
3817N/AREQUIRED_PACKAGES += developer/documentation-tool/doxygen
5865N/AREQUIRED_PACKAGES += library/security/openssl
5636N/AREQUIRED_PACKAGES += $(PERL_PKG)
3817N/AREQUIRED_PACKAGES += runtime/python-27
3817N/AREQUIRED_PACKAGES += shell/bash
3817N/AREQUIRED_PACKAGES += shell/ksh93
3817N/AREQUIRED_PACKAGES += system/core-os
5865N/AREQUIRED_PACKAGES += system/linker
3817N/AREQUIRED_PACKAGES += system/management/snmp/net-snmp
3817N/AREQUIRED_PACKAGES += system/network