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