2 # Copyright (C) 2006-2016 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_HASH
:=f65840deab68614d5d7ceb2d0bb9304ff70dcdedd09abb79754a87536b849c19
19 PKG_LICENSE_FILES
:=COPYRIGHT html
/copyright.html
20 PKG_CPE_ID
:=cpe
:/a
:ntp
:ntp
23 PKG_LIBTOOL_PATHS
:=. sntp
24 PKG_CHECK_FORMAT_SECURITY
:=0
27 include $(INCLUDE_DIR
)/package.mk
29 define Package
/ntpd
/Default
30 SUBMENU
:=Time Synchronization
34 MAINTAINER
:=Peter Wagner
<tripolar@gmx.at
>
35 URL
:=http
://www.ntp.org
/
36 DEPENDS
:=+libopenssl
+libpthread
+libcap
39 define Package
/ntpd
/Default
/description
40 The ISC ntp suite is a collection of tools used to synchronize the
41 system clock with remote NTP time servers and run
/monitor local NTP
46 $(call Package
/ntpd
/Default
)
49 USERID
:=ntp
=123:ntp
=123
52 define Package
/ntpd
/description
53 $(call Package
/ntpd
/Default
/description
)
55 This package contains the ntpd server.
58 define Package
/ntpdate
59 $(call Package
/ntpd
/Default
)
63 define Package
/ntpdate
/description
64 $(call Package
/ntpd
/Default
/description
)
66 This package contains ntpdate.
69 define Package
/ntp-utils
70 $(call Package
/ntpd
/Default
)
72 DEPENDS
+= +libevent2-pthreads
75 define Package
/ntp-utils
/description
76 $(call Package
/ntpd
/Default
/description
)
78 This package contains ntpdc
, ntpq
, ntptime and sntp.
81 define Package
/ntp-keygen
82 $(call Package
/ntpd
/Default
)
84 DEPENDS
+= +libevent2-core
87 define Package
/ntp-keygen
/description
88 $(call Package
/ntpd
/Default
/description
)
90 This package contains the ntp-keygen.
94 ac_cv_header_md5_h
=no \
95 ac_cv_lib_rt_sched_setscheduler
=no \
96 ac_cv_header_dns_sd_h
=no \
97 hw_cv_func_snprintf_c99
=yes \
98 hw_cv_func_vsnprintf_c99
=yes \
101 --disable-all-clocks \
102 --disable-parse-clocks \
104 --without-lineeditlibs \
106 --enable-LOCAL-CLOCK \
110 --with-yielding-select
=yes \
112 $(if
$(CONFIG_PACKAGE_ntp-utils
),--with-sntp
,--without-sntp
) \
113 --with-openssl-incdir
="$(STAGING_DIR)/usr/include" \
114 --with-openssl-libdir
="$(STAGING_DIR)/usr/lib"
116 define Package
/ntpd
/install
117 $(INSTALL_DIR
) $(1)/sbin
118 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpd
/ntpd
$(1)/sbin
/
119 $(INSTALL_DIR
) $(1)/usr
/sbin
120 $(INSTALL_BIN
) .
/files
/ntpd.hotplug-helper
$(1)/usr
/sbin
/
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
/ntpd
/postinst
129 [ -L
"$${IPKG_INSTROOT}/usr/sbin/ntpd" ] && rm -f
"$${IPKG_INSTROOT}/usr/sbin/ntpd"
133 define Package
/ntpd
/postrm
135 /bin
/busybox ntpd
-h
2>&1 | grep
-q BusyBox
&& ln
-sf ..
/..
/bin
/busybox
/usr
/sbin
/ntpd
139 define Package
/ntpdate
/install
140 $(INSTALL_DIR
) $(1)/usr
/sbin
141 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpdate
/ntpdate
$(1)/usr
/sbin
/
142 $(INSTALL_DIR
) $(1)/etc
/init.d
143 $(INSTALL_BIN
) .
/files
/ntpdate.init
$(1)/etc
/init.d
/ntpdate
146 define Package
/ntp-utils
/install
147 $(INSTALL_DIR
) $(1)/usr
/sbin
148 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpdc
/ntpdc
$(1)/usr
/sbin
/
149 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ntpq
/ntpq
$(1)/usr
/sbin
/
150 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/util
/ntptime
$(1)/usr
/sbin
/
151 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/sntp
/sntp
$(1)/usr
/sbin
/
154 define Package
/ntp-keygen
/install
155 $(INSTALL_DIR
) $(1)/usr
/sbin
156 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/util
/ntp-keygen
$(1)/usr
/sbin
/
159 $(eval
$(call BuildPackage
,ntpd
))
160 $(eval
$(call BuildPackage
,ntpdate
))
161 $(eval
$(call BuildPackage
,ntp-utils
))
162 $(eval
$(call BuildPackage
,ntp-keygen
))