|
@@ -0,0 +1,131 @@
|
|
1
|
+#
|
|
2
|
+# Copyright (C) 2007-2011 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.15
|
|
12
|
+PKG_RELEASE:=1
|
|
13
|
+
|
|
14
|
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
|
15
|
+PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
|
|
16
|
+PKG_MD5SUM:=7a279d5ac5594919124d5526e7143e28
|
|
17
|
+PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
|
|
18
|
+
|
|
19
|
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
|
20
|
+
|
|
21
|
+include $(INCLUDE_DIR)/package.mk
|
|
22
|
+
|
|
23
|
+define Package/wget/Default
|
|
24
|
+ SECTION:=net
|
|
25
|
+ CATEGORY:=Network
|
|
26
|
+ DEPENDS:=+libpcre
|
|
27
|
+ SUBMENU:=File Transfer
|
|
28
|
+ TITLE:=Non-interactive network downloader
|
|
29
|
+ URL:=http://www.gnu.org/software/wget/index.html
|
|
30
|
+endef
|
|
31
|
+
|
|
32
|
+define Package/wget/Default/description
|
|
33
|
+ Wget is a network utility to retrieve files from the Web using http
|
|
34
|
+ and ftp, the two most widely used Internet protocols. It works
|
|
35
|
+ non-interactively, so it will work in the background, after having
|
|
36
|
+ logged off. The program supports recursive retrieval of web-authoring
|
|
37
|
+ pages as well as ftp sites -- you can use wget to make mirrors of
|
|
38
|
+ archives and home pages or to travel the Web like a WWW robot.
|
|
39
|
+endef
|
|
40
|
+
|
|
41
|
+define Package/wget
|
|
42
|
+$(call Package/wget/Default)
|
|
43
|
+ DEPENDS+= +libopenssl +librt
|
|
44
|
+ TITLE+= (with SSL support)
|
|
45
|
+ VARIANT:=ssl
|
|
46
|
+endef
|
|
47
|
+
|
|
48
|
+define Package/wget/description
|
|
49
|
+$(call Package/wget/Default/description)
|
|
50
|
+ This package is built with SSL support.
|
|
51
|
+endef
|
|
52
|
+
|
|
53
|
+define Package/wget-nossl
|
|
54
|
+$(call Package/wget/Default)
|
|
55
|
+ TITLE+= (without SSL support)
|
|
56
|
+ DEPENDS+= +zlib
|
|
57
|
+ VARIANT:=nossl
|
|
58
|
+endef
|
|
59
|
+
|
|
60
|
+define Package/wget-nossl/description
|
|
61
|
+$(call Package/wget/Default/description)
|
|
62
|
+ This package is built without SSL support.
|
|
63
|
+endef
|
|
64
|
+
|
|
65
|
+CONFIGURE_ARGS+= \
|
|
66
|
+ --disable-rpath \
|
|
67
|
+ --disable-iri
|
|
68
|
+
|
|
69
|
+CONFIGURE_VARS += \
|
|
70
|
+ ac_cv_header_uuid_uuid_h=no
|
|
71
|
+
|
|
72
|
+ifeq ($(BUILD_VARIANT),ssl)
|
|
73
|
+ CONFIGURE_ARGS+= \
|
|
74
|
+ --with-ssl=openssl \
|
|
75
|
+ --with-libssl-prefix="$(STAGING_DIR)/usr"
|
|
76
|
+endif
|
|
77
|
+
|
|
78
|
+ifeq ($(BUILD_VARIANT),nossl)
|
|
79
|
+ CONFIGURE_ARGS+= \
|
|
80
|
+ --disable-ntlm \
|
|
81
|
+ --without-ssl
|
|
82
|
+endif
|
|
83
|
+
|
|
84
|
+define Package/wget/install
|
|
85
|
+ $(INSTALL_DIR) $(1)/usr/bin
|
|
86
|
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wget $(1)/usr/bin/wget-ssl
|
|
87
|
+endef
|
|
88
|
+
|
|
89
|
+define Package/wget-nossl/install
|
|
90
|
+ $(INSTALL_DIR) $(1)/usr/bin
|
|
91
|
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wget $(1)/usr/bin/wget-nossl
|
|
92
|
+endef
|
|
93
|
+
|
|
94
|
+define Package/wget/postinst
|
|
95
|
+#!/bin/sh
|
|
96
|
+if [ -e $${IPKG_INSTROOT}/usr/bin/wget ]; then
|
|
97
|
+ rm -rf $${IPKG_INSTROOT}/usr/bin/wget;
|
|
98
|
+fi
|
|
99
|
+ln -sf ./wget-ssl $${IPKG_INSTROOT}/usr/bin/wget
|
|
100
|
+endef
|
|
101
|
+
|
|
102
|
+define Package/wget/postrm
|
|
103
|
+#!/bin/sh
|
|
104
|
+rm $${IPKG_INSTROOT}/usr/bin/wget
|
|
105
|
+[ -x $${IPKG_INSTROOT}/usr/bin/wget-nossl ] && ln -s ./wget-nossl $${IPKG_INSTROOT}/usr/bin/wget || {
|
|
106
|
+ ln -s ../../bin/busybox $${IPKG_INSTROOT}/usr/bin/wget
|
|
107
|
+ $${IPKG_INSTROOT}/usr/bin/wget 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/usr/bin/wget
|
|
108
|
+}
|
|
109
|
+exit 0
|
|
110
|
+endef
|
|
111
|
+
|
|
112
|
+define Package/wget-nossl/postinst
|
|
113
|
+#!/bin/sh
|
|
114
|
+if [ -e $${IPKG_INSTROOT}/usr/bin/wget ]; then
|
|
115
|
+ rm -rf $${IPKG_INSTROOT}/usr/bin/wget;
|
|
116
|
+fi
|
|
117
|
+ln -s ./wget-nossl $${IPKG_INSTROOT}/usr/bin/wget
|
|
118
|
+endef
|
|
119
|
+
|
|
120
|
+define Package/wget-nossl/postrm
|
|
121
|
+#!/bin/sh
|
|
122
|
+rm $${IPKG_INSTROOT}/usr/bin/wget
|
|
123
|
+[ -x $${IPKG_INSTROOT}/usr/bin/wget-ssl ] && ln -s ./wget-ssl $${IPKG_INSTROOT}/usr/bin/wget || {
|
|
124
|
+ ln -s ../../bin/busybox $${IPKG_INSTROOT}/usr/bin/wget
|
|
125
|
+ $${IPKG_INSTROOT}/usr/bin/wget 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/usr/bin/wget
|
|
126
|
+}
|
|
127
|
+exit 0
|
|
128
|
+endef
|
|
129
|
+
|
|
130
|
+$(eval $(call BuildPackage,wget))
|
|
131
|
+$(eval $(call BuildPackage,wget-nossl))
|