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