update wget to 1.11.4 (closes: #3666), fix formatting
[openwrt/svn-archive/archive.git] / net / wget / Makefile
1 #
2 # Copyright (C) 2007-2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=wget
12 PKG_VERSION:=1.11.4
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
17 PKG_MD5SUM:=f5076a8c2ec2b7f334cb6e3059820f9c
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/wget/Default
22 SECTION:=net
23 CATEGORY:=Network
24 TITLE:=Non-interactive network downloader
25 URL:=http://www.gnu.org/software/wget/index.html
26 endef
27
28 define Package/wget/Default/description
29 Wget is a network utility to retrieve files from the Web using http
30 and ftp, the two most widely used Internet protocols. It works
31 non-interactively, so it will work in the background, after having
32 logged off. The program supports recursive retrieval of web-authoring
33 pages as well as ftp sites -- you can use wget to make mirrors of
34 archives and home pages or to travel the Web like a WWW robot.
35 endef
36
37 define Package/wget
38 $(call Package/wget/Default)
39 DEPENDS+= +libopenssl
40 TITLE+= (with SSL support)
41 endef
42
43 define Package/wget/description
44 $(call Package/wget/Default/description)
45 This package is built with SSL support.
46 endef
47
48 define Package/wget-nossl
49 $(call Package/wget/Default)
50 TITLE+= (without SSL support)
51 endef
52
53 define Package/wget-nossl/description
54 $(call Package/wget/Default/description)
55 This package is built without SSL support.
56 endef
57
58
59 define Build/Template
60
61 $(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
62 -$(MAKE) -C $(PKG_BUILD_DIR) clean
63 $(call Build/Configure/Default,$(3))
64 $(MAKE) -C $(PKG_BUILD_DIR)
65 ( cd $(PKG_BUILD_DIR)/src; mv -f wget wget-$(2) )
66 touch $$@
67
68 $(STAMP_BUILT): $(STAMP_BUILT)-$(2)
69
70 define Package/$(1)/install
71 $(INSTALL_DIR) $$(1)/usr/bin
72 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wget-$(2) $$(1)/usr/bin/wget
73 endef
74
75 # FIXME: check if busybox really provides a wget applet
76 define Package/wget/postrm
77 #!/bin/sh
78 ln -sf ../../bin/busybox $${IPKG_INSTROOT}/usr/bin/wget
79 endef
80
81 endef
82
83 CONFIGURE_ARGS += \
84 --disable-rpath
85
86 ifneq ($(SDK)$(CONFIG_PACKAGE_wget),)
87 define Build/with-ssl
88 $(call Build/Template,wget,with-ssl, \
89 --with-ssl \
90 --with-libssl-prefix="$(STAGING_DIR)/usr" \
91 )
92 endef
93 endif
94 $(eval $(Build/with-ssl))
95
96 ifneq ($(SDK)$(CONFIG_PACKAGE_wget-nossl),)
97 define Build/without-ssl
98 $(call Build/Template,wget-nossl,without-ssl, \
99 --without-ssl \
100 )
101 endef
102 endif
103 $(eval $(Build/without-ssl))
104
105 $(eval $(call BuildPackage,wget))
106 $(eval $(call BuildPackage,wget-nossl))