2 # Copyright (C) 2006-2010 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
:=4d64a99592b818aa9419fc9dcb149746
18 PKG_BUILD_DEPENDS
:=libelf
20 PKG_LIBTOOL_PATHS
:=. sntp
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
)
43 define Package
/ntpd
/description
44 $(call Package
/ntpd
/Default
/description
)
45 This package contains the ntpd server.
48 define Package
/ntpdate
49 $(call Package
/ntpd
/Default
)
53 define Package
/ntpdate
/description
54 $(call Package
/ntpd
/Default
/description
)
55 This package contains ntpdate.
58 define Package
/ntp-utils
59 $(call Package
/ntpd
/Default
)
64 define Package
/ntp-utils
/description
65 $(call Package
/ntpd
/Default
/description
)
66 This package contains ntpdc and ntpq.
69 define Package
/ntpd
/conffiles
73 define Package
/ntpd
/Default
/postinst
75 grep
-q
'^ntp[[:space:]]*123/udp' $${IPKG_INSTROOT}/etc
/services
2>/dev
/null
76 [ $$?
-ne
0 ] && echo
"ntp 123/udp # Network Time Protocol" >>$${IPKG_INSTROOT}/etc
/services || exit
0
77 grep
-q
'^ntp[[:space:]]*123/tcp' $${IPKG_INSTROOT}/etc
/services
2>/dev
/null
78 [ $$?
-ne
0 ] && echo
"ntp 123/tcp # Network Time Protocol" >>$${IPKG_INSTROOT}/etc
/services || exit
0
81 define Package
/ntpdate
/postinst
82 $(call Package
/ntpd
/Default
/postinst
)
85 define Package
/ntpd
/postinst
86 $(call Package
/ntpd
/Default
/postinst
)
89 define Package
/ntp-utils
/postinst
90 $(call Package
/ntpd
/Default
/postinst
)
93 TARGET_CPPFLAGS
+= -I
$(STAGING_DIR
)/usr
/include/libelf
98 define Build
/Configure
99 $(call Build
/Configure
/Default
, \
100 --disable-all-clocks \
101 --disable-parse-clocks \
103 --enable-LOCAL-CLOCK \
105 --disable-linuxcaps
, \
106 ac_cv_lib_rt_sched_setscheduler
=no \
107 ac_cv_header_dns_sd_h
=no \
112 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
113 CFLAGS
="$(TARGET_CFLAGS)"
116 define Package
/ntpd
/install
117 $(INSTALL_DIR
) $(1)/usr
/sbin
/
118 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpd
/ntpd
$(1)/usr
/sbin
/
119 $(INSTALL_DIR
) $(1)/etc
120 $(INSTALL_CONF
) .
/files
/ntp.conf
$(1)/etc
/
121 $(INSTALL_DIR
) $(1)/etc
/init.d
122 $(INSTALL_BIN
) .
/files
/ntpd.init
$(1)/etc
/init.d
/ntpd
123 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/iface
124 $(INSTALL_BIN
) .
/files
/ntpd.hotplug
$(1)/etc
/hotplug.d
/iface
/20-ntpd
127 define Package
/ntpdate
/install
128 $(INSTALL_DIR
) $(1)/usr
/sbin
/
129 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpdate
/ntpdate
$(1)/usr
/sbin
/
130 $(INSTALL_DIR
) $(1)/etc
/init.d
131 $(INSTALL_BIN
) .
/files
/ntpdate.init
$(1)/etc
/init.d
/ntpdate
134 define Package
/ntp-utils
/install
135 $(INSTALL_DIR
) $(1)/usr
/sbin
/
136 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpdc
/ntpdc
$(1)/usr
/sbin
/
137 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpq
/ntpq
$(1)/usr
/sbin
/
140 $(eval
$(call BuildPackage
,ntpd
))
141 $(eval
$(call BuildPackage
,ntpdate
))
142 $(eval
$(call BuildPackage
,ntp-utils
))