Fix monit rc priority (#1483)
[openwrt/svn-archive/archive.git] / net / chrony / Makefile
1 #
2 # Copyright (C) 2006 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:=1
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 PKG_CAT:=zcat
20
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/chrony
26 SECTION:=net
27 CATEGORY:=Network
28 TITLE:=NTP client/server for on-demand connections
29 DESCRIPTION:=\
30 A NTP implementation that has been specifically written to work well in the case of an intermittent \
31 (e.g. dial-on-demand) connection to the network where your NTP servers are.
32 URL:=http://chrony.sunsite.dk/
33 MAINTAINER:=Richard Kunze <kunze-openwrt-chrony@tivano.de>
34 DEPENDS:=uclibc libreadline libncurses
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 endef
48
49 define Build/Compile
50 $(MAKE) -C $(PKG_BUILD_DIR) \
51 $(TARGET_CONFIGURE_OPTS) \
52 prefix="$(PKG_INSTALL_DIR)/usr"
53 endef
54
55 define Package/chrony/install
56 $(INSTALL_DIR) $(1)/usr/bin/
57 $(INSTALL_DIR) $(1)/usr/sbin/
58 $(INSTALL_BIN) $(PKG_BUILD_DIR)/chronyd $(1)$(PKG_INSTALL_DIR)/usr/sbin
59 $(INSTALL_BIN) $(PKG_BUILD_DIR)/chronyc $(1)$(PKG_INSTALL_DIR)/usr/bin
60 $(INSTALL_DIR) $(1)/etc/init.d
61 $(INSTALL_DIR) $(1)/etc/config
62 $(INSTALL_DIR) $(1)/etc/chrony
63 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
64 $(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd
65 $(INSTALL_BIN) ./files/ntpd.init $(1)/etc/init.d/ntpd
66 $(INSTALL_CONF) ./files/ntpd.config $(1)/etc/config/ntpd
67 $(INSTALL_CONF) ./files/chrony.conf $(1)/etc/chrony/chrony.conf
68 $(INSTALL_CONF) ./files/chrony.keys $(1)/etc/chrony/chrony.keys
69 endef
70
71 $(eval $(call BuildPackage,chrony))