Makefile revision 4978
225N/A#
225N/A# CDDL HEADER START
225N/A#
225N/A# The contents of this file are subject to the terms of the
225N/A# Common Development and Distribution License (the "License").
225N/A# You may not use this file except in compliance with the License.
225N/A#
225N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
225N/A# or http://www.opensolaris.org/os/licensing.
225N/A# See the License for the specific language governing permissions
225N/A# and limitations under the License.
225N/A#
225N/A# When distributing Covered Code, include this CDDL HEADER in each
225N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
225N/A# If applicable, add the following below this CDDL HEADER, with the
225N/A# fields enclosed by brackets "[]" replaced with your own identifying
225N/A# information: Portions Copyright [yyyy] [name of copyright owner]
225N/A#
225N/A# CDDL HEADER END
225N/A#
225N/A# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
225N/A#
225N/Ainclude ../../make-rules/shared-macros.mk
225N/A
225N/ACOMPONENT_NAME= bind
225N/ACOMPONENT_VERSION= 9.6-ESV-R11
225N/AHUMAN_VERSION= $(COMPONENT_VERSION)-P3
225N/AIPS_COMPONENT_VERSION= 9.6.3.11.3
225N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
225N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
225N/ACOMPONENT_PROJECT_URL= http://www.isc.org/software/bind/
225N/A
225N/A# hash from: sha256sum $(COMPONENT_ARCHIVE) | sed 's/\(.[^ ]*\).*/sha256:\1/'
225N/ACOMPONENT_ARCHIVE_HASH= \
225N/A sha256:4f052195a62218c05a05033774452e6a9e329b865c01e594cc20a6adf11e0d0f
225N/ACOMPONENT_ARCHIVE_URL= \
225N/A http://ftp.isc.org/isc/bind9/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
225N/ACOMPONENT_BUGDB= service/dns-server
225N/A
225N/ATPNO= 24244
225N/A
225N/Ainclude $(WS_MAKE_RULES)/prep.mk
225N/Ainclude $(WS_MAKE_RULES)/configure.mk
225N/Ainclude $(WS_MAKE_RULES)/ips.mk
225N/A
225N/A# Build.
225N/A#
225N/A# FYI, The configure options are displayed by 'named -V'. Previously
225N/A# that was overriden by setting CONFIGARGS to hide build server
225N/A# pathnames.
225N/A
225N/A# Traditionally all BIND executables are installed in sbin not bin.
225N/A# DNS libraries are in usr/lib/dns - Override settings from configure.mk
225N/ACONFIGURE_BINDIR.32 = $(CONFIGURE_PREFIX)/sbin
225N/ACONFIGURE_LIBDIR.32 = $(CONFIGURE_PREFIX)/lib/dns
225N/A
225N/ACONFIGURE_OPTIONS += --with-libtool
225N/ACONFIGURE_OPTIONS += --sbindir=$(CONFIGURE_BINDIR.$(BITS))
225N/ACONFIGURE_OPTIONS += --sysconfdir=/etc
225N/ACONFIGURE_OPTIONS += --localstatedir=/var
225N/ACONFIGURE_OPTIONS += --with-openssl
225N/ACONFIGURE_OPTIONS += --enable-threads=yes
225N/ACONFIGURE_OPTIONS += --enable-devpoll=yes
225N/ACONFIGURE_OPTIONS += --disable-openssl-version-check
225N/ACONFIGURE_OPTIONS += --enable-fixed-rrset
225N/ACONFIGURE_OPTIONS += --with-pkcs11
225N/A# Bind configure will check for libxml2 versions 2.6.x/2.7.x/2.8.x.
225N/A# To make it use version 2.9.x we need to skip this check by
225N/A# specifying path where libxml2 is installed.
225N/ACONFIGURE_OPTIONS += --with-libxml2=/usr
225N/A
225N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
225N/A# Configure will add "-mt" to CC which is already set in CFLAGS, so override.
225N/ACONFIGURE_OPTIONS += CC="$(CC)"
225N/A
225N/A# Enable ASLR for this component
225N/AASLR_MODE = $(ASLR_ENABLE)
225N/A
225N/A.PHONY: build
225N/Aconfigure: $(CONFIGURE_32)
225N/A
225N/Abuild: $(BUILD_32)
225N/A
# Install.
#
# While there are some changes in our manuals, for example additions
# to named(8) for SMF - that could be fixed by patch.
#
# In addition to BIND deliverables we also deliver SMF files and
# migration notes. There is no need to install these extras into the
# prototype directory, they are simply referenced in relevant manifest
# (p5m) file.
.PHONY: install
install: $(INSTALL_32)
# Testing.
#
# sumarize nawk script; reads ISC output which is of the form:
# /^T:/ = Start of a test.
# /^I:/ = Info from a test; colleced for possible use later.
# /^A:/ = About: summary of the test - not used here.
# /^R:/ = Result: If 'PASS' then continue, else print line and collected info.
# Known issues may then be accounted for by adding tests, for example:
# /^R:UNTESTED/ && name ~ /^T:dst:2:A/ {known++;}\
# /^R:UNRESOLVED/ && name ~ /^T:dst:1:A/ {known++;}\
# @ EOF = Display count of RESULTS: i.e. R:PASS=124 R:UNTESTED=26 Total=150
# if not 100% pass rate and issue is not known the word 'issues!' is appended
# to resulting string.
summarize= '\
/^T:/ {name=$$0;info="";}\
/^I:/ {info=sprintf("%s%s\n", info, $$0);}\
/^R:/ {test++; result[$$1]++;}\
/^R:PASS/ {next;}\
/^R:/ {printf("%s: %s\n%s\n", $$1, name, info);}\
END{for (item in result)\
printf("%s=%d ", item, result[item]);\
printf("(known=%d) Total=%d%s\n", known, test, \
((result["R:PASS"] + known) < test)? \
" issues!" : "");\
}'
isc_ifconfig= ./bin/tests/system/ifconfig.sh
.PHONY: test
test: build $(TEST_32)
# Add the build dependency as for the test target above once the system-test
# target is implemented.
system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)
# fulltest requires sufficient privileges to configures IP addresses
# 10.53.0.1 through 10.53.0.5 as aliases on the loopback interface.
# Note PATH is being set so that isc_ifconfig can find ifconfig.
FULL_TEST_32= $(TEST_32:%=%_FULL)
.PHONY: fulltest
fulltest: build $(FULL_TEST_32)
$(FULL_TEST_32):
cd $(COMPONENT_SRC) && PATH=/sbin:$(PATH) $(SHELL) $(isc_ifconfig) up
-cd $(@D) && $(MAKE) test 2>&1 | $(TEE) $@
-cd $(COMPONENT_SRC) && PATH=/sbin:$(PATH) $(SHELL) $(isc_ifconfig) down
$(NAWK) $(summarize) $@
$(TEST_32):
-cd $(@D) && $(MAKE) force-test 2>&1 | $(TEE) $@
$(NAWK) $(summarize) $@
# test-summary shows summary for targets test and fulltest. Use target
# test-clean to remove previous tests.
.PHONY: test-summary
test-summary:
@for file in $(TEST_32)*; do \
if [ -f $$file ]; then \
echo 'Summary for' $$file;\
$(NAWK) $(summarize) $$file;\
fi;\
done
.PHONY: test-version
test-version:
@echo;echo 32 bit version
-LD_LIBRARY_PATH=$(PROTO_DIR)$(CONFIGURE_LIBDIR.32) \
$(PROTO_DIR)$(CONFIGURE_BINDIR.32)/named -V
.PHONY: test-clean
test-clean:
$(RM) $(TEST_32) $(FULL_TEST_32)
REQUIRED_PACKAGES += library/libxml2
REQUIRED_PACKAGES += library/security/openssl
REQUIRED_PACKAGES += network/dns/bind
REQUIRED_PACKAGES += shell/ksh93
REQUIRED_PACKAGES += system/core-os
REQUIRED_PACKAGES += system/library