gcc-6: use $(GNU_ARCH) in manifest
[unleashed-userland.git] / components / network / bind / Makefile
blob0d054941079d53767aa6513801a1b54678798830
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
21 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
23 include ../../../make-rules/shared-macros.mk
25 COMPONENT_NAME= bind
26 COMPONENT_VERSION= 9.10.4-P6
27 IPS_COMPONENT_VERSION= 9.10.4.6
28 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
29 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
30 COMPONENT_PROJECT_URL= http://www.isc.org/software/bind/
31 COMPONENT_ARCHIVE_HASH= \
32 sha256:a1dfbfd1d11cb52f2d9e5af0def25763798bda243841722dd0b319086a73ee65
33 COMPONENT_ARCHIVE_URL= \
34 http://ftp.isc.org/isc/bind9/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
35 COMPONENT_BUGDB= service/dns-server
37 include $(WS_TOP)/make-rules/prep.mk
38 include $(WS_TOP)/make-rules/configure.mk
39 include $(WS_TOP)/make-rules/ips.mk
41 # We don't need -m32 for 32-bit builds, especially when it is passed to ld
42 LD_BITS=
44 # Missing files in build dir without this.
45 COMPONENT_PRE_CONFIGURE_ACTION = ($(CLONEY) $(SOURCE_DIR) $(@D))
47 # Build.
49 # FYI, The configure options are displayed by 'named -V'. Previously
50 # that was overriden by setting CONFIGARGS to hide build server
51 # pathnames.
53 # Traditionally all BIND executables are installed in sbin not bin.
54 # DNS libraries are in usr/lib/dns - Override settings from configure.mk
55 CONFIGURE_BINDIR.32 = $(CONFIGURE_PREFIX)/sbin
56 CONFIGURE_LIBDIR.32 = $(CONFIGURE_PREFIX)/lib/dns
58 CONFIGURE_OPTIONS += --with-libtool
59 CONFIGURE_OPTIONS += --sbindir=$(CONFIGURE_BINDIR.$(BITS))
60 CONFIGURE_OPTIONS += --sysconfdir=/etc
61 CONFIGURE_OPTIONS += --localstatedir=/var
62 CONFIGURE_OPTIONS += --with-openssl
63 CONFIGURE_OPTIONS += --enable-threads=yes
64 CONFIGURE_OPTIONS += --enable-devpoll=yes
65 CONFIGURE_OPTIONS += --disable-openssl-version-check
66 CONFIGURE_OPTIONS += --enable-fixed-rrset
67 CONFIGURE_OPTIONS += --with-pkcs11
68 # Bind configure will check for libxml2 versions 2.6.x/2.7.x/2.8.x.
69 # To make it use version 2.9.x we need to skip this check by
70 # specifying path where libxml2 is installed.
71 CONFIGURE_OPTIONS += --with-libxml2=/usr
73 # Enable ASLR for this component
74 ASLR_MODE = $(ASLR_ENABLE)
76 .PHONY: build
77 build: $(BUILD_32)
79 include $(WS_TOP)/make-rules/shared-targets.mk
81 # Install.
83 # Currently manual pages are distributed from pkg:/system/manual@.
84 # While there are some changes in our manuals, for example section
85 # numbering and additions to named(1M) for SMF - that could be fixed
86 # by patch.
88 # In addition to BIND deliverables we also deliver SMF files and
89 # migration notes. There is no need to install these extras into the
90 # prototype directory, they are simply referenced in relevant manifest
91 # (p5m) file.
93 .PHONY: install
94 install: $(INSTALL_32)
96 # Testing.
98 # sumarize nawk script; reads ISC output which is of the form:
99 # /^T:/ = Start of a test.
100 # /^I:/ = Info from a test; colleced for possible use later.
101 # /^A:/ = About: summary of the test - not used here.
102 # /^R:/ = Result: If 'PASS' then continue, else print line and collected info.
103 # Known issues may then be accounted for.
104 # @ EOF = Display count of RESULTS: i.e. R:PASS=124 R:UNTESTED=26 Total=150
105 # if not 100% pass rate and issue is not known the word 'issues!' is appended
106 # to resulting string.
107 summarize= '\
108 /^T:/ {name=$$0;info="";}\
109 /^I:/ {info=sprintf("%s%s\n", info, $$0);}\
110 /^R:/ {test++; result[$$1]++;}\
111 /^R:PASS/ {next;}\
112 /^R:/ {printf("%s: %s\n%s\n", $$1, name, info);}\
113 /^R:UNTESTED/ && name ~ /^T:dst:2:A/ {known++;}\
114 /^R:UNRESOLVED/ && name ~ /^T:dst:1:A/ {known++;}\
115 END{for (item in result)\
116 printf("%s=%d ", item, result[item]);\
117 printf("(known=%d) Total=%d%s\n", known, test, \
118 ((result["R:PASS"] + known) < test)? \
119 " issues!" : "");\
122 isc_ifconfig= ./bin/tests/system/ifconfig.sh
124 .PHONY: test
125 test: build $(TEST_32)
127 # fulltest requires sufficient privileges to configures IP addresses
128 # 10.53.0.1 through 10.53.0.5 as aliases on the loopback interface.
129 FULL_TEST_32= $(TEST_32:%=%_FULL)
131 .PHONY: fulltest
132 fulltest: build $(FULL_TEST_32)
134 $(FULL_TEST_32):
135 cd $(COMPONENT_SRC) && $(SHELL) $(isc_ifconfig) up
136 -cd $(@D) && $(MAKE) test 2>&1 | $(TEE) $@
137 cd $(COMPONENT_SRC) && $(SHELL) $(isc_ifconfig) down
138 $(NAWK) $(summarize) $@
140 $(TEST_32):
141 -cd $(@D) && $(MAKE) test 2>&1 | $(TEE) $@
142 $(NAWK) $(summarize) $@
144 # test-summary shows summary for targets test and fulltest. Use target
145 # test-clean to remove previous tests.
146 .PHONY: test-summary
147 test-summary:
148 @for file in $(TEST_32)*; do \
149 if [ -f $$file ]; then \
150 echo 'Summary for' $$file;\
151 $(NAWK) $(summarize) $$file;\
152 fi;\
153 done
155 .PHONY: test-version
156 test-version:
157 @echo;echo 32 bit version
158 -LD_LIBRARY_PATH=$(PROTO_DIR)$(CONFIGURE_LIBDIR.32) \
159 $(PROTO_DIR)$(CONFIGURE_BINDIR.32)/named -V
161 .PHONY: test-clean
162 test-clean:
163 $(RM) $(TEST_32) $(FULL_TEST_32)
165 REQUIRED_PACKAGES += library/json-c
166 REQUIRED_PACKAGES += library/libedit
167 REQUIRED_PACKAGES += library/libxml2
168 REQUIRED_PACKAGES += library/security/openssl
169 REQUIRED_PACKAGES += network/dns/bind
170 REQUIRED_PACKAGES += service/security/kerberos-5
171 REQUIRED_PACKAGES += SUNWcs
172 REQUIRED_PACKAGES += system/library
173 REQUIRED_PACKAGES += system/library/security/gss