merge r15139 to 8.09 (closes: #4718), bump release number
[openwrt/svn-archive/archive.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.23
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:=ffce77695e55d8efda19ab0b78309c23
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/chrony
23 SUBMENU:=Time Synchronization
24 SECTION:=net
25 CATEGORY:=Network
26 DEPENDS:=+libreadline +libncurses @!TARGET_avr32 @!powerpc
27 TITLE:=NTP client/server for on-demand connections
28 URL:=http://chrony.sunsite.dk/
29 endef
30
31 define Package/chrony/description
32 A NTP implementation that has been specifically written to work
33 well in the case of an intermittent (e.g. dial-on-demand)
34 connection to the network where your NTP servers are.
35 endef
36
37 define Package/chrony/conffiles
38 /etc/chrony/chrony.conf
39 endef
40
41 define Build/Configure
42 $(call Build/Configure/Default, \
43 --target=$(GNU_TARGET_NAME) \
44 --prefix=/usr \
45 --with-readline-includes=$(STAGING_DIR)/usr/include \
46 --with-readline-library=$(STAGING_DIR)/usr/lib \
47 )
48 endef
49
50 define Build/Compile
51 $(MAKE) -C $(PKG_BUILD_DIR) \
52 $(TARGET_CONFIGURE_OPTS) \
53 prefix="$(PKG_INSTALL_DIR)/usr"
54 endef
55
56 define Package/chrony/install
57 $(INSTALL_DIR) $(1)/usr/bin/
58 $(INSTALL_DIR) $(1)/usr/sbin/
59 $(INSTALL_BIN) $(PKG_BUILD_DIR)/chronyd $(1)/usr/sbin
60 $(INSTALL_BIN) $(PKG_BUILD_DIR)/chronyc $(1)/usr/bin
61 $(INSTALL_DIR) $(1)/etc/init.d
62 $(INSTALL_DIR) $(1)/etc/config
63 $(INSTALL_DIR) $(1)/etc/chrony
64 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
65 $(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd
66 $(INSTALL_BIN) ./files/ntpd.init $(1)/etc/init.d/ntpd
67 $(INSTALL_CONF) ./files/ntpd.config $(1)/etc/config/ntpd
68 $(INSTALL_CONF) ./files/chrony.conf $(1)/etc/chrony/chrony.conf
69 $(INSTALL_CONF) ./files/chrony.keys $(1)/etc/chrony/chrony.keys
70 endef
71
72 $(eval $(call BuildPackage,chrony))