2006-12-27 19:21:05 +00:00
|
|
|
#
|
2011-10-24 22:13:18 +00:00
|
|
|
# Copyright (C) 2006-2011 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
|
2011-10-11 01:22:23 +00:00
|
|
|
PKG_VERSION:=4.2.6p4
|
2011-11-14 18:30:05 +00:00
|
|
|
PKG_RELEASE:=3
|
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/
|
2011-10-11 01:22:23 +00:00
|
|
|
PKG_MD5SUM:=1447121a07b49361677ffda4f6e29527
|
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
|
2010-10-16 11:23:19 +00:00
|
|
|
MAINTAINER:=Peter Wagner <tripolar@gmx.at>
|
2006-12-27 19:21:05 +00:00
|
|
|
URL:=http://www.ntp.org/
|
2011-11-14 18:30:05 +00:00
|
|
|
DEPENDS:=+libcap
|
2006-12-27 19:21:05 +00:00
|
|
|
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
|
2011-11-14 18:30:05 +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
|
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)
|
|
|
|
.
|
2011-11-14 18:30:05 +00:00
|
|
|
This package contains ntpdc, ntpq and ntptime.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ntp-keygen
|
|
|
|
$(call Package/ntpd/Default)
|
|
|
|
TITLE+=keygen
|
|
|
|
VARIANT:=nossl
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ntp-keygen/description
|
|
|
|
$(call Package/ntpd/Default/description)
|
|
|
|
.
|
|
|
|
This package contains the ntp-keygen.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ntp-keygen-ssl
|
|
|
|
$(call Package/ntpd/Default)
|
|
|
|
TITLE+=keygen (with OpenSSL support)
|
|
|
|
VARIANT:=ssl
|
|
|
|
DEPENDS+= +libopenssl
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ntp-keygen-ssl/description
|
|
|
|
$(call Package/ntpd/Default/description)
|
|
|
|
.
|
|
|
|
This package contains the ntp-keygen with OpenSSL support.
|
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
|
|
|
|
|
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 \
|
2011-11-14 18:30:05 +00:00
|
|
|
--without-ntpsnmpd \
|
|
|
|
--without-lineeditlibs \
|
2010-03-01 19:31:27 +00:00
|
|
|
--enable-NMEA \
|
|
|
|
--enable-LOCAL-CLOCK \
|
|
|
|
--enable-SHM \
|
2011-11-14 18:30:05 +00:00
|
|
|
--enable-linuxcaps
|
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
|
2011-10-24 22:13:18 +00:00
|
|
|
$(INSTALL_DIR) $(1)/sbin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd/ntpd $(1)/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
|
|
|
|
|
2011-10-24 22:13:18 +00:00
|
|
|
define Package/ntpd/postinst
|
|
|
|
#!/bin/sh
|
|
|
|
[ -L "$${IPKG_INSTROOT}/usr/sbin/ntpd" ] && rm -f "$${IPKG_INSTROOT}/usr/sbin/ntpd"
|
|
|
|
exit 0
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/ntpd/postrm
|
|
|
|
#!/bin/sh
|
|
|
|
/bin/busybox ntpd -h 2>&1 | grep -q BusyBox && ln -sf ../../bin/busybox /usr/sbin/ntpd
|
|
|
|
exit 0
|
|
|
|
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)
|
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/
|
2011-11-14 18:30:05 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/util/ntptime $(1)/usr/sbin/
|
2008-04-22 23:32:52 +00:00
|
|
|
endef
|
|
|
|
|
2011-11-14 18:30:05 +00:00
|
|
|
define Package/ntp-keygen/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/util/ntp-keygen $(1)/usr/sbin/
|
|
|
|
endef
|
|
|
|
|
|
|
|
Package/ntp-keygen-ssl/install = $(Package/ntp-keygen/install)
|
|
|
|
|
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))
|
2011-11-14 18:30:05 +00:00
|
|
|
$(eval $(call BuildPackage,ntp-keygen))
|
|
|
|
$(eval $(call BuildPackage,ntp-keygen-ssl))
|