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