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_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
20 PKG_BUILD_DEPENDS
:=libelf
22 PKG_LIBTOOL_PATHS
:=. sntp
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/ntpd
/Default
27 SUBMENU
:=Time Synchronization
31 URL
:=http
://www.ntp.org
/
34 define Package
/ntpd
/Default
/description
35 The ISC ntp suite is a collection of tools used to synchronize
36 the system clock with remote NTP time servers and run
/montior
41 $(call Package
/ntpd
/Default
)
46 define Package
/ntpd
/description
47 $(call Package
/ntpd
/Default
/description
)
48 This package contains the ntpd server.
51 define Package
/ntpd-ssl
52 $(call Package
/ntpd
/Default
)
53 TITLE
+= server
(with OpenSSL support
)
58 define Package
/ntpd-ssl
/description
59 $(call Package
/ntpd
/Default
/description
)
60 This package contains the ntpd server with OpenSSL support.
63 define Package
/ntpdate
64 $(call Package
/ntpd
/Default
)
69 define Package
/ntpdate
/description
70 $(call Package
/ntpd
/Default
/description
)
71 This package contains ntpdate.
74 define Package
/ntp-utils
75 $(call Package
/ntpd
/Default
)
81 define Package
/ntp-utils
/description
82 $(call Package
/ntpd
/Default
/description
)
83 This package contains ntpdc and ntpq.
86 define Package
/ntpd
/conffiles
90 define Package
/ntpd
/Default
/postinst
92 grep
-q
'^ntp[[:space:]]*123/udp' $${IPKG_INSTROOT}/etc
/services
2>/dev
/null
93 [ $$?
-ne
0 ] && echo
"ntp 123/udp # Network Time Protocol" >>$${IPKG_INSTROOT}/etc
/services || exit
0
94 grep
-q
'^ntp[[:space:]]*123/tcp' $${IPKG_INSTROOT}/etc
/services
2>/dev
/null
95 [ $$?
-ne
0 ] && echo
"ntp 123/tcp # Network Time Protocol" >>$${IPKG_INSTROOT}/etc
/services || exit
0
98 define Package
/ntpdate
/postinst
99 $(call Package
/ntpd
/Default
/postinst
)
102 define Package
/ntpd
/postinst
103 $(call Package
/ntpd
/Default
/postinst
)
106 define Package
/ntp-utils
/postinst
107 $(call Package
/ntpd
/Default
/postinst
)
111 -I
$(STAGING_DIR
)/usr
/include/libelf
114 ac_cv_header_md5_h
=no \
115 ac_cv_lib_rt_sched_setscheduler
=no \
116 ac_cv_header_dns_sd_h
=no
119 --disable-all-clocks \
120 --disable-parse-clocks \
122 --enable-LOCAL-CLOCK \
126 ifeq ($(BUILD_VARIANT
),ssl
)
129 --with-openssl-incdir
="$(STAGING_DIR)/usr/include" \
130 --with-openssl-libdir
="$(STAGING_DIR)/usr/lib"
133 define Package
/ntpd
/install
134 $(INSTALL_DIR
) $(1)/usr
/sbin
/
135 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpd
/ntpd
$(1)/usr
/sbin
/ntpd
136 $(INSTALL_DIR
) $(1)/etc
137 $(INSTALL_CONF
) .
/files
/ntp.conf
$(1)/etc
/
138 $(INSTALL_DIR
) $(1)/etc
/init.d
139 $(INSTALL_BIN
) .
/files
/ntpd.init
$(1)/etc
/init.d
/ntpd
140 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/iface
141 $(INSTALL_BIN
) .
/files
/ntpd.hotplug
$(1)/etc
/hotplug.d
/iface
/20-ntpd
144 Package
/ntpd-ssl
/install = $(Package
/ntpd
/install)
146 define Package
/ntpdate
/install
147 $(INSTALL_DIR
) $(1)/usr
/sbin
/
148 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpdate
/ntpdate
$(1)/usr
/sbin
/
149 $(INSTALL_DIR
) $(1)/etc
/init.d
150 $(INSTALL_BIN
) .
/files
/ntpdate.init
$(1)/etc
/init.d
/ntpdate
153 define Package
/ntp-utils
/install
154 $(INSTALL_DIR
) $(1)/usr
/sbin
/
155 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpdc
/ntpdc
$(1)/usr
/sbin
/
156 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpq
/ntpq
$(1)/usr
/sbin
/
159 $(eval
$(call BuildPackage
,ntpd
))
160 $(eval
$(call BuildPackage
,ntpd-ssl
))
161 $(eval
$(call BuildPackage
,ntpdate
))
162 $(eval
$(call BuildPackage
,ntp-utils
))