2 # Copyright (C) 2006-2011 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
:=00df80a84ec9528fcfb09498075525bc
18 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
21 PKG_LIBTOOL_PATHS
:=. sntp
22 PKG_CHECK_FORMAT_SECURITY
:=0
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/ntpd
/Default
27 SUBMENU
:=Time Synchronization
31 MAINTAINER
:=Peter Wagner
<tripolar@gmx.at
>
32 URL
:=http
://www.ntp.org
/
36 define Package
/ntpd
/Default
/description
37 The ISC ntp suite is a collection of tools used to synchronize the
38 system clock with remote NTP time servers and run
/montior local NTP
43 $(call Package
/ntpd
/Default
)
46 USERID
:=ntp
=123:ntp
=123
49 define Package
/ntpd
/description
50 $(call Package
/ntpd
/Default
/description
)
52 This package contains the ntpd server.
55 define Package
/ntpd-ssl
56 $(call Package
/ntpd
/Default
)
57 TITLE
+= server
(with OpenSSL support
)
60 USERID
:=ntp
=123:ntp
=123
63 define Package
/ntpd-ssl
/description
64 $(call Package
/ntpd
/Default
/description
)
66 This package contains the ntpd server with OpenSSL support.
69 define Package
/ntpdate
70 $(call Package
/ntpd
/Default
)
75 define Package
/ntpdate
/description
76 $(call Package
/ntpd
/Default
/description
)
78 This package contains ntpdate.
81 define Package
/ntp-utils
82 $(call Package
/ntpd
/Default
)
87 define Package
/ntp-utils
/description
88 $(call Package
/ntpd
/Default
/description
)
90 This package contains ntpdc
, ntpq and ntptime.
93 define Package
/ntp-keygen
94 $(call Package
/ntpd
/Default
)
99 define Package
/ntp-keygen
/description
100 $(call Package
/ntpd
/Default
/description
)
102 This package contains the ntp-keygen.
105 define Package
/ntp-keygen-ssl
106 $(call Package
/ntpd
/Default
)
107 TITLE
+=keygen
(with OpenSSL support
)
109 DEPENDS
+= +libopenssl
112 define Package
/ntp-keygen-ssl
/description
113 $(call Package
/ntpd
/Default
/description
)
115 This package contains the ntp-keygen with OpenSSL support.
118 define Package
/ntpd
/conffiles
123 ac_cv_header_md5_h
=no \
124 ac_cv_lib_rt_sched_setscheduler
=no \
125 ac_cv_header_dns_sd_h
=no
128 --disable-all-clocks \
129 --disable-parse-clocks \
131 --without-lineeditlibs \
133 --enable-LOCAL-CLOCK \
137 ifeq ($(BUILD_VARIANT
),ssl
)
140 --with-openssl-incdir
="$(STAGING_DIR)/usr/include" \
141 --with-openssl-libdir
="$(STAGING_DIR)/usr/lib"
144 define Package
/ntpd
/install
145 $(INSTALL_DIR
) $(1)/sbin
146 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpd
/ntpd
$(1)/sbin
/
147 $(INSTALL_DIR
) $(1)/etc
148 $(INSTALL_CONF
) .
/files
/ntp.conf
$(1)/etc
/
149 $(INSTALL_DIR
) $(1)/etc
/init.d
150 $(INSTALL_BIN
) .
/files
/ntpd.init
$(1)/etc
/init.d
/ntpd
151 $(INSTALL_DIR
) $(1)/etc
/hotplug.d
/iface
152 $(INSTALL_BIN
) .
/files
/ntpd.hotplug
$(1)/etc
/hotplug.d
/iface
/20-ntpd
155 define Package
/ntpd
/postinst
157 [ -L
"$${IPKG_INSTROOT}/usr/sbin/ntpd" ] && rm -f
"$${IPKG_INSTROOT}/usr/sbin/ntpd"
161 define Package
/ntpd
/postrm
163 /bin
/busybox ntpd
-h
2>&1 | grep
-q BusyBox
&& ln
-sf ..
/..
/bin
/busybox
/usr
/sbin
/ntpd
167 Package
/ntpd-ssl
/conffiles
= $(Package
/ntpd
/conffiles
)
168 Package
/ntpd-ssl
/install = $(Package
/ntpd
/install)
170 define Package
/ntpdate
/install
171 $(INSTALL_DIR
) $(1)/usr
/sbin
172 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpdate
/ntpdate
$(1)/usr
/sbin
/
173 $(INSTALL_DIR
) $(1)/etc
/init.d
174 $(INSTALL_BIN
) .
/files
/ntpdate.init
$(1)/etc
/init.d
/ntpdate
177 define Package
/ntp-utils
/install
178 $(INSTALL_DIR
) $(1)/usr
/sbin
179 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpdc
/ntpdc
$(1)/usr
/sbin
/
180 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpq
/ntpq
$(1)/usr
/sbin
/
181 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/util
/ntptime
$(1)/usr
/sbin
/
184 define Package
/ntp-keygen
/install
185 $(INSTALL_DIR
) $(1)/usr
/sbin
186 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/util
/ntp-keygen
$(1)/usr
/sbin
/
189 Package
/ntp-keygen-ssl
/install = $(Package
/ntp-keygen
/install)
191 $(eval
$(call BuildPackage
,ntpd
))
192 $(eval
$(call BuildPackage
,ntpd-ssl
))
193 $(eval
$(call BuildPackage
,ntpdate
))
194 $(eval
$(call BuildPackage
,ntp-utils
))
195 $(eval
$(call BuildPackage
,ntp-keygen
))
196 $(eval
$(call BuildPackage
,ntp-keygen-ssl
))