Makefile revision 5204
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# CDDL HEADER START
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# The contents of this file are subject to the terms of the
52671ce4f644d565b2acd71a8ce4f6d20829a67cAdam Moore# Common Development and Distribution License (the "License").
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# You may not use this file except in compliance with the License.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# See the License for the specific language governing permissions
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# and limitations under the License.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# When distributing Covered Code, include this CDDL HEADER in each
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# If applicable, add the following below this CDDL HEADER, with the
52671ce4f644d565b2acd71a8ce4f6d20829a67cAdam Moore# fields enclosed by brackets "[]" replaced with your own identifying
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# information: Portions Copyright [yyyy] [name of copyright owner]
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# CDDL HEADER END
08e054017132cdd838955bc0af15889f1f2a7b42Adam Moore# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
52671ce4f644d565b2acd71a8ce4f6d20829a67cAdam MooreCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
80d2034f65b9348e5fd36291f03b0819181efb89Adam MooreCOMPONENT_PROJECT_URL= http://www.isc.org/software/bind/
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# hash from: sha256sum $(COMPONENT_ARCHIVE) | sed 's/\(.[^ ]*\).*/sha256:\1/'
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore sha256:4f052195a62218c05a05033774452e6a9e329b865c01e594cc20a6adf11e0d0f
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore http://ftp.isc.org/isc/bind9/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# FYI, The configure options are displayed by 'named -V'. Previously
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# that was overriden by setting CONFIGARGS to hide build server
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# Traditionally all BIND executables are installed in sbin not bin.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# DNS libraries are in usr/lib/dns - Override settings from configure.mk
80d2034f65b9348e5fd36291f03b0819181efb89Adam MooreCONFIGURE_OPTIONS += --sbindir=$(CONFIGURE_BINDIR.$(BITS))
80d2034f65b9348e5fd36291f03b0819181efb89Adam MooreCONFIGURE_OPTIONS += --disable-openssl-version-check
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Moore# Bind configure will check for libxml2 versions 2.6.x/2.7.x/2.8.x.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# To make it use version 2.9.x we need to skip this check by
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# specifying path where libxml2 is installed.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# Configure will add "-mt" to CC which is already set in CFLAGS, so override.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# Enable ASLR for this component
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Moore# Currently manual pages are distributed from pkg:/system/manual@.
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Moore# While there are some changes in our manuals, for example section
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Moore# numbering and additions to named(1M) for SMF - that could be fixed
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Moore# In addition to BIND deliverables we also deliver SMF files and
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Moore# migration notes. There is no need to install these extras into the
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Moore# prototype directory, they are simply referenced in relevant manifest
eab87f0881fdf3e80c2a1af9224c50f0bf033644Adam Moore# (p5m) file.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# sumarize nawk script; reads ISC output which is of the form:
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# /^T:/ = Start of a test.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# /^I:/ = Info from a test; colleced for possible use later.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# /^A:/ = About: summary of the test - not used here.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# /^R:/ = Result: If 'PASS' then continue, else print line and collected info.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# Known issues may then be accounted for by adding tests, for example:
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# /^R:UNTESTED/ && name ~ /^T:dst:2:A/ {known++;}\
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# /^R:UNRESOLVED/ && name ~ /^T:dst:1:A/ {known++;}\
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# @ EOF = Display count of RESULTS: i.e. R:PASS=124 R:UNTESTED=26 Total=150
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# if not 100% pass rate and issue is not known the word 'issues!' is appended
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# to resulting string.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore /^T:/ {name=$$0;info="";}\
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore /^I:/ {info=sprintf("%s%s\n", info, $$0);}\
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore /^R:/ {test++; result[$$1]++;}\
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore /^R:PASS/ {next;}\
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore /^R:/ {printf("%s: %s\n%s\n", $$1, name, info);}\
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore END{for (item in result)\
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore printf("%s=%d ", item, result[item]);\
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore printf("(known=%d) Total=%d%s\n", known, test, \
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore ((result["R:PASS"] + known) < test)? \
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore " issues!" : "");\
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# fulltest requires sufficient privileges to configures IP addresses
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# 10.53.0.1 through 10.53.0.5 as aliases on the loopback interface.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# Note PATH is being set so that isc_ifconfig can find ifconfig.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore cd $(COMPONENT_SRC) && PATH=/sbin:$(PATH) $(SHELL) $(isc_ifconfig) up
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore -cd $(COMPONENT_SRC) && PATH=/sbin:$(PATH) $(SHELL) $(isc_ifconfig) down
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# test-summary shows summary for targets test and fulltest. Use target
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore# test-clean to remove previous tests.
80d2034f65b9348e5fd36291f03b0819181efb89Adam Moore if [ -f $$file ]; then \