You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.4 KiB

  1. #
  2. # Copyright (C) 2006-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=chrony
  9. PKG_VERSION:=4.0
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://download.tuxfamily.org/chrony/
  13. PKG_HASH:=be27ea14c55e7a4434b2fa51d53018c7051c42fa6a3198c9aa6a1658bae0c625
  14. PKG_MAINTAINER:=Miroslav Lichvar <mlichvar0@gmail.com>
  15. PKG_LICENSE:=GPL-2.0
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_CPE_ID:=cpe:/a:tuxfamily:chrony
  18. PKG_BUILD_DEPENDS:=pps-tools
  19. PKG_CONFIG_DEPENDS:= \
  20. CONFIG_CHRONY_NTS
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/chrony
  23. SUBMENU:=Time Synchronization
  24. SECTION:=net
  25. CATEGORY:=Network
  26. DEPENDS:=+libcap +libpthread +CHRONY_NTS:libgnutls +CHRONY_NTS:ca-bundle
  27. USERID:=chrony=323:chrony=323
  28. TITLE:=A versatile NTP client and server
  29. URL:=http://chrony.tuxfamily.org/
  30. endef
  31. define Package/chrony/config
  32. if PACKAGE_chrony
  33. config CHRONY_NTS
  34. bool "Enable NTS support"
  35. default n
  36. endif
  37. endef
  38. define Package/chrony/description
  39. An NTP client and server designed to perform well in a wide range
  40. of conditions. It can synchronize the system clock with NTP servers,
  41. reference clocks, and manual input using wristwatch and keyboard.
  42. endef
  43. define Package/chrony/conffiles
  44. /etc/chrony/chrony.conf
  45. /etc/config/chrony
  46. endef
  47. CONFIGURE_ARGS+= \
  48. --host-machine=$(shell echo $(GNU_TARGET_NAME) | sed -e 's/-.*//') \
  49. --host-release="" \
  50. --host-system=Linux \
  51. --sysconfdir=/etc/chrony \
  52. --prefix=/usr \
  53. --chronyrundir=/var/run/chrony \
  54. $(if $(CONFIG_CHRONY_NTS),,--disable-nts) \
  55. --disable-readline \
  56. --disable-rtc \
  57. --disable-sechash \
  58. --with-user=chrony
  59. CONFIGURE_VARS+=CPPFLAGS=-DNDEBUG
  60. define Package/chrony/install
  61. $(INSTALL_DIR) $(1)/usr/bin/
  62. $(INSTALL_DIR) $(1)/usr/sbin/
  63. $(INSTALL_BIN) $(PKG_BUILD_DIR)/chronyd $(1)/usr/sbin
  64. $(INSTALL_BIN) $(PKG_BUILD_DIR)/chronyc $(1)/usr/bin
  65. $(INSTALL_DIR) $(1)/etc/init.d
  66. $(INSTALL_DIR) $(1)/etc/config
  67. $(INSTALL_DIR) $(1)/etc/chrony
  68. $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
  69. $(INSTALL_BIN) ./files/chrony.hotplug $(1)/etc/hotplug.d/iface/20-chrony
  70. $(INSTALL_BIN) ./files/chronyd.init $(1)/etc/init.d/chronyd
  71. $(INSTALL_CONF) ./files/chrony.config $(1)/etc/config/chrony
  72. $(INSTALL_CONF) ./files/chrony.conf $(1)/etc/chrony/chrony.conf
  73. endef
  74. $(eval $(call BuildPackage,chrony))