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]
23 # Copyright (c) 2010, 2020, Oracle and/or its affiliates.
24 # Copyright (c) 2019, Michal Nowak
25 # Copyright (c) 2021, Andreas Wacknitz
26 # Copyright (c) 2023, Niklas Poslovski
29 include ..
/..
/..
/make-rules
/shared-macros.mk
32 HUMAN_VERSION
= 4.2.8p18
33 COMPONENT_VERSION
= $(subst p
,.
,$(HUMAN_VERSION
))
34 COMPONENT_SUMMARY
= Network Time Protocol Daemon v4
35 COMPONENT_DESCRIPTION
= Network Time Protocol v4
, NTP Daemon and Utilities
36 COMPONENT_PROJECT_URL
= https
://www.ntp.org
/
37 COMPONENT_SRC
= $(COMPONENT_SRC_NAME
)-$(HUMAN_VERSION
)
38 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.gz
39 COMPONENT_ARCHIVE_HASH
= sha256
:cf84c5f3fb1a295284942624d823fffa634144e096cfc4f9969ac98ef5f468e5
40 COMPONENT_ARCHIVE_URL
= \
41 https
://downloads.nwtime.org
/ntp
/$(firstword $(subst p
, ,$(HUMAN_VERSION
)))/$(COMPONENT_ARCHIVE
)
42 COMPONENT_FMRI
= service
/network
/ntp
43 COMPONENT_CLASSIFICATION
= System
/Services
44 COMPONENT_LICENSE
= ntp license
45 COMPONENT_LICENSE_FILE
= COPYRIGHT
49 ASLR_MODE
= $(ASLR_ENABLE
)
51 include $(WS_MAKE_RULES
)/common.mk
53 # We modified configure.ac and m4 macros
54 COMPONENT_PREP_ACTION
= ( cd
$(@D
) && PATH
="$(PATH)" .
/bootstrap
)
56 CFLAGS
+= -D_XOPEN_SOURCE
=600 -D__EXTENSIONS__
58 # This is needed to help debugging https://bugs.ntp.org/show_bug.cgi?id=3552
59 # See also https://www.illumos.org/issues/15984#note-6
62 CONFIGURE_OPTIONS
+= --libexecdir
=$(USRLIBDIR
)/inet
63 CONFIGURE_OPTIONS
+= --sysconfdir
=$(ETCDIR
)/inet
64 CONFIGURE_OPTIONS
+= --enable-getifaddrs
65 CONFIGURE_OPTIONS
+= --enable-all-clocks
66 CONFIGURE_OPTIONS
+= --enable-solarisprivs
67 CONFIGURE_OPTIONS
+= --enable-debugging
68 CONFIGURE_OPTIONS
+= --enable-parse-clocks
69 CONFIGURE_OPTIONS
+= --enable-ignore-dns-errors
70 CONFIGURE_OPTIONS
+= --without-ntpsnmpd
71 CONFIGURE_OPTIONS
+= --with-crypto
=openssl
72 CONFIGURE_OPTIONS
+= --with-openssl-incdir
=$(OPENSSL_INCDIR
)
73 CONFIGURE_OPTIONS
+= --with-openssl-libdir
=$(OPENSSL_LIBDIR
.64)
74 CONFIGURE_OPTIONS
+= --disable-problem-tests
76 # NTP tests log results in separate files. Instead of getting the output
77 # of the build and test and deleting the extra lines, it is easier to just
78 # cat together all of the logs. The test TEST_PROGNAME3 tests the system
79 # log facility, so we have to get rid of the output because the pid is
80 # different every time. Same for TEST_PROGNAME. We have to edit out the
81 # syslog format lines to get rid of the time and the pid. And the packet
82 # processing test uses the current time so it changes.
84 # In addition, we append the config.h file so we know if the configuration
85 # ever changes. We get rid of the version number which changes every time
86 # we upgrade and the system string and endian info which is different between
89 COMPONENT_TEST_CREATE_TRANSFORMS
= \
90 @if
[ -e
$(COMPONENT_TEST_MASTER
) ]; \
92 print "\#!/bin/sh" > $(COMPONENT_TEST_TRANSFORM_CMD
); \
93 print '$(FIND) $(BUILD_DIR_64) -name test-\*.log | sort |\\' \
94 >> $(COMPONENT_TEST_TRANSFORM_CMD
); \
95 print ' xargs cat | grep -v TEST_PROGNAME | \\' \
96 >> $(COMPONENT_TEST_TRANSFORM_CMD
); \
97 print 'grep -v unsync | \\' \
98 >> $(COMPONENT_TEST_TRANSFORM_CMD
); \
99 print 'grep -v no-leap | \\' \
100 >> $(COMPONENT_TEST_TRANSFORM_CMD
); \
101 print 'grep -v add-leap | \\' \
102 >> $(COMPONENT_TEST_TRANSFORM_CMD
); \
103 print 'grep -v del-leap | \\' \
104 >> $(COMPONENT_TEST_TRANSFORM_CMD
); \
105 print 'sed -e "s/4.2..p[0-9]*//" | \\' \
106 >> $(COMPONENT_TEST_TRANSFORM_CMD
); \
107 print 'sed -e "s/^.*\[[0-9]*\]: //" | \\' \
108 >> $(COMPONENT_TEST_TRANSFORM_CMD
); \
109 print 'grep -v ^resp | grep -v ^sent \\' \
110 >> $(COMPONENT_TEST_TRANSFORM_CMD
); \
111 print '> $(COMPONENT_TEST_SNAPSHOT)' \
112 >> $(COMPONENT_TEST_TRANSFORM_CMD
); \
113 print 'cat $(BUILD_DIR_64)/config.h | \\' \
114 >> $(COMPONENT_TEST_TRANSFORM_CMD
); \
115 print 'grep -v ENDIAN | grep -v STR_SYSTEM | \\' \
116 >> $(COMPONENT_TEST_TRANSFORM_CMD
); \
117 print 'grep -v VERSION | grep -v PACKAGE_STRING \\' \
118 >> $(COMPONENT_TEST_TRANSFORM_CMD
); \
119 print '>> $(COMPONENT_TEST_SNAPSHOT)' \
120 >> $(COMPONENT_TEST_TRANSFORM_CMD
); \
122 print 'Cannot find $(COMPONENT_TEST_MASTER)'; \
126 # Auto-generated dependencies
127 REQUIRED_PACKAGES
+= $(OPENSSL_PKG
)
128 REQUIRED_PACKAGES
+= SUNWcs
129 REQUIRED_PACKAGES
+= library
/libedit
130 REQUIRED_PACKAGES
+= library
/libevent2
131 REQUIRED_PACKAGES
+= runtime
/perl
132 REQUIRED_PACKAGES
+= service
/network
/dns
/mdns
133 REQUIRED_PACKAGES
+= shell/ksh93
134 REQUIRED_PACKAGES
+= system
/library
135 REQUIRED_PACKAGES
+= system
/library
/math