2 # Copyright (C) 2006-2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=http
://www.eecis.udel.edu
/~ntp
/ntp_spool
/ntp4
/
17 PKG_MD5SUM
:=fcb32a01e1ae3f9ed5bac86b12c7a1cc
19 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
20 PKG_BUILD_DEPENDS
:=libelf
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/ntpd
/Default
25 SUBMENU
:=Time Synchronization
29 URL
:=http
://www.ntp.org
/
32 define Package
/ntpd
/Default
/description
33 The ISC ntp suite is a collection of tools used to synchronize
34 the system clock with remote NTP time servers and run
/montior
39 $(call Package
/ntpd
/Default
)
44 define Package
/ntpd
/description
45 $(call Package
/ntpd
/Default
/description
)
46 This package contains the ntpd server.
49 define Package
/ntpdate
50 $(call Package
/ntpd
/Default
)
54 define Package
/ntpdate
/description
55 $(call Package
/ntpd
/Default
/description
)
56 This package contains ntpdate.
59 define Package
/ntp-utils
60 $(call Package
/ntpd
/Default
)
61 DEPENDS
:=+libreadline
+libncurses
65 define Package
/ntp-utils
/description
66 $(call Package
/ntpd
/Default
/description
)
67 This package contains ntpdc and ntpq.
70 define Package
/ntpd
/conffiles
74 define Package
/ntpd
/postinst
76 echo
"ntp 123/udp # Network Time Protocol
77 ntp 123/tcp # Network Time Protocol" >> $${IPKG_INSTROOT}/etc
/services
80 TARGET_CPPFLAGS
+= -I
$(STAGING_DIR
)/usr
/include/libelf
82 define Build
/Configure
83 $(call Build
/Configure
/Default
, \
84 --disable-all-clocks \
85 --disable-parse-clocks \
87 --enable-LOCAL-CLOCK \
94 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
95 CFLAGS
="$(TARGET_CFLAGS)"
98 define Package
/ntpd
/install
99 $(INSTALL_DIR
) $(1)/usr
/sbin
/
100 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpd
/ntpd
$(1)/usr
/sbin
/
101 $(INSTALL_DIR
) $(1)/etc
102 $(INSTALL_DATA
) .
/files
/ntp.conf
$(1)/etc
/
103 $(INSTALL_DIR
) $(1)/etc
/init.d
104 $(INSTALL_BIN
) .
/files
/ntpd.init
$(1)/etc
/init.d
/ntpd
105 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/iface
106 $(INSTALL_BIN
) .
/files
/ntpd.hotplug
$(1)/etc
/hotplug.d
/iface
/20-ntpd
109 define Package
/ntpdate
/install
110 $(INSTALL_DIR
) $(1)/usr
/sbin
/
111 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpdate
/ntpdate
$(1)/usr
/sbin
/
114 define Package
/ntp-utils
/install
115 $(INSTALL_DIR
) $(1)/usr
/sbin
/
116 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpdc
/ntpdc
$(1)/usr
/sbin
/
117 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpq
/ntpq
$(1)/usr
/sbin
/
120 $(eval
$(call BuildPackage
,ntpd
))
121 $(eval
$(call BuildPackage
,ntpdate
))
122 $(eval
$(call BuildPackage
,ntp-utils
))