packages/net/wget/Makefile
hauke 078b31132a Fix wget-nossl variant by disabling ntlm support (bug 15718 and 15731)
Fix wget-nossl variant by disabling ntlm support in wget-nossl.

https://dev.openwrt.org/ticket/15718#comment:13
https://dev.openwrt.org/ticket/15731

In wget 1.15 the ntlm support requires either ssl or libnettle library.
Check-in behind the change:
http://git.savannah.gnu.org/cgit/wget.git/commit/?id=c19d76c02483f070beb688d6fe6f5fafb5674a08

ssl is not present in the nossl variant and developers prefer to keep the
nossl variant small, so the natural alternative is to disable ntlm support in
the nossl variant, as a configure option for that purpose exists and a simple
change in Openwrt Makefile is enough.

Tested with ar71xx/wndr3700.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>


git-svn-id: svn://svn.openwrt.org/openwrt/packages@40595 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-04-29 19:38:23 +00:00

131 lines
3.3 KiB
Makefile

#
# Copyright (C) 2007-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=wget
PKG_VERSION:=1.15
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
PKG_MD5SUM:=7a279d5ac5594919124d5526e7143e28
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/wget/Default
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libpcre
SUBMENU:=File Transfer
TITLE:=Non-interactive network downloader
URL:=http://www.gnu.org/software/wget/index.html
endef
define Package/wget/Default/description
Wget is a network utility to retrieve files from the Web using http
and ftp, the two most widely used Internet protocols. It works
non-interactively, so it will work in the background, after having
logged off. The program supports recursive retrieval of web-authoring
pages as well as ftp sites -- you can use wget to make mirrors of
archives and home pages or to travel the Web like a WWW robot.
endef
define Package/wget
$(call Package/wget/Default)
DEPENDS+= +libopenssl +librt
TITLE+= (with SSL support)
VARIANT:=ssl
endef
define Package/wget/description
$(call Package/wget/Default/description)
This package is built with SSL support.
endef
define Package/wget-nossl
$(call Package/wget/Default)
TITLE+= (without SSL support)
DEPENDS+= +zlib
VARIANT:=nossl
endef
define Package/wget-nossl/description
$(call Package/wget/Default/description)
This package is built without SSL support.
endef
CONFIGURE_ARGS+= \
--disable-rpath \
--disable-iri
CONFIGURE_VARS += \
ac_cv_header_uuid_uuid_h=no
ifeq ($(BUILD_VARIANT),ssl)
CONFIGURE_ARGS+= \
--with-ssl=openssl \
--with-libssl-prefix="$(STAGING_DIR)/usr"
endif
ifeq ($(BUILD_VARIANT),nossl)
CONFIGURE_ARGS+= \
--disable-ntlm \
--without-ssl
endif
define Package/wget/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wget $(1)/usr/bin/wget-ssl
endef
define Package/wget-nossl/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wget $(1)/usr/bin/wget-nossl
endef
define Package/wget/postinst
#!/bin/sh
if [ -e $${IPKG_INSTROOT}/usr/bin/wget ]; then
rm -rf $${IPKG_INSTROOT}/usr/bin/wget;
fi
ln -sf ./wget-ssl $${IPKG_INSTROOT}/usr/bin/wget
endef
define Package/wget/postrm
#!/bin/sh
rm $${IPKG_INSTROOT}/usr/bin/wget
[ -x $${IPKG_INSTROOT}/usr/bin/wget-nossl ] && ln -s ./wget-nossl $${IPKG_INSTROOT}/usr/bin/wget || {
ln -s ../../bin/busybox $${IPKG_INSTROOT}/usr/bin/wget
$${IPKG_INSTROOT}/usr/bin/wget 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/usr/bin/wget
}
exit 0
endef
define Package/wget-nossl/postinst
#!/bin/sh
if [ -e $${IPKG_INSTROOT}/usr/bin/wget ]; then
rm -rf $${IPKG_INSTROOT}/usr/bin/wget;
fi
ln -s ./wget-nossl $${IPKG_INSTROOT}/usr/bin/wget
endef
define Package/wget-nossl/postrm
#!/bin/sh
rm $${IPKG_INSTROOT}/usr/bin/wget
[ -x $${IPKG_INSTROOT}/usr/bin/wget-ssl ] && ln -s ./wget-ssl $${IPKG_INSTROOT}/usr/bin/wget || {
ln -s ../../bin/busybox $${IPKG_INSTROOT}/usr/bin/wget
$${IPKG_INSTROOT}/usr/bin/wget 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/usr/bin/wget
}
exit 0
endef
$(eval $(call BuildPackage,wget))
$(eval $(call BuildPackage,wget-nossl))