2 # Copyright (C) 2007-2010 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.bz2
15 PKG_SOURCE_URL
:=@GNU
/$(PKG_NAME
)
16 PKG_MD5SUM
:=308a5476fc096a8a525d07279a6f6aa3
18 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
20 include $(INCLUDE_DIR
)/package.mk
22 define Package
/wget
/Default
25 TITLE
:=Non-interactive network downloader
26 URL
:=http
://www.gnu.org
/software
/wget
/index.html
29 define Package
/wget
/Default
/description
30 Wget is a network utility to retrieve files from the Web using http
31 and ftp
, the two most widely used Internet protocols. It works
32 non-interactively
, so it will work in the background
, after having
33 logged off. The program supports recursive retrieval of web-authoring
34 pages
as well
as ftp sites
-- you can use wget to make mirrors of
35 archives and home pages or to travel the Web like a WWW robot.
39 $(call Package
/wget
/Default
)
41 TITLE
+= (with SSL support
)
45 define Package
/wget
/description
46 $(call Package
/wget
/Default
/description
)
47 This package is built with SSL support.
50 define Package
/wget-nossl
51 $(call Package
/wget
/Default
)
52 TITLE
+= (without SSL support
)
56 define Package
/wget-nossl
/description
57 $(call Package
/wget
/Default
/description
)
58 This package is built without SSL support.
64 ifeq ($(BUILD_VARIANT
),ssl
)
67 --with-libssl-prefix
="$(STAGING_DIR)/usr"
70 ifeq ($(BUILD_VARIANT
),nossl
)
75 define Package
/wget
/install
76 $(INSTALL_DIR
) $(1)/usr
/bin
77 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/wget
$(1)/usr
/bin
/wget-ssl
80 define Package
/wget-nossl
/install
81 $(INSTALL_DIR
) $(1)/usr
/bin
82 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/src
/wget
$(1)/usr
/bin
/wget-nossl
85 define Package
/wget
/postinst
87 if
[ -e
$${IPKG_INSTROOT}/usr
/bin
/wget
]; then
88 rm -rf
$${IPKG_INSTROOT}/usr
/bin
/wget
;
90 ln
-sf .
/wget-ssl
$${IPKG_INSTROOT}/usr
/bin
/wget
93 define Package
/wget
/postrm
95 rm $${IPKG_INSTROOT}/usr
/bin
/wget
96 [ -x
$${IPKG_INSTROOT}/usr
/bin
/wget-nossl
] && ln
-s .
/wget-nossl
$${IPKG_INSTROOT}/usr
/bin
/wget ||
{
97 ln
-s ..
/..
/bin
/busybox
$${IPKG_INSTROOT}/usr
/bin
/wget
98 $${IPKG_INSTROOT}/usr
/bin
/wget
2>&1 | grep
'applet not found' > /dev
/null
2>&1 && rm $${IPKG_INSTROOT}/usr
/bin
/wget
103 define Package
/wget-nossl
/postinst
105 if
[ -e
$${IPKG_INSTROOT}/usr
/bin
/wget
]; then
106 rm -rf
$${IPKG_INSTROOT}/usr
/bin
/wget
;
108 ln
-s .
/wget-nossl
$${IPKG_INSTROOT}/usr
/bin
/wget
111 define Package
/wget-nossl
/postrm
113 rm $${IPKG_INSTROOT}/usr
/bin
/wget
114 [ -x
$${IPKG_INSTROOT}/usr
/bin
/wget-ssl
] && ln
-s .
/wget-ssl
$${IPKG_INSTROOT}/usr
/bin
/wget ||
{
115 ln
-s ..
/..
/bin
/busybox
$${IPKG_INSTROOT}/usr
/bin
/wget
116 $${IPKG_INSTROOT}/usr
/bin
/wget
2>&1 | grep
'applet not found' > /dev
/null
2>&1 && rm $${IPKG_INSTROOT}/usr
/bin
/wget
121 $(eval
$(call BuildPackage
,wget
))
122 $(eval
$(call BuildPackage
,wget-nossl
))