chrony: update package description
[feed/packages.git] / net / chrony / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=chrony
11 PKG_VERSION:=4.5
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://chrony-project.org/releases/
16 PKG_HASH:=19fe1d9f4664d445a69a96c71e8fdb60bcd8df24c73d1386e02287f7366ad422
17
18 PKG_MAINTAINER:=Miroslav Lichvar <mlichvar0@gmail.com>
19 PKG_LICENSE:=GPL-2.0
20 PKG_LICENSE_FILES:=COPYING
21 PKG_CPE_ID:=cpe:/a:tuxfamily:chrony
22
23 PKG_BUILD_DEPENDS:=pps-tools
24 PKG_BUILD_FLAGS:=lto
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/chrony/Default
29 SUBMENU:=Time Synchronization
30 SECTION:=net
31 CATEGORY:=Network
32 DEPENDS:=+libcap +libpthread
33 USERID:=chrony=323:chrony=323
34 TITLE:=A versatile NTP client and server
35 URL:=http://chrony.tuxfamily.org/
36 PROVIDES:=nts
37 endef
38
39 define Package/chrony
40 $(call Package/chrony/Default)
41 TITLE+= (without NTS)
42 VARIANT:=normal
43 CONFLICTS:=chrony-nts
44 endef
45
46 define Package/chrony-nts
47 $(call Package/chrony/Default)
48 TITLE+= (with NTS)
49 DEPENDS+= +PACKAGE_chrony-nts:libgnutls +PACKAGE_chrony-nts:ca-bundle
50 VARIANT:=with-nts
51 endef
52
53 define Package/chrony/description
54 An NTP client and server designed to perform well in a wide range
55 of conditions. It can synchronize the system clock with NTP servers,
56 reference clocks, and manual input using wristwatch and keyboard.
57 This package does NOT include NTS support.
58 endef
59
60 define Package/chrony-nts/description
61 An NTP client and server designed to perform well in a wide range
62 of conditions. It can synchronize the system clock with NTP servers,
63 reference clocks, and manual input using wristwatch and keyboard.
64 This package includes NTS support.
65 endef
66
67 define Package/chrony/conffiles
68 /etc/chrony/chrony.conf
69 /etc/config/chrony
70 endef
71
72 Package/chrony-nts/conffiles = $(Package/chrony/conffiles)
73
74 CONFIGURE_ARGS+= \
75 --host-machine=$(shell echo $(GNU_TARGET_NAME) | sed -e 's/-.*//') \
76 --host-release="" \
77 --host-system=Linux \
78 --sysconfdir=/etc/chrony \
79 --prefix=/usr \
80 --chronyrundir=/var/run/chrony \
81 $(if $(findstring normal,$(BUILD_VARIANT)),--disable-nts,--enable,nts) \
82 --disable-readline \
83 --disable-rtc \
84 --disable-sechash \
85 --with-user=chrony
86
87 CONFIGURE_VARS+=CPPFLAGS=-DNDEBUG
88
89 define Package/chrony/install
90 $(INSTALL_DIR) $(1)/usr/bin/
91 $(INSTALL_DIR) $(1)/usr/sbin/
92 $(INSTALL_BIN) $(PKG_BUILD_DIR)/chronyd $(1)/usr/sbin
93 $(INSTALL_BIN) $(PKG_BUILD_DIR)/chronyc $(1)/usr/bin
94 $(INSTALL_BIN) ./files/chrony.ntp-hotplug $(1)/usr/sbin/chrony-hotplug
95 $(INSTALL_DIR) $(1)/etc/init.d
96 $(INSTALL_DIR) $(1)/etc/config
97 $(INSTALL_DIR) $(1)/etc/chrony
98 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
99 $(INSTALL_BIN) ./files/chrony.hotplug $(1)/etc/hotplug.d/iface/20-chrony
100 $(INSTALL_BIN) ./files/chronyd.init $(1)/etc/init.d/chronyd
101 $(INSTALL_CONF) ./files/chrony.config $(1)/etc/config/chrony
102 $(INSTALL_CONF) ./files/chrony.conf $(1)/etc/chrony/chrony.conf
103 endef
104
105 Package/chrony-nts/install= $(Package/chrony/install)
106
107 $(eval $(call BuildPackage,chrony))
108 $(eval $(call BuildPackage,chrony-nts))