d0bf9ba59ab42347c189da4c0840f6e52c53fdf2
[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:=2.2
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://download.tuxfamily.org/chrony/
16 PKG_MD5SUM:=17bc77d3d2ce942675f9600b60452717
17
18 PKG_MAINTAINER:=Miroslav Lichvar <mlichvar0@gmail.com>
19 PKG_LICENSE:=GPL-2.0
20 PKG_LICENSE_FILES:=COPYING
21
22 PKG_BUILD_DEPENDS:=+pps-tools
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/chrony
27 SUBMENU:=Time Synchronization
28 SECTION:=net
29 CATEGORY:=Network
30 DEPENDS:=+libcap
31 USERID:=chrony=323:chrony=323
32 TITLE:=A versatile NTP client and server
33 URL:=http://chrony.tuxfamily.org/
34 endef
35
36 define Package/chrony/description
37 An NTP client and server designed to perform well in a wide range
38 of conditions. It can synchronize the system clock with NTP servers,
39 reference clocks, and manual input using wristwatch and keyboard.
40 endef
41
42 define Package/chrony/conffiles
43 /etc/chrony/chrony.conf
44 /etc/config/chrony
45 endef
46
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 --chronysockdir=/var/run/chrony \
54 --disable-readline \
55 --disable-rtc \
56 --disable-asyncdns \
57 --with-user=chrony
58
59 CONFIGURE_VARS+=CPPFLAGS=-DNDEBUG
60
61 define Package/chrony/install
62 $(INSTALL_DIR) $(1)/usr/bin/
63 $(INSTALL_DIR) $(1)/usr/sbin/
64 $(INSTALL_BIN) $(PKG_BUILD_DIR)/chronyd $(1)/usr/sbin
65 $(INSTALL_BIN) $(PKG_BUILD_DIR)/chronyc $(1)/usr/bin
66 $(INSTALL_DIR) $(1)/etc/init.d
67 $(INSTALL_DIR) $(1)/etc/config
68 $(INSTALL_DIR) $(1)/etc/chrony
69 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
70 $(INSTALL_BIN) ./files/chrony.hotplug $(1)/etc/hotplug.d/iface/20-chrony
71 $(INSTALL_BIN) ./files/chronyd.init $(1)/etc/init.d/chronyd
72 $(INSTALL_CONF) ./files/chrony.config $(1)/etc/config/chrony
73 $(INSTALL_CONF) ./files/chrony.conf $(1)/etc/chrony/chrony.conf
74 endef
75
76 $(eval $(call BuildPackage,chrony))