1################################################################################ 2# 3# chrony 4# 5################################################################################ 6 7CHRONY_VERSION = 4.0 8CHRONY_SITE = http://download.tuxfamily.org/chrony 9CHRONY_LICENSE = GPL-2.0 10CHRONY_LICENSE_FILES = COPYING 11CHRONY_CPE_ID_VENDOR = tuxfamily 12CHRONY_SELINUX_MODULES = chronyd 13CHRONY_DEPENDENCIES = host-pkgconf 14 15CHRONY_CONF_OPTS = \ 16 --host-system=Linux \ 17 --host-machine=$(BR2_ARCH) \ 18 --prefix=/usr \ 19 --without-tomcrypt \ 20 $(if $(BR2_PACKAGE_CHRONY_DEBUG_LOGGING),--enable-debug,--disable-debug) 21 22ifeq ($(BR2_PACKAGE_LIBCAP),y) 23CHRONY_DEPENDENCIES += libcap 24else 25CHRONY_CONF_OPTS += --without-libcap 26endif 27 28ifeq ($(BR2_PACKAGE_LIBNSS),y) 29CHRONY_DEPENDENCIES += libnss 30else 31CHRONY_CONF_OPTS += --without-nss 32endif 33 34ifeq ($(BR2_PACKAGE_LIBSECCOMP),y) 35CHRONY_CONF_OPTS += --enable-scfilter 36CHRONY_DEPENDENCIES += libseccomp 37else 38CHRONY_CONF_OPTS += --without-seccomp 39endif 40 41ifeq ($(BR2_PACKAGE_LIBEDIT),y) 42CHRONY_DEPENDENCIES += libedit 43else 44CHRONY_CONF_OPTS += --without-editline --disable-readline 45endif 46 47# If pps-tools is available, build it before so the package can use it 48# (HAVE_SYS_TIMEPPS_H). 49ifeq ($(BR2_PACKAGE_PPS_TOOLS),y) 50CHRONY_DEPENDENCIES += pps-tools 51endif 52 53ifeq ($(BR2_PACKAGE_GNUTLS),y) 54CHRONY_DEPENDENCIES += gnutls 55else 56CHRONY_CONF_OPTS += --without-gnutls 57endif 58 59ifeq ($(BR2_PACKAGE_NETTLE),y) 60CHRONY_DEPENDENCIES += nettle 61else 62CHRONY_CONF_OPTS += --without-nettle 63endif 64 65define CHRONY_CONFIGURE_CMDS 66 cd $(@D) && $(TARGET_CONFIGURE_OPTS) ./configure $(CHRONY_CONF_OPTS) 67endef 68 69define CHRONY_BUILD_CMDS 70 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) 71endef 72 73define CHRONY_INSTALL_TARGET_CMDS 74 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install 75endef 76 77define CHRONY_INSTALL_INIT_SYSV 78 $(INSTALL) -D -m 755 package/chrony/S49chrony $(TARGET_DIR)/etc/init.d/S49chrony 79endef 80 81define CHRONY_INSTALL_INIT_SYSTEMD 82 $(INSTALL) -D -m 644 package/chrony/chrony.service \ 83 $(TARGET_DIR)/usr/lib/systemd/system/chrony.service 84endef 85 86$(eval $(generic-package)) 87