switch ntpd to the build variants infrastructure

-- d die folgenden Zeilen werden ignoriert --

M    net/ntpd/Makefile


git-svn-id: svn://svn.openwrt.org/openwrt/packages@19941 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
tripolar 2010-03-01 19:31:27 +00:00
parent d219cbd816
commit 7bae3b69c7

View File

@ -9,12 +9,14 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ntp
PKG_VERSION:=4.2.6
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
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)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=libelf
PKG_FIXUP:=libtool
PKG_LIBTOOL_PATHS:=. sntp
@ -38,6 +40,7 @@ endef
define Package/ntpd
$(call Package/ntpd/Default)
TITLE+= server
VARIANT:=nossl
endef
define Package/ntpd/description
@ -45,13 +48,14 @@ define Package/ntpd/description
This package contains the ntpd server.
endef
define Package/ntpd-openssl
define Package/ntpd-ssl
$(call Package/ntpd/Default)
TITLE+= server (with OpenSSL support)
DEPENDS:=+libopenssl
VARIANT:=ssl
endef
define Package/ntpd-openssl/description
define Package/ntpd-ssl/description
$(call Package/ntpd/Default/description)
This package contains the ntpd server with OpenSSL support.
endef
@ -59,6 +63,7 @@ endef
define Package/ntpdate
$(call Package/ntpd/Default)
TITLE+=date
VARIANT:=nossl
endef
define Package/ntpdate/description
@ -70,6 +75,7 @@ define Package/ntp-utils
$(call Package/ntpd/Default)
DEPENDS:=+libncurses
TITLE+= utilities
VARIANT:=nossl
endef
define Package/ntp-utils/description
@ -101,66 +107,32 @@ define Package/ntp-utils/postinst
$(call Package/ntpd/Default/postinst)
endef
TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include/libelf
TARGET_CPPFLAGS += \
-I$(STAGING_DIR)/usr/include/libelf
CONFIGURE_VARS += \
ac_cv_header_md5_h=no \
ac_cv_lib_rt_sched_setscheduler=no \
ac_cv_header_dns_sd_h=no
ac_cv_header_dns_sd_h=no
define Build/Template
CONFIGURE_ARGS += \
--disable-all-clocks \
--disable-parse-clocks \
--enable-NMEA \
--enable-LOCAL-CLOCK \
--enable-SHM \
--disable-linuxcaps
$(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 \
--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, \
ifeq ($(BUILD_VARIANT),ssl)
CONFIGURE_ARGS += \
--with-crypto \
--with-openssl-incdir="$(STAGING_DIR)/usr/include" \
--with-openssl-libdir="$(STAGING_DIR)/usr/lib" \
)
endef
--with-openssl-libdir="$(STAGING_DIR)/usr/lib"
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 Package/ntpd/install
$(INSTALL_DIR) $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME)-without-ssl $(1)/usr/sbin/ntpd
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ntpd/ntpd $(1)/usr/sbin/ntpd
$(INSTALL_DIR) $(1)/etc
$(INSTALL_CONF) ./files/ntp.conf $(1)/etc/
$(INSTALL_DIR) $(1)/etc/init.d
@ -169,16 +141,7 @@ define Package/ntpd/install
$(INSTALL_BIN) ./files/ntpd.hotplug $(1)/etc/hotplug.d/iface/20-ntpd
endef
define Package/ntpd-openssl/install
$(INSTALL_DIR) $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME)-with-openssl $(1)/usr/sbin/ntpd
$(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
Package/ntpd-ssl/install = $(Package/ntpd/install)
define Package/ntpdate/install
$(INSTALL_DIR) $(1)/usr/sbin/
@ -193,7 +156,7 @@ 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,ntpd-ssl))
$(eval $(call BuildPackage,ntpdate))
$(eval $(call BuildPackage,ntp-utils))