ntp: update to 4.2.8p12
[unleashed-userland.git] / components / network / ntp / Makefile
blob30b9356cfec8ed414a1ce17e73f636c92be91f74
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
23 # Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
24 # Copyright (c) 2018, Michal Nowak
27 include ../../../make-rules/shared-macros.mk
29 COMPONENT_NAME= ntp
30 COMPONENT_VERSION= 4.2.8p12
31 IPS_COMPONENT_VERSION= $(subst p,.,$(COMPONENT_VERSION))
32 COMPONENT_SUMMARY= Network Time Protocol Daemon v4
33 COMPONENT_DESCRIPTION= Network Time Protocol v4, NTP Daemon and Utilities
34 COMPONENT_PROJECT_URL= http://www.ntp.org/
35 COMPONENT_SRC= $(COMPONENT_SRC_NAME)-$(COMPONENT_VERSION)
36 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
37 COMPONENT_ARCHIVE_HASH= \
38 sha256:709b222b5013d77d26bfff532b5ea470a8039497ef29d09363931c036cb30454
39 COMPONENT_ARCHIVE_URL= http://archive.ntp.org/ntp4/ntp-4.2/$(COMPONENT_ARCHIVE)
40 COMPONENT_FMRI= service/network/ntp
41 COMPONENT_CLASSIFICATION= System/Services
42 COMPONENT_LICENSE= ntp license
44 PATCH_LEVEL = 0
46 ASLR_MODE= $(ASLR_ENABLE)
48 include $(WS_MAKE_RULES)/prep.mk
49 include $(WS_MAKE_RULES)/configure.mk
50 include $(WS_MAKE_RULES)/ips.mk
52 CONFIGURE_SBINDIR.64 = $(CONFIGURE_SBINDIR.32)
53 CONFIGURE_LIBDIR.64 = $(CONFIGURE_LIBDIR.32)
55 COMPONENT_BUILD_ARGS=
57 COMPONENT_PREP_ACTION = ( cd $(@D) && autoreconf --force --install )
59 CFLAGS += -std=c99 -D_XOPEN_SOURCE=600 -D__EXTENSIONS__
61 CONFIGURE_OPTIONS += --bindir=/usr/sbin
62 CONFIGURE_OPTIONS += --with-binsubdir=sbin
63 CONFIGURE_OPTIONS += --libexecdir=/usr/lib/inet
64 CONFIGURE_OPTIONS += --sysconfdir=/etc/inet
65 CONFIGURE_OPTIONS += --enable-getifaddrs
66 CONFIGURE_OPTIONS += --enable-all-clocks
67 CONFIGURE_OPTIONS += --enable-debugging
68 CONFIGURE_OPTIONS += --enable-debug-timing
69 CONFIGURE_OPTIONS += --disable-optional-args
70 CONFIGURE_OPTIONS += --enable-parse-clocks
71 CONFIGURE_OPTIONS += --enable-ignore-dns-errors
72 CONFIGURE_OPTIONS += --without-ntpsnmpd
73 CONFIGURE_OPTIONS += --with-crypto=openssl
74 CONFIGURE_OPTIONS += --with-openssl-incdir=$(USRINCDIR)
75 CONFIGURE_OPTIONS += --with-openssl-libdir=$(LIBDIR)/$(MACH64)
76 CONFIGURE_OPTIONS += --disable-problem-tests
78 BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
80 COMPONENT_INSTALL_ENV += PATH=/usr/gnu/bin:/usr/bin
82 # of the build and test and deleting the extra lines, it is easier to just
83 # cat together all of the logs. The test TEST_PROGNAME3 tests the system
84 # log facility, so we have to get rid of the output because the pid is
85 # different every time. Same for TEST_PROGNAME. We have to edit out the
86 # syslog format lines to get rid of the time and the pid. And the packet
87 # processing test uses the current time so it changes.
89 # In addition, we append the config.h file so we know if the configuration
90 # ever changes. We get rid of the version number which changes every time
91 # we upgrade and the system string and endian info which is different between
92 # intel and SPARC.
94 COMPONENT_TEST_CREATE_TRANSFORMS = \
95 @if [ -e $(COMPONENT_TEST_MASTER) ]; \
96 then \
97 print "\#!/bin/sh" > $(COMPONENT_TEST_TRANSFORM_CMD); \
98 print '$(FIND) $(BUILD_DIR_64) -name test-\*.log | sort |\\' \
99 >> $(COMPONENT_TEST_TRANSFORM_CMD); \
100 print ' xargs cat | grep -v TEST_PROGNAME | \\' \
101 >> $(COMPONENT_TEST_TRANSFORM_CMD); \
102 print 'grep -v unsync | \\' \
103 >> $(COMPONENT_TEST_TRANSFORM_CMD); \
104 print 'grep -v no-leap | \\' \
105 >> $(COMPONENT_TEST_TRANSFORM_CMD); \
106 print 'sed -e "s/4.2..p[0-9]*//" | \\' \
107 >> $(COMPONENT_TEST_TRANSFORM_CMD); \
108 print 'sed -e "s/^.*\[[0-9]*\]: //" | \\' \
109 >> $(COMPONENT_TEST_TRANSFORM_CMD); \
110 print 'grep -v ^resp | grep -v ^sent \\' \
111 >> $(COMPONENT_TEST_TRANSFORM_CMD); \
112 print '> $(COMPONENT_TEST_SNAPSHOT)' \
113 >> $(COMPONENT_TEST_TRANSFORM_CMD); \
114 print 'cat $(BUILD_DIR_64)/config.h | \\' \
115 >> $(COMPONENT_TEST_TRANSFORM_CMD); \
116 print 'grep -v ENDIAN | grep -v STR_SYSTEM | \\' \
117 >> $(COMPONENT_TEST_TRANSFORM_CMD); \
118 print 'grep -v VERSION | grep -v PACKAGE_STRING \\' \
119 >> $(COMPONENT_TEST_TRANSFORM_CMD); \
120 print '>> $(COMPONENT_TEST_SNAPSHOT)' \
121 >> $(COMPONENT_TEST_TRANSFORM_CMD); \
122 else \
123 print 'Cannot find $(COMPONENT_TEST_MASTER)'; \
124 exit 2; \
128 build: $(BUILD_64)
129 install: $(INSTALL_64)
130 test: $(TEST_64)
132 # Required for SNTP but not auto-detected
133 REQUIRED_PACKAGES += library/libevent2
134 # Auto-generated dependencies
135 REQUIRED_PACKAGES += library/libedit
136 REQUIRED_PACKAGES += runtime/perl-522
137 REQUIRED_PACKAGES += service/network/dns/mdns
138 REQUIRED_PACKAGES += SUNWcs
139 REQUIRED_PACKAGES += system/library
140 REQUIRED_PACKAGES += system/library/math