2003-01-18 22:27:22 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# ntp
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
2011-10-16 05:04:30 +02:00
|
|
|
NTP_VERSION = 4.2.6p4
|
|
|
|
NTP_SITE = http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2
|
2010-09-20 23:54:23 +02:00
|
|
|
NTP_CONF_ENV = ac_cv_lib_md5_MD5Init=no
|
2003-01-18 22:27:22 +01:00
|
|
|
|
2010-09-20 23:54:23 +02:00
|
|
|
ifneq ($(BR2_INET_IPV6),y)
|
2011-10-16 05:04:30 +02:00
|
|
|
NTP_CONF_ENV += isc_cv_have_in6addr_any=no
|
2010-09-20 23:54:23 +02:00
|
|
|
endif
|
2003-01-18 22:27:22 +01:00
|
|
|
|
2010-09-20 23:54:23 +02:00
|
|
|
NTP_CONF_OPT = --with-shared \
|
2004-04-16 16:32:59 +02:00
|
|
|
--program-transform-name=s,,, \
|
2011-10-16 05:04:30 +02:00
|
|
|
--disable-tickadj
|
2010-09-20 23:54:23 +02:00
|
|
|
|
2011-02-03 21:45:57 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
2011-10-16 05:04:30 +02:00
|
|
|
NTP_CONF_OPT += --with-crypto
|
|
|
|
NTP_DEPENDENCIES += openssl
|
|
|
|
else
|
|
|
|
NTP_CONF_OPT += --without-crypto
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_NTP_NTPSNMPD),y)
|
|
|
|
NTP_CONF_OPT += \
|
|
|
|
--with-net-snmp-config=$(STAGING_DIR)/usr/bin/net-snmp-config
|
|
|
|
NTP_DEPENDENCIES += netsnmp
|
2011-02-03 21:45:57 +01:00
|
|
|
else
|
2011-10-16 05:04:30 +02:00
|
|
|
NTP_CONF_OPT += --without-ntpsnmpd
|
2011-02-03 21:45:57 +01:00
|
|
|
endif
|
|
|
|
|
2010-09-20 23:54:23 +02:00
|
|
|
define NTP_PATCH_FIXUPS
|
|
|
|
$(SED) "s,^#if.*__GLIBC__.*_BSD_SOURCE.*$$,#if 0," $(@D)/ntpd/refclock_pcf.c
|
|
|
|
$(SED) '/[[:space:](]rindex[[:space:]]*(/s/[[:space:]]*rindex[[:space:]]*(/ strrchr(/g' $(@D)/ntpd/*.c
|
|
|
|
endef
|
|
|
|
|
|
|
|
NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTP_KEYGEN) += util/ntp-keygen
|
|
|
|
NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTP_WAIT) += scripts/ntp-wait
|
2011-02-03 21:45:57 +01:00
|
|
|
NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPDATE) += ntpdate/ntpdate
|
2010-09-20 23:54:23 +02:00
|
|
|
NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPDC) += ntpdc/ntpdc
|
|
|
|
NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPQ) += ntpq/ntpq
|
2011-10-16 05:04:30 +02:00
|
|
|
NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPSNMPD) += ntpsnmpd/ntpsnmpd
|
2010-09-20 23:54:23 +02:00
|
|
|
NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPTRACE) += scripts/ntptrace
|
2011-02-03 21:45:57 +01:00
|
|
|
NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_SNTP) += sntp/sntp
|
2010-09-20 23:54:23 +02:00
|
|
|
NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_TICKADJ) += util/tickadj
|
|
|
|
|
|
|
|
define NTP_INSTALL_TARGET_CMDS
|
2011-02-03 21:45:57 +01:00
|
|
|
$(if $(BR2_PACKAGE_NTP_NTPD), install -m 755 $(@D)/ntpd/ntpd $(TARGET_DIR)/usr/sbin/ntpd)
|
2010-09-20 23:54:23 +02:00
|
|
|
test -z "$(NTP_INSTALL_FILES_y)" || install -m 755 $(addprefix $(@D)/,$(NTP_INSTALL_FILES_y)) $(TARGET_DIR)/usr/bin/
|
2011-02-04 20:00:35 +01:00
|
|
|
$(if $(BR2_PACKAGE_NTP_NTPD), install -m 755 package/ntp/S49ntp $(TARGET_DIR)/etc/init.d/S49ntp)
|
2008-11-06 22:11:54 +01:00
|
|
|
@if [ ! -f $(TARGET_DIR)/etc/default/ntpd ]; then \
|
|
|
|
install -m 755 -d $(TARGET_DIR)/etc/default ; \
|
|
|
|
install -m 644 package/ntp/ntpd.etc.default $(TARGET_DIR)/etc/default/ntpd ; \
|
|
|
|
fi
|
2010-09-20 23:54:23 +02:00
|
|
|
endef
|
2003-01-18 22:27:22 +01:00
|
|
|
|
2010-09-20 23:54:23 +02:00
|
|
|
define NTP_UNINSTALL_TARGET_CMDS
|
|
|
|
rm $(TARGET_DIR)/usr/sbin/ntpd
|
|
|
|
rm -f $(addprefix $(TARGET_DIR)/usr/bin/,$(NTP_INSTALL_FILES_y))
|
|
|
|
rm $(TARGET_DIR)/etc/init.d/S49ntp
|
|
|
|
rm $(TARGET_DIR)/etc/default/ntpd
|
|
|
|
endef
|
2003-01-18 22:27:22 +01:00
|
|
|
|
2010-09-20 23:54:23 +02:00
|
|
|
NTP_POST_PATCH_HOOKS += NTP_PATCH_FIXUPS
|
2003-01-18 22:27:22 +01:00
|
|
|
|
2011-09-29 21:57:43 +02:00
|
|
|
$(eval $(call AUTOTARGETS))
|