2 # Copyright (C) 2007-2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
15 PKG_SOURCE_URL
:=@GNU
/$(PKG_NAME
)
16 PKG_MD5SUM
:=fe102975ab3a6c049777883f1bb9ad07
17 PKG_MAINTAINER
:=Maxim Storchak
<m.storchak@gmail.com
>
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/wget
/Default
28 SUBMENU
:=File Transfer
29 TITLE
:=Non-interactive network downloader
30 URL
:=http
://www.gnu.org
/software
/wget
/index.html
33 define Package
/wget
/Default
/description
34 Wget is a network utility to retrieve files from the Web using http
35 and ftp
, the two most widely used Internet protocols. It works
36 non-interactively
, so it will work in the background
, after having
37 logged off. The program supports recursive retrieval of web-authoring
38 pages
as well
as ftp sites
-- you can use wget to make mirrors of
39 archives and home pages or to travel the Web like a WWW robot.
43 $(call Package
/wget
/Default
)
44 DEPENDS
+= +libopenssl
+librt
45 TITLE
+= (with SSL support
)
49 define Package
/wget
/description
50 $(call Package
/wget
/Default
/description
)
51 This package is built with SSL support.
54 define Package
/wget-nossl
55 $(call Package
/wget
/Default
)
56 TITLE
+= (without SSL support
)
61 define Package
/wget-nossl
/description
62 $(call Package
/wget
/Default
/description
)
63 This package is built without SSL support.
71 ac_cv_header_uuid_uuid_h
=no
73 ifeq ($(BUILD_VARIANT
),ssl
)
76 --with-libssl-prefix
="$(STAGING_DIR)/usr"
79 ifeq ($(BUILD_VARIANT
),nossl
)
85 define Package
/wget
/install
86 $(INSTALL_DIR
) $(1)/usr
/bin
87 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/wget
$(1)/usr
/bin
/wget-ssl
90 define Package
/wget-nossl
/install
91 $(INSTALL_DIR
) $(1)/usr
/bin
92 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/wget
$(1)/usr
/bin
/wget-nossl
95 define Package
/wget
/postinst
97 if
[ -e
$${IPKG_INSTROOT}/usr
/bin
/wget
]; then
98 rm -rf
$${IPKG_INSTROOT}/usr
/bin
/wget
;
100 ln
-sf .
/wget-ssl
$${IPKG_INSTROOT}/usr
/bin
/wget
103 define Package
/wget
/postrm
105 rm $${IPKG_INSTROOT}/usr
/bin
/wget
106 [ -x
$${IPKG_INSTROOT}/usr
/bin
/wget-nossl
] && ln
-s .
/wget-nossl
$${IPKG_INSTROOT}/usr
/bin
/wget ||
{
107 ln
-s ..
/..
/bin
/busybox
$${IPKG_INSTROOT}/usr
/bin
/wget
108 $${IPKG_INSTROOT}/usr
/bin
/wget
2>&1 | grep
'applet not found' > /dev
/null
2>&1 && rm $${IPKG_INSTROOT}/usr
/bin
/wget
113 define Package
/wget-nossl
/postinst
115 if
[ -e
$${IPKG_INSTROOT}/usr
/bin
/wget
]; then
116 rm -rf
$${IPKG_INSTROOT}/usr
/bin
/wget
;
118 ln
-s .
/wget-nossl
$${IPKG_INSTROOT}/usr
/bin
/wget
121 define Package
/wget-nossl
/postrm
123 rm $${IPKG_INSTROOT}/usr
/bin
/wget
124 [ -x
$${IPKG_INSTROOT}/usr
/bin
/wget-ssl
] && ln
-s .
/wget-ssl
$${IPKG_INSTROOT}/usr
/bin
/wget ||
{
125 ln
-s ..
/..
/bin
/busybox
$${IPKG_INSTROOT}/usr
/bin
/wget
126 $${IPKG_INSTROOT}/usr
/bin
/wget
2>&1 | grep
'applet not found' > /dev
/null
2>&1 && rm $${IPKG_INSTROOT}/usr
/bin
/wget
131 $(eval
$(call BuildPackage
,wget
))
132 $(eval
$(call BuildPackage
,wget-nossl
))