wget: apply upstream fix to avoid nettle linking in nossl
[feed/packages.git] / net / wget / Makefile
1 #
2 # Copyright (C) 2007-2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=wget
11 PKG_VERSION:=1.21.3
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
16 PKG_HASH:=5726bb8bc5ca0f6dc7110f6416e4bb7019e2d2ff5bf93d1ca2ffcc6656f220e5
17
18 PKG_MAINTAINER:=
19 PKG_LICENSE:=GPL-3.0-or-later
20 PKG_LICENSE_FILES:=COPYING
21 PKG_CPE_ID:=cpe:/a:gnu:wget
22
23 PKG_FIXUP:=autoreconf
24 PKG_INSTALL:=1
25 PKG_BUILD_PARALLEL:=1
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/wget/Default
30 SECTION:=net
31 CATEGORY:=Network
32 DEPENDS:=+libpcre +zlib
33 SUBMENU:=File Transfer
34 TITLE:=Non-interactive network downloader
35 URL:=https://www.gnu.org/software/wget/index.html
36 PROVIDES:=gnu-wget wget
37 endef
38
39 define Package/wget/Default/description
40 Wget is a network utility to retrieve files from the Web using http
41 and ftp, the two most widely used Internet protocols. It works
42 non-interactively, so it will work in the background, after having
43 logged off. The program supports recursive retrieval of web-authoring
44 pages as well as ftp sites -- you can use wget to make mirrors of
45 archives and home pages or to travel the Web like a WWW robot.
46 endef
47
48 define Package/wget-ssl
49 $(call Package/wget/Default)
50 DEPENDS+= +libopenssl +librt
51 TITLE+= (with SSL support)
52 VARIANT:=ssl
53 ALTERNATIVES:=300:/usr/bin/wget:/usr/libexec/wget-ssl
54 endef
55
56 define Package/wget-ssl/description
57 $(call Package/wget/Default/description)
58 This package is built with SSL support.
59 endef
60
61 define Package/wget-nossl
62 $(call Package/wget/Default)
63 TITLE+= (without SSL support)
64 VARIANT:=nossl
65 ALTERNATIVES:=300:/usr/bin/wget:/usr/libexec/wget-nossl
66 endef
67
68 define Package/wget-nossl/description
69 $(call Package/wget/Default/description)
70 This package is built without SSL support.
71 endef
72
73 CONFIGURE_ARGS+= \
74 --disable-rpath \
75 --disable-iri \
76 --disable-pcre2 \
77 --with-included-libunistring \
78 --without-libuuid \
79 --without-libpsl
80
81 CONFIGURE_VARS += \
82 ac_cv_header_uuid_uuid_h=no
83
84 ifeq ($(BUILD_VARIANT),ssl)
85 CONFIGURE_ARGS+= \
86 --with-ssl=openssl \
87 --with-libssl-prefix="$(STAGING_DIR)/usr"
88
89 CONFIGURE_VARS += \
90 ac_cv_libssl=yes
91 endif
92
93 ifeq ($(BUILD_VARIANT),nossl)
94 CONFIGURE_ARGS+= \
95 --disable-ntlm \
96 --without-ssl
97 endif
98
99 define Package/wget-ssl/install
100 $(INSTALL_DIR) $(1)/usr/libexec
101 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wget $(1)/usr/libexec/wget-ssl
102 endef
103
104 define Package/wget-nossl/install
105 $(INSTALL_DIR) $(1)/usr/libexec
106 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wget $(1)/usr/libexec/wget-nossl
107 endef
108
109 $(eval $(call BuildPackage,wget-ssl))
110 $(eval $(call BuildPackage,wget-nossl))