2 # Copyright (C) 2006-2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=http
://www.eecis.udel.edu
/~ntp
/ntp_spool
/ntp4
/ntp-4.2
/
16 PKG_MD5SUM
:=fe137056e7e611798a46971a783567ce
18 PKG_BUILD_DEPENDS
:=libelf
20 include $(INCLUDE_DIR
)/package.mk
22 define Package
/ntpd
/Default
23 SUBMENU
:=Time Synchronization
27 URL
:=http
://www.ntp.org
/
30 define Package
/ntpd
/Default
/description
31 The ISC ntp suite is a collection of tools used to synchronize
32 the system clock with remote NTP time servers and run
/montior
37 $(call Package
/ntpd
/Default
)
41 define Package
/ntpd
/description
42 $(call Package
/ntpd
/Default
/description
)
43 This package contains the ntpd server.
46 define Package
/ntpdate
47 $(call Package
/ntpd
/Default
)
51 define Package
/ntpdate
/description
52 $(call Package
/ntpd
/Default
/description
)
53 This package contains ntpdate.
56 define Package
/ntp-utils
57 $(call Package
/ntpd
/Default
)
62 define Package
/ntp-utils
/description
63 $(call Package
/ntpd
/Default
/description
)
64 This package contains ntpdc and ntpq.
67 define Package
/ntpd
/conffiles
71 define Package
/ntpd
/Default
/postinst
73 grep
-q
'^ntp[[:space:]]*123/udp' $${IPKG_INSTROOT}/etc
/services
2>/dev
/null
74 [ $$?
-ne
0 ] && echo
"ntp 123/udp # Network Time Protocol" >>$${IPKG_INSTROOT}/etc
/services || exit
0
75 grep
-q
'^ntp[[:space:]]*123/tcp' $${IPKG_INSTROOT}/etc
/services
2>/dev
/null
76 [ $$?
-ne
0 ] && echo
"ntp 123/tcp # Network Time Protocol" >>$${IPKG_INSTROOT}/etc
/services || exit
0
79 define Package
/ntpdate
/postinst
80 $(call Package
/ntpd
/Default
/postinst
)
83 define Package
/ntpd
/postinst
84 $(call Package
/ntpd
/Default
/postinst
)
87 define Package
/ntp-utils
/postinst
88 $(call Package
/ntpd
/Default
/postinst
)
91 TARGET_CPPFLAGS
+= -I
$(STAGING_DIR
)/usr
/include/libelf
96 define Build
/Configure
97 $(call Build
/Configure
/Default
, \
98 --disable-all-clocks \
99 --disable-parse-clocks \
101 --enable-LOCAL-CLOCK \
103 --disable-linuxcaps
, \
104 ac_cv_lib_rt_sched_setscheduler
=no \
109 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
110 CFLAGS
="$(TARGET_CFLAGS)"
113 define Package
/ntpd
/install
114 $(INSTALL_DIR
) $(1)/usr
/sbin
/
115 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpd
/ntpd
$(1)/usr
/sbin
/
116 $(INSTALL_DIR
) $(1)/etc
117 $(INSTALL_CONF
) .
/files
/ntp.conf
$(1)/etc
/
118 $(INSTALL_DIR
) $(1)/etc
/init.d
119 $(INSTALL_BIN
) .
/files
/ntpd.init
$(1)/etc
/init.d
/ntpd
120 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/iface
121 $(INSTALL_BIN
) .
/files
/ntpd.hotplug
$(1)/etc
/hotplug.d
/iface
/20-ntpd
124 define Package
/ntpdate
/install
125 $(INSTALL_DIR
) $(1)/usr
/sbin
/
126 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpdate
/ntpdate
$(1)/usr
/sbin
/
127 $(INSTALL_DIR
) $(1)/etc
/init.d
128 $(INSTALL_BIN
) .
/files
/ntpdate.init
$(1)/etc
/init.d
/ntpdate
131 define Package
/ntp-utils
/install
132 $(INSTALL_DIR
) $(1)/usr
/sbin
/
133 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpdc
/ntpdc
$(1)/usr
/sbin
/
134 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpq
/ntpq
$(1)/usr
/sbin
/
137 $(eval
$(call BuildPackage
,ntpd
))
138 $(eval
$(call BuildPackage
,ntpdate
))
139 $(eval
$(call BuildPackage
,ntp-utils
))