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.

99 lines
2.6 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.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://download.tuxfamily.org/chrony/
  13. PKG_HASH:=ed76f2d3f9347ac6221a91ad4bd553dd0565ac188cd7490d0801d08f7171164c
  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. include $(INCLUDE_DIR)/package.mk
  20. define Package/chrony/Default
  21. SUBMENU:=Time Synchronization
  22. SECTION:=net
  23. CATEGORY:=Network
  24. DEPENDS:=+libcap +libpthread
  25. USERID:=chrony=323:chrony=323
  26. TITLE:=A versatile NTP client and server
  27. URL:=http://chrony.tuxfamily.org/
  28. PROVIDES:=nts
  29. endef
  30. define Package/chrony
  31. $(call Package/chrony/Default)
  32. TITLE+= (without NTS)
  33. VARIANT:=normal
  34. endef
  35. define Package/chrony-nts
  36. $(call Package/chrony/Default)
  37. TITLE+= (with NTS)
  38. DEPENDS+= +libgnutls +ca-bundle
  39. VARIANT:=with-nts
  40. endef
  41. define Package/chrony/description
  42. An NTP client and server designed to perform well in a wide range
  43. of conditions. It can synchronize the system clock with NTP servers,
  44. reference clocks, and manual input using wristwatch and keyboard.
  45. endef
  46. Package/chrony-nts/description = $(Package/chrony/description)
  47. define Package/chrony/conffiles
  48. /etc/chrony/chrony.conf
  49. /etc/config/chrony
  50. endef
  51. Package/chrony-nts/conffiles = $(Package/chrony/conffiles)
  52. CONFIGURE_ARGS+= \
  53. --host-machine=$(shell echo $(GNU_TARGET_NAME) | sed -e 's/-.*//') \
  54. --host-release="" \
  55. --host-system=Linux \
  56. --sysconfdir=/etc/chrony \
  57. --prefix=/usr \
  58. --chronyrundir=/var/run/chrony \
  59. $(if $(findstring normal,$(BUILD_VARIANT)),--disable-nts,--enable,nts) \
  60. --disable-readline \
  61. --disable-rtc \
  62. --disable-sechash \
  63. --with-user=chrony
  64. CONFIGURE_VARS+=CPPFLAGS=-DNDEBUG
  65. define Package/chrony/install
  66. $(INSTALL_DIR) $(1)/usr/bin/
  67. $(INSTALL_DIR) $(1)/usr/sbin/
  68. $(INSTALL_BIN) $(PKG_BUILD_DIR)/chronyd $(1)/usr/sbin
  69. $(INSTALL_BIN) $(PKG_BUILD_DIR)/chronyc $(1)/usr/bin
  70. $(INSTALL_DIR) $(1)/etc/init.d
  71. $(INSTALL_DIR) $(1)/etc/config
  72. $(INSTALL_DIR) $(1)/etc/chrony
  73. $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
  74. $(INSTALL_BIN) ./files/chrony.hotplug $(1)/etc/hotplug.d/iface/20-chrony
  75. $(INSTALL_BIN) ./files/chronyd.init $(1)/etc/init.d/chronyd
  76. $(INSTALL_CONF) ./files/chrony.config $(1)/etc/config/chrony
  77. $(INSTALL_CONF) ./files/chrony.conf $(1)/etc/chrony/chrony.conf
  78. endef
  79. Package/chrony-nts/install= $(Package/chrony/install)
  80. $(eval $(call BuildPackage,chrony))
  81. $(eval $(call BuildPackage,chrony-nts))