#
-# Copyright (C) 2006-2008 OpenWrt.org
+# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
-# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=ntp
-PKG_VERSION:=4.2.4p4
+PKG_VERSION:=4.2.6
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/
-PKG_MD5SUM:=fcb32a01e1ae3f9ed5bac86b12c7a1cc
+PKG_SOURCE_URL:=http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/
+PKG_MD5SUM:=4d64a99592b818aa9419fc9dcb149746
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=libelf
+PKG_FIXUP:=libtool
+PKG_LIBTOOL_PATHS:=. sntp
include $(INCLUDE_DIR)/package.mk
This package contains the ntpd server.
endef
+define Package/ntpd-openssl
+ $(call Package/ntpd/Default)
+ TITLE+= server (with OpenSSL support)
+ DEPENDS:=+openssl
+endef
+
+define Package/ntpd-openssl/description
+ $(call Package/ntpd/Default/description)
+ This package contains the ntpd server with OpenSSL support.
+endef
+
define Package/ntpdate
$(call Package/ntpd/Default)
TITLE+=date
define Package/ntp-utils
$(call Package/ntpd/Default)
- DEPENDS:=+libreadline +libncurses
+ DEPENDS:=+libncurses
TITLE+= utilities
endef
TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/libelf
-define Build/Configure
+CONFIGURE_VARS += \
+ ac_cv_header_md5_h=no \
+ ac_cv_lib_rt_sched_setscheduler=no \
+ ac_cv_header_dns_sd_h=no
+
+define Build/Template
+
+$(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
+ -$(MAKE) -C $(PKG_BUILD_DIR) clean
$(call Build/Configure/Default, \
--disable-all-clocks \
--disable-parse-clocks \
--enable-NMEA \
--enable-LOCAL-CLOCK \
--enable-SHM \
- --enable-linuxcaps \
- )
-endef
+ --disable-linuxcaps \
+ $(3))
+ $(MAKE) -C $(PKG_BUILD_DIR) CFLAGS="$(TARGET_CFLAGS)"
+ ( cd $(PKG_BUILD_DIR); mv -f ntpd/ntpd $(PKG_NAME)-$(2) )
+ touch $$@
+
+$(STAMP_BUILT): $(STAMP_BUILT)-$(2)
+
+endef
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_ntpd-openssl),)
+ define Build/with-openssl
+ $(call Build/Template,ntpd-openssl,with-openssl, \
+ --with-crypto \
+ --with-openssl-incdir="$(STAGING_DIR)/usr/include" \
+ --with-openssl-libdir="$(STAGING_DIR)/usr/lib" \
+ )
+ endef
+endif
+$(eval $(Build/with-openssl))
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_ntpd),)
+ define Build/without-ssl
+ $(call Build/Template,ntpd,without-ssl)
+ endef
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_ntpdate),)
+ define Build/without-ssl
+ $(call Build/Template,ntpd,without-ssl)
+ endef
+endif
+
+ifneq ($(SDK)$(CONFIG_PACKAGE_ntp-utils),)
+ define Build/without-ssl
+ $(call Build/Template,ntpd,without-ssl)
+ endef
+endif
+$(eval $(Build/without-ssl))
-define Build/Compile
- $(MAKE) -C $(PKG_BUILD_DIR) \
- CFLAGS="$(TARGET_CFLAGS)"
+define Package/ntpd/install
+ $(INSTALL_DIR) $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME)-without-ssl $(1)/usr/sbin/$(PKG_NAME)
+ $(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
endef
-define Package/ntpd/install
+define Package/ntpd-openssl/install
$(INSTALL_DIR) $(1)/usr/sbin/
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd/ntpd $(1)/usr/sbin/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME)-with-openssl $(1)/usr/sbin/$(PKG_NAME)
$(INSTALL_DIR) $(1)/etc
- $(INSTALL_DATA) ./files/ntp.conf $(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
define Package/ntpdate/install
$(INSTALL_DIR) $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpdate/ntpdate $(1)/usr/sbin/
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/ntpdate.init $(1)/etc/init.d/ntpdate
endef
define Package/ntp-utils/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpq/ntpq $(1)/usr/sbin/
endef
+$(eval $(call BuildPackage,ntpd-openssl))
$(eval $(call BuildPackage,ntpd))
$(eval $(call BuildPackage,ntpdate))
$(eval $(call BuildPackage,ntp-utils))