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