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
:=cf73cd85f248232c62f8029e6eb05938
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 the
36 system clock with remote NTP time servers and run
/montior local NTP
41 $(call Package
/ntpd
/Default
)
46 define Package
/ntpd
/description
47 $(call Package
/ntpd
/Default
/description
)
49 This package contains the ntpd server.
52 define Package
/ntpd-ssl
53 $(call Package
/ntpd
/Default
)
54 TITLE
+= server
(with OpenSSL support
)
59 define Package
/ntpd-ssl
/description
60 $(call Package
/ntpd
/Default
/description
)
62 This package contains the ntpd server with OpenSSL support.
65 define Package
/ntpdate
66 $(call Package
/ntpd
/Default
)
71 define Package
/ntpdate
/description
72 $(call Package
/ntpd
/Default
/description
)
74 This package contains ntpdate.
77 define Package
/ntp-utils
78 $(call Package
/ntpd
/Default
)
84 define Package
/ntp-utils
/description
85 $(call Package
/ntpd
/Default
/description
)
87 This package contains ntpdc and ntpq.
90 define Package
/ntpd
/conffiles
94 define Package
/ntpd
/Default
/postinst
96 grep
-q
'^ntp[[:space:]]*123/udp' $${IPKG_INSTROOT}/etc
/services
2>/dev
/null
97 [ $$?
-ne
0 ] && echo
"ntp 123/udp # Network Time Protocol" >>$${IPKG_INSTROOT}/etc
/services || exit
0
98 grep
-q
'^ntp[[:space:]]*123/tcp' $${IPKG_INSTROOT}/etc
/services
2>/dev
/null
99 [ $$?
-ne
0 ] && echo
"ntp 123/tcp # Network Time Protocol" >>$${IPKG_INSTROOT}/etc
/services || exit
0
102 define Package
/ntpdate
/postinst
103 $(call Package
/ntpd
/Default
/postinst
)
106 define Package
/ntpd
/postinst
107 $(call Package
/ntpd
/Default
/postinst
)
110 define Package
/ntp-utils
/postinst
111 $(call Package
/ntpd
/Default
/postinst
)
115 -I
$(STAGING_DIR
)/usr
/include/libelf
118 ac_cv_header_md5_h
=no \
119 ac_cv_lib_rt_sched_setscheduler
=no \
120 ac_cv_header_dns_sd_h
=no
123 --disable-all-clocks \
124 --disable-parse-clocks \
126 --enable-LOCAL-CLOCK \
128 --disable-linuxcaps \
131 ifeq ($(BUILD_VARIANT
),ssl
)
134 --with-openssl-incdir
="$(STAGING_DIR)/usr/include" \
135 --with-openssl-libdir
="$(STAGING_DIR)/usr/lib"
138 define Package
/ntpd
/install
139 $(INSTALL_DIR
) $(1)/usr
/sbin
140 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpd
/ntpd
$(1)/usr
/sbin
/
141 $(INSTALL_DIR
) $(1)/etc
142 $(INSTALL_CONF
) .
/files
/ntp.conf
$(1)/etc
/
143 $(INSTALL_DIR
) $(1)/etc
/init.d
144 $(INSTALL_BIN
) .
/files
/ntpd.init
$(1)/etc
/init.d
/ntpd
145 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/iface
146 $(INSTALL_BIN
) .
/files
/ntpd.hotplug
$(1)/etc
/hotplug.d
/iface
/20-ntpd
149 Package
/ntpd-ssl
/conffiles
= $(Package
/ntpd
/conffiles
)
150 Package
/ntpd-ssl
/install = $(Package
/ntpd
/install)
151 Package
/ntpd-ssl
/postinst
= $(Package
/ntpd
/postinst
)
153 define Package
/ntpdate
/install
154 $(INSTALL_DIR
) $(1)/usr
/sbin
155 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpdate
/ntpdate
$(1)/usr
/sbin
/
156 $(INSTALL_DIR
) $(1)/etc
/init.d
157 $(INSTALL_BIN
) .
/files
/ntpdate.init
$(1)/etc
/init.d
/ntpdate
160 define Package
/ntp-utils
/install
161 $(INSTALL_DIR
) $(1)/usr
/sbin
162 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpdc
/ntpdc
$(1)/usr
/sbin
/
163 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpq
/ntpq
$(1)/usr
/sbin
/
166 $(eval
$(call BuildPackage
,ntpd
))
167 $(eval
$(call BuildPackage
,ntpd-ssl
))
168 $(eval
$(call BuildPackage
,ntpdate
))
169 $(eval
$(call BuildPackage
,ntp-utils
))