2006-12-27 19:21:05 +00:00
|
|
|
#
|
2010-02-19 00:14:01 +00:00
|
|
|
# Copyright (C) 2006-2010 OpenWrt.org
|
2006-12-27 19:21:05 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=ntp
|
2010-07-13 03:07:11 +00:00
|
|
|
PKG_VERSION:=4.2.6p2
|
|
|
|
PKG_RELEASE:=1
|
2006-12-27 19:21:05 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2009-05-23 03:49:43 +00:00
|
|
|
PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
|
2010-07-13 03:07:11 +00:00
|
|
|
PKG_MD5SUM:=cf73cd85f248232c62f8029e6eb05938
|
2006-12-27 19:21:05 +00:00
|
|
|
|
2010-03-01 19:31:27 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
|
|
|
|
2007-12-30 16:40:42 +00:00
|
|
|
PKG_BUILD_DEPENDS:=libelf
|
2010-02-19 00:14:01 +00:00
|
|
|
PKG_FIXUP:=libtool
|
|
|
|
PKG_LIBTOOL_PATHS:=. sntp
|
2006-12-27 19:21:05 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2008-04-22 23:32:52 +00:00
|
|
|
define Package/ntpd/Default
|
2007-09-25 18:10:51 +00:00
|
|
|
SUBMENU:=Time Synchronization
|
2006-12-27 19:21:05 +00:00
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
2008-04-22 23:32:52 +00:00
|
|
|
TITLE:=ISC ntp
|
2006-12-27 19:21:05 +00:00
|
|
|
URL:=http://www.ntp.org/
|
|
|
|
endef
|
|
|
|
|
2008-04-22 23:32:52 +00:00
|
|
|
define Package/ntpd/Default/description
|
2010-07-13 03:07:11 +00:00
|
|
|
The ISC ntp suite is a collection of tools used to synchronize the
|
|
|
|
system clock with remote NTP time servers and run/montior local NTP
|
|
|
|
servers.
|
2008-04-22 23:32:52 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ntpd
|
2010-07-13 03:07:11 +00:00
|
|
|
$(call Package/ntpd/Default)
|
2008-04-22 23:32:52 +00:00
|
|
|
TITLE+= server
|
2010-03-01 19:31:27 +00:00
|
|
|
VARIANT:=nossl
|
2008-04-22 23:32:52 +00:00
|
|
|
endef
|
|
|
|
|
2007-10-14 04:32:56 +00:00
|
|
|
define Package/ntpd/description
|
2010-07-13 03:07:11 +00:00
|
|
|
$(call Package/ntpd/Default/description)
|
|
|
|
.
|
|
|
|
This package contains the ntpd server.
|
2008-04-22 23:32:52 +00:00
|
|
|
endef
|
|
|
|
|
2010-03-01 19:31:27 +00:00
|
|
|
define Package/ntpd-ssl
|
2010-07-13 03:07:11 +00:00
|
|
|
$(call Package/ntpd/Default)
|
2010-02-21 20:27:30 +00:00
|
|
|
TITLE+= server (with OpenSSL support)
|
2010-07-13 03:07:11 +00:00
|
|
|
VARIANT:=ssl
|
2010-02-21 20:38:38 +00:00
|
|
|
DEPENDS:=+libopenssl
|
2010-02-21 20:27:30 +00:00
|
|
|
endef
|
|
|
|
|
2010-03-01 19:31:27 +00:00
|
|
|
define Package/ntpd-ssl/description
|
2010-07-13 03:07:11 +00:00
|
|
|
$(call Package/ntpd/Default/description)
|
|
|
|
.
|
|
|
|
This package contains the ntpd server with OpenSSL support.
|
2010-02-21 20:27:30 +00:00
|
|
|
endef
|
|
|
|
|
2008-04-22 23:32:52 +00:00
|
|
|
define Package/ntpdate
|
2010-07-13 03:07:11 +00:00
|
|
|
$(call Package/ntpd/Default)
|
2008-04-22 23:32:52 +00:00
|
|
|
TITLE+=date
|
2010-03-01 19:31:27 +00:00
|
|
|
VARIANT:=nossl
|
2008-04-22 23:32:52 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ntpdate/description
|
2010-07-13 03:07:11 +00:00
|
|
|
$(call Package/ntpd/Default/description)
|
|
|
|
.
|
|
|
|
This package contains ntpdate.
|
2008-04-22 23:32:52 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ntp-utils
|
2010-07-13 03:07:11 +00:00
|
|
|
$(call Package/ntpd/Default)
|
2008-04-22 23:32:52 +00:00
|
|
|
TITLE+= utilities
|
2010-03-01 19:31:27 +00:00
|
|
|
VARIANT:=nossl
|
2010-07-13 03:07:11 +00:00
|
|
|
DEPENDS:=+libncurses
|
2008-04-22 23:32:52 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ntp-utils/description
|
2010-07-13 03:07:11 +00:00
|
|
|
$(call Package/ntpd/Default/description)
|
|
|
|
.
|
|
|
|
This package contains ntpdc and ntpq.
|
2007-10-14 04:32:56 +00:00
|
|
|
endef
|
|
|
|
|
2006-12-27 19:21:05 +00:00
|
|
|
define Package/ntpd/conffiles
|
|
|
|
/etc/ntp.conf
|
|
|
|
endef
|
|
|
|
|
2008-04-22 23:33:04 +00:00
|
|
|
define Package/ntpd/Default/postinst
|
2007-04-08 20:35:36 +00:00
|
|
|
#!/bin/sh
|
2008-04-22 23:33:04 +00:00
|
|
|
grep -q '^ntp[[:space:]]*123/udp' $${IPKG_INSTROOT}/etc/services 2>/dev/null
|
|
|
|
[ $$? -ne 0 ] && echo "ntp 123/udp # Network Time Protocol" >>$${IPKG_INSTROOT}/etc/services || exit 0
|
|
|
|
grep -q '^ntp[[:space:]]*123/tcp' $${IPKG_INSTROOT}/etc/services 2>/dev/null
|
|
|
|
[ $$? -ne 0 ] && echo "ntp 123/tcp # Network Time Protocol" >>$${IPKG_INSTROOT}/etc/services || exit 0
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ntpdate/postinst
|
2010-07-13 03:07:11 +00:00
|
|
|
$(call Package/ntpd/Default/postinst)
|
2008-04-22 23:33:04 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ntpd/postinst
|
2010-07-13 03:07:11 +00:00
|
|
|
$(call Package/ntpd/Default/postinst)
|
2008-04-22 23:33:04 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ntp-utils/postinst
|
2010-07-13 03:07:11 +00:00
|
|
|
$(call Package/ntpd/Default/postinst)
|
2007-04-08 20:35:36 +00:00
|
|
|
endef
|
|
|
|
|
2010-03-01 19:31:27 +00:00
|
|
|
TARGET_CPPFLAGS += \
|
|
|
|
-I$(STAGING_DIR)/usr/include/libelf
|
2007-12-30 16:40:42 +00:00
|
|
|
|
2009-09-03 00:07:42 +00:00
|
|
|
CONFIGURE_VARS += \
|
2010-02-21 20:27:30 +00:00
|
|
|
ac_cv_header_md5_h=no \
|
|
|
|
ac_cv_lib_rt_sched_setscheduler=no \
|
2010-03-01 19:31:27 +00:00
|
|
|
ac_cv_header_dns_sd_h=no
|
|
|
|
|
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--disable-all-clocks \
|
|
|
|
--disable-parse-clocks \
|
|
|
|
--enable-NMEA \
|
|
|
|
--enable-LOCAL-CLOCK \
|
|
|
|
--enable-SHM \
|
2010-03-09 18:46:15 +00:00
|
|
|
--disable-linuxcaps \
|
|
|
|
--without-ntpsnmpd \
|
2010-03-01 19:31:27 +00:00
|
|
|
|
|
|
|
ifeq ($(BUILD_VARIANT),ssl)
|
2010-07-13 03:07:11 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--with-crypto \
|
|
|
|
--with-openssl-incdir="$(STAGING_DIR)/usr/include" \
|
|
|
|
--with-openssl-libdir="$(STAGING_DIR)/usr/lib"
|
2010-02-21 20:27:30 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
define Package/ntpd/install
|
2010-07-13 03:07:11 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd/ntpd $(1)/usr/sbin/
|
2010-02-21 20:27:30 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc
|
|
|
|
$(INSTALL_CONF) ./files/ntp.conf $(1)/etc/
|
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
|
|
$(INSTALL_BIN) ./files/ntpd.init $(1)/etc/init.d/ntpd
|
|
|
|
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
|
|
|
|
$(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd
|
2006-12-27 19:21:05 +00:00
|
|
|
endef
|
|
|
|
|
2010-07-13 03:07:11 +00:00
|
|
|
Package/ntpd-ssl/conffiles = $(Package/ntpd/conffiles)
|
2010-03-01 19:31:27 +00:00
|
|
|
Package/ntpd-ssl/install = $(Package/ntpd/install)
|
2010-07-13 03:07:11 +00:00
|
|
|
Package/ntpd-ssl/postinst = $(Package/ntpd/postinst)
|
2006-12-27 19:21:05 +00:00
|
|
|
|
2008-04-22 23:32:52 +00:00
|
|
|
define Package/ntpdate/install
|
2010-07-13 03:07:11 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2008-04-22 23:32:52 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdate/ntpdate $(1)/usr/sbin/
|
2008-04-22 23:36:24 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
|
|
$(INSTALL_BIN) ./files/ntpdate.init $(1)/etc/init.d/ntpdate
|
2008-04-22 23:32:52 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ntp-utils/install
|
2010-07-13 03:07:11 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2008-04-22 23:32:52 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdc/ntpdc $(1)/usr/sbin/
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpq/ntpq $(1)/usr/sbin/
|
|
|
|
endef
|
|
|
|
|
2006-12-27 19:21:05 +00:00
|
|
|
$(eval $(call BuildPackage,ntpd))
|
2010-03-01 19:31:27 +00:00
|
|
|
$(eval $(call BuildPackage,ntpd-ssl))
|
2008-04-22 23:32:52 +00:00
|
|
|
$(eval $(call BuildPackage,ntpdate))
|
|
|
|
$(eval $(call BuildPackage,ntp-utils))
|