2006-12-27 19:21:05 +00:00
|
|
|
#
|
2008-04-22 23:32:52 +00:00
|
|
|
# Copyright (C) 2006-2008 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.
|
|
|
|
#
|
2007-03-04 04:19:46 +00:00
|
|
|
# $Id$
|
2006-12-27 19:21:05 +00:00
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=ntp
|
2007-12-17 08:03:24 +00:00
|
|
|
PKG_VERSION:=4.2.4p4
|
2008-04-22 23:33:19 +00:00
|
|
|
PKG_RELEASE:=4
|
2006-12-27 19:21:05 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
|
|
PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/
|
2007-12-17 08:03:24 +00:00
|
|
|
PKG_MD5SUM:=fcb32a01e1ae3f9ed5bac86b12c7a1cc
|
2006-12-27 19:21:05 +00:00
|
|
|
|
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
2007-12-30 16:40:42 +00:00
|
|
|
PKG_BUILD_DEPENDS:=libelf
|
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
|
|
|
|
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.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ntpd
|
|
|
|
$(call Package/ntpd/Default)
|
|
|
|
TITLE+= server
|
|
|
|
endef
|
|
|
|
|
2007-10-14 04:32:56 +00:00
|
|
|
define Package/ntpd/description
|
2008-04-22 23:32:52 +00:00
|
|
|
$(call Package/ntpd/Default/description)
|
|
|
|
This package contains the ntpd server.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ntpdate
|
|
|
|
$(call Package/ntpd/Default)
|
|
|
|
TITLE+=date
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ntpdate/description
|
|
|
|
$(call Package/ntpd/Default/description)
|
|
|
|
This package contains ntpdate.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ntp-utils
|
|
|
|
$(call Package/ntpd/Default)
|
|
|
|
DEPENDS:=+libreadline +libncurses
|
|
|
|
TITLE+= utilities
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ntp-utils/description
|
|
|
|
$(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
|
|
|
|
$(call Package/ntpd/Default/postinst)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ntpd/postinst
|
|
|
|
$(call Package/ntpd/Default/postinst)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ntp-utils/postinst
|
|
|
|
$(call Package/ntpd/Default/postinst)
|
2007-04-08 20:35:36 +00:00
|
|
|
endef
|
|
|
|
|
2007-12-30 16:40:42 +00:00
|
|
|
TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/libelf
|
|
|
|
|
2006-12-27 19:21:05 +00:00
|
|
|
define Build/Configure
|
|
|
|
$(call Build/Configure/Default, \
|
2008-01-08 23:18:21 +00:00
|
|
|
--disable-all-clocks \
|
2006-12-27 19:21:05 +00:00
|
|
|
--disable-parse-clocks \
|
2008-01-08 23:18:21 +00:00
|
|
|
--enable-NMEA \
|
2006-12-27 19:21:05 +00:00
|
|
|
--enable-LOCAL-CLOCK \
|
2008-01-08 23:18:21 +00:00
|
|
|
--enable-SHM \
|
2006-12-27 19:21:05 +00:00
|
|
|
--enable-linuxcaps \
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS)"
|
|
|
|
endef
|
|
|
|
|
2008-04-22 23:32:52 +00:00
|
|
|
define Package/ntpd/install
|
2006-12-27 19:21:05 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin/
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd/ntpd $(1)/usr/sbin/
|
|
|
|
$(INSTALL_DIR) $(1)/etc
|
|
|
|
$(INSTALL_DATA) ./files/ntp.conf $(1)/etc/
|
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
2007-03-11 11:04:57 +00:00
|
|
|
$(INSTALL_BIN) ./files/ntpd.init $(1)/etc/init.d/ntpd
|
2006-12-27 19:21:05 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
|
2007-03-11 11:04:57 +00:00
|
|
|
$(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd
|
2006-12-27 19:21:05 +00:00
|
|
|
endef
|
|
|
|
|
2008-04-22 23:32:52 +00:00
|
|
|
define Package/ntpdate/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin/
|
|
|
|
$(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
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin/
|
|
|
|
$(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))
|
2008-04-22 23:32:52 +00:00
|
|
|
$(eval $(call BuildPackage,ntpdate))
|
|
|
|
$(eval $(call BuildPackage,ntp-utils))
|