chrony.mk 1.7 KB

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