[packages] fix chrony description formatting
[packages.git] / net / chrony / Makefile
1 #
2 # Copyright (C) 2006-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=chrony
12 PKG_VERSION:=1.21
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:= ftp://chrony.sunsite.dk/projects/chrony/ \
17         http://chrony.sunsite.dk/download/
18 PKG_MD5SUM:=84f76a73dff5a3c9e9f11f3c29a4e93b
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/chrony
25   SUBMENU:=Time Synchronization
26   SECTION:=net
27   CATEGORY:=Network
28   DEPENDS:=+libreadline +libncurses
29   TITLE:=NTP client/server for on-demand connections
30   URL:=http://chrony.sunsite.dk/
31 endef
32
33 define Package/chrony/description
34         A NTP implementation that has been specifically written to work
35         well in the case of an intermittent (e.g. dial-on-demand)
36         connection to the network where your NTP servers are.
37 endef
38
39 define Package/chrony/conffiles
40 /etc/chrony/chrony.conf
41 endef
42
43 define Build/Configure
44         $(call Build/Configure/Default, \
45                         --target=$(GNU_TARGET_NAME) \
46                         --prefix=/usr \
47                         --with-readline-includes=$(STAGING_DIR)/usr/include \
48                         --with-readline-library=$(STAGING_DIR)/usr/lib \
49         )
50 endef
51
52 define Build/Compile
53         $(MAKE) -C $(PKG_BUILD_DIR) \
54                 $(TARGET_CONFIGURE_OPTS) \
55                 prefix="$(PKG_INSTALL_DIR)/usr"
56 endef
57
58 define Package/chrony/install
59         $(INSTALL_DIR) $(1)/usr/bin/
60         $(INSTALL_DIR) $(1)/usr/sbin/
61         $(INSTALL_BIN) $(PKG_BUILD_DIR)/chronyd $(1)/usr/sbin
62         $(INSTALL_BIN) $(PKG_BUILD_DIR)/chronyc $(1)/usr/bin
63         $(INSTALL_DIR) $(1)/etc/init.d
64         $(INSTALL_DIR) $(1)/etc/config
65         $(INSTALL_DIR) $(1)/etc/chrony
66         $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
67         $(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd
68         $(INSTALL_BIN) ./files/ntpd.init $(1)/etc/init.d/ntpd
69         $(INSTALL_CONF) ./files/ntpd.config $(1)/etc/config/ntpd
70         $(INSTALL_CONF) ./files/chrony.conf $(1)/etc/chrony/chrony.conf
71         $(INSTALL_CONF) ./files/chrony.keys $(1)/etc/chrony/chrony.keys
72 endef
73
74 $(eval $(call BuildPackage,chrony))