summaryrefslogtreecommitdiffstats
path: root/package/ntp/ntp.mk
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavo@zacarias.com.ar>2011-02-03 17:45:57 -0300
committerPeter Korsgaard <jacmet@sunsite.dk>2011-02-04 19:57:12 +0100
commit14a971ab6c47324dd1422b1787c393702b2d475c (patch)
treeb59abc4d45294d775f445538d5f86a9196783f6c /package/ntp/ntp.mk
parent3fa18d27d3f4254f467333a903dcb5f7fcd53b24 (diff)
downloadbuildroot-novena-14a971ab6c47324dd1422b1787c393702b2d475c.tar.gz
buildroot-novena-14a971ab6c47324dd1422b1787c393702b2d475c.zip
ntp: add ntpdate option
Closes #2935 Add ntpdate option and make ntpd optional. Based on incomplete patch by Frederik Pasch <fpasch@googlemail.com> Also enable crypto when openssl is enabled. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/ntp/ntp.mk')
-rw-r--r--package/ntp/ntp.mk13
1 files changed, 10 insertions, 3 deletions
diff --git a/package/ntp/ntp.mk b/package/ntp/ntp.mk
index 7e09b5edd..bca5d6e57 100644
--- a/package/ntp/ntp.mk
+++ b/package/ntp/ntp.mk
@@ -15,25 +15,32 @@ endif
NTP_CONF_OPT = --with-shared \
--program-transform-name=s,,, \
- --without-crypto \
--disable-tickadj \
--without-ntpsnmpd
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+NTP_CONF_OPT += --with-crypto
+NTP_DEPENDENCIES += openssl
+else
+NTP_CONF_OPT += --without-crypto
+endif
+
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_SNTP) += sntp/sntp
NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTP_KEYGEN) += util/ntp-keygen
NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTP_WAIT) += scripts/ntp-wait
+NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPDATE) += ntpdate/ntpdate
NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPDC) += ntpdc/ntpdc
NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPQ) += ntpq/ntpq
NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPTRACE) += scripts/ntptrace
+NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_SNTP) += sntp/sntp
NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_TICKADJ) += util/tickadj
define NTP_INSTALL_TARGET_CMDS
- install -m 755 $(@D)/ntpd/ntpd $(TARGET_DIR)/usr/sbin/ntpd
+ $(if $(BR2_PACKAGE_NTP_NTPD), install -m 755 $(@D)/ntpd/ntpd $(TARGET_DIR)/usr/sbin/ntpd)
test -z "$(NTP_INSTALL_FILES_y)" || install -m 755 $(addprefix $(@D)/,$(NTP_INSTALL_FILES_y)) $(TARGET_DIR)/usr/bin/
install -m 755 package/ntp/ntp.sysvinit $(TARGET_DIR)/etc/init.d/S49ntp
@if [ ! -f $(TARGET_DIR)/etc/default/ntpd ]; then \