chrony: add NTS option 13615/head
authorMiroslav Lichvar <mlichvar0@gmail.com>
Fri, 9 Oct 2020 13:00:37 +0000 (15:00 +0200)
committerMiroslav Lichvar <mlichvar0@gmail.com>
Fri, 9 Oct 2020 14:52:30 +0000 (16:52 +0200)
Signed-off-by: Miroslav Lichvar <mlichvar0@gmail.com>
net/chrony/Makefile

index 8b73425d114683394f64e5c48d496aecd547a544..f69be16fe35448dfe9e5b604a130c05153009718 100644 (file)
@@ -22,18 +22,29 @@ PKG_CPE_ID:=cpe:/a:tuxfamily:chrony
 
 PKG_BUILD_DEPENDS:=pps-tools
 
+PKG_CONFIG_DEPENDS:= \
+       CONFIG_CHRONY_NTS
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/chrony
   SUBMENU:=Time Synchronization
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=+libcap +libpthread
+  DEPENDS:=+libcap +libpthread +CHRONY_NTS:libgnutls +CHRONY_NTS:ca-bundle
   USERID:=chrony=323:chrony=323
   TITLE:=A versatile NTP client and server
   URL:=http://chrony.tuxfamily.org/
 endef
 
+define Package/chrony/config
+       if PACKAGE_chrony
+               config CHRONY_NTS
+                       bool "Enable NTS support"
+                       default n
+       endif
+endef
+
 define Package/chrony/description
        An NTP client and server designed to perform well in a wide range
        of conditions. It can synchronize the system clock with NTP servers,
@@ -52,7 +63,7 @@ CONFIGURE_ARGS+= \
        --sysconfdir=/etc/chrony \
        --prefix=/usr \
        --chronyrundir=/var/run/chrony \
-       --disable-nts \
+       $(if $(CONFIG_CHRONY_NTS),,--disable-nts) \
        --disable-readline \
        --disable-rtc \
        --disable-sechash \