[Packages] net/rsync: Fix compilation
[openwrt/svn-archive/archive.git] / net / wget / Makefile
1 #
2 # Copyright (C) 2007 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.10.2
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
17 PKG_MD5SUM:=795fefbb7099f93e2d346b026785c4b8
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
30 using http and ftp, the two most widely used Internet
31 protocols. It works non-interactively, so it will work in
32 the background, after having logged off. The program supports
33 recursive retrieval of web-authoring pages as well as ftp
34 sites -- you can use wget to make mirrors of archives and
35 home pages or to travel the Web like a WWW robot.
36 endef
37
38 define Package/wget
39 $(call Package/wget/Default)
40 DEPENDS+= +libopenssl
41 TITLE+= (with SSL support)
42 endef
43
44 define Package/wget/description
45 $(call Package/wget/Default/description)
46 This package is built with SSL support.
47 endef
48
49 define Package/wget-nossl
50 $(call Package/wget/Default)
51 TITLE+= (without SSL support)
52 endef
53
54 define Package/wget-nossl/description
55 $(call Package/wget/Default/description)
56 This package is built without SSL support.
57 endef
58
59
60 define Build/Template
61
62 $(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
63 -$(MAKE) -C $(PKG_BUILD_DIR) clean
64 $(call Build/Configure/Default,$(3))
65 $(MAKE) -C $(PKG_BUILD_DIR)
66 ( cd $(PKG_BUILD_DIR)/src; mv -f wget wget-$(2) )
67 touch $$@
68
69 $(STAMP_BUILT): $(STAMP_BUILT)-$(2)
70
71 define Package/$(1)/install
72 $(INSTALL_DIR) $$(1)/usr/bin
73 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wget-$(2) $$(1)/usr/bin/wget
74 endef
75
76 # FIXME: check if busybox really provides a wget applet
77 define Package/wget/postrm
78 !/bin/sh
79 ln -sf ../../bin/busybox $${IPKG_INSTROOT}/usr/bin/wget
80 endef
81
82 endef
83
84 CONFIGURE_ARGS += \
85 --disable-rpath
86
87 ifneq ($(SDK)$(CONFIG_PACKAGE_wget),)
88 define Build/with-ssl
89 $(call Build/Template,wget,with-ssl, \
90 --with-ssl \
91 --with-libssl-prefix="$(STAGING_DIR)/usr" \
92 )
93 endef
94 endif
95 $(eval $(Build/with-ssl))
96
97 ifneq ($(SDK)$(CONFIG_PACKAGE_wget-nossl),)
98 define Build/without-ssl
99 $(call Build/Template,wget-nossl,without-ssl, \
100 --without-ssl \
101 )
102 endef
103 endif
104 $(eval $(Build/without-ssl))
105
106 $(eval $(call BuildPackage,wget))
107 $(eval $(call BuildPackage,wget-nossl))