source: branches/packages_10.03.1/net/wget/Makefile @ 28583

Last change on this file since 28583 was 28583, checked in by jow, 5 years ago

[backfire/packages] wget: merge r28519 (CVE-2010-2252)

  • Property copyright set to Copyright (C) 2007-2008 OpenWrt.org
  • Property licence set to GPLv2
  • Property svn:eol-style set to native
File size: 3.2 KB
Line 
1#
2# Copyright (C) 2007-2011 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=wget
11PKG_VERSION:=1.13.4
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
16PKG_MD5SUM:=12115c3750a4d92f9c6ac62bac372e85
17
18PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
19
20include $(INCLUDE_DIR)/package.mk
21
22define Package/wget/Default
23  SECTION:=net
24  CATEGORY:=Network
25  SUBMENU:=File Transfer
26  TITLE:=Non-interactive network downloader
27  URL:=http://www.gnu.org/software/wget/index.html
28endef
29
30define Package/wget/Default/description
31 Wget is a network utility to retrieve files from the Web using http
32 and ftp, the two most widely used Internet protocols. It works
33 non-interactively, so it will work in the background, after having
34 logged off. The program supports recursive retrieval of web-authoring
35 pages as well as ftp sites -- you can use wget to make mirrors of
36 archives and home pages or to travel the Web like a WWW robot.
37endef
38
39define Package/wget
40$(call Package/wget/Default)
41  DEPENDS+= +libopenssl
42  TITLE+= (with SSL support)
43  VARIANT:=ssl
44endef
45
46define Package/wget/description
47$(call Package/wget/Default/description)
48 This package is built with SSL support.
49endef
50
51define Package/wget-nossl
52$(call Package/wget/Default)
53  TITLE+= (without SSL support)
54  VARIANT:=nossl
55endef
56
57define Package/wget-nossl/description
58$(call Package/wget/Default/description)
59 This package is built without SSL support.
60endef
61
62CONFIGURE_ARGS+= \
63        --disable-rpath \
64        --disable-iri
65
66ifeq ($(BUILD_VARIANT),ssl)
67        CONFIGURE_ARGS+= \
68                --with-ssl=openssl \
69                --with-libssl-prefix="$(STAGING_DIR)/usr"
70endif
71
72ifeq ($(BUILD_VARIANT),nossl)
73        CONFIGURE_ARGS+= \
74                --without-ssl
75endif
76
77define Package/wget/install
78        $(INSTALL_DIR) $(1)/usr/bin
79        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wget $(1)/usr/bin/wget-ssl
80endef
81
82define Package/wget-nossl/install
83        $(INSTALL_DIR) $(1)/usr/bin
84        $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wget $(1)/usr/bin/wget-nossl
85endef
86
87define Package/wget/postinst
88#!/bin/sh
89if [ -e $${IPKG_INSTROOT}/usr/bin/wget ]; then
90  rm -rf $${IPKG_INSTROOT}/usr/bin/wget;
91fi
92ln -sf ./wget-ssl $${IPKG_INSTROOT}/usr/bin/wget
93endef
94
95define Package/wget/postrm
96#!/bin/sh
97rm $${IPKG_INSTROOT}/usr/bin/wget
98[ -x $${IPKG_INSTROOT}/usr/bin/wget-nossl ] && ln -s ./wget-nossl $${IPKG_INSTROOT}/usr/bin/wget || {
99  ln -s ../../bin/busybox $${IPKG_INSTROOT}/usr/bin/wget
100  $${IPKG_INSTROOT}/usr/bin/wget 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/usr/bin/wget
101}
102exit 0
103endef
104
105define Package/wget-nossl/postinst
106#!/bin/sh
107if [ -e $${IPKG_INSTROOT}/usr/bin/wget ]; then
108  rm -rf $${IPKG_INSTROOT}/usr/bin/wget;
109fi
110ln -s ./wget-nossl $${IPKG_INSTROOT}/usr/bin/wget
111endef
112
113define Package/wget-nossl/postrm
114#!/bin/sh
115rm $${IPKG_INSTROOT}/usr/bin/wget
116[ -x $${IPKG_INSTROOT}/usr/bin/wget-ssl ] && ln -s ./wget-ssl $${IPKG_INSTROOT}/usr/bin/wget || {
117  ln -s ../../bin/busybox $${IPKG_INSTROOT}/usr/bin/wget
118  $${IPKG_INSTROOT}/usr/bin/wget 2>&1 | grep 'applet not found' > /dev/null 2>&1 && rm $${IPKG_INSTROOT}/usr/bin/wget
119}
120exit 0
121endef
122
123$(eval $(call BuildPackage,wget))
124$(eval $(call BuildPackage,wget-nossl))
Note: See TracBrowser for help on using the repository browser.