chrony.mk 2.1 KB

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