[packages_10.03.1] curl: update to v7.21.7 (CVE-2011-2192)
[openwrt/svn-archive/archive.git] / libs / curl / Makefile
1 #
2 # Copyright (C) 2007-2009 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:=curl
11 PKG_VERSION:=7.21.7
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://curl.haxx.se/download/ \
16 http://www.mirrorspace.org/curl/ \
17 http://curl.mirror.internet.tp/download/ \
18 ftp://ftp.sunet.se/pub/www/utilities/curl/ \
19 ftp://ftp.planetmirror.com/pub/curl/ \
20 http://www.mirrormonster.com/curl/download/ \
21 http://curl.mirrors.cyberservers.net/download/
22 PKG_MD5SUM:=5f6d50c4d4ee38c57fe37e3cff75adbd
23
24 PKG_FIXUP:=libtool
25 PKG_BUILD_PARALLEL:=1
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/curl/Default
30 SECTION:=net
31 CATEGORY:=Network
32 URL:=http://curl.haxx.se/
33 endef
34
35 define Package/curl
36 $(call Package/curl/Default)
37 SUBMENU:=File Transfer
38 DEPENDS:=+libcurl
39 TITLE:=A client-side URL transfer utility
40 endef
41
42 define Package/libcurl
43 $(call Package/curl/Default)
44 SECTION:=libs
45 CATEGORY:=Libraries
46 DEPENDS:=+libopenssl +zlib
47 TITLE:=A client-side URL transfer library
48 endef
49
50 TARGET_CFLAGS += $(FPIC)
51
52 CONFIGURE_ARGS += \
53 --enable-shared \
54 --enable-static \
55 --disable-thread \
56 --enable-cookies \
57 --enable-crypto-auth \
58 --enable-nonblocking \
59 --enable-file \
60 --enable-ftp \
61 --enable-http \
62 --disable-ares \
63 --disable-debug \
64 --disable-dict \
65 --disable-gopher \
66 --disable-ldap \
67 --disable-manual \
68 --disable-sspi \
69 --disable-telnet \
70 --enable-tftp \
71 --disable-verbose \
72 --with-random="/dev/urandom" \
73 --with-ssl="$(STAGING_DIR)/usr" \
74 --without-ca-bundle \
75 --without-gnutls \
76 --without-krb4 \
77 --without-libidn \
78 --without-nss \
79 --without-libssh2 \
80 --with-zlib="$(STAGING_DIR)/usr" \
81 $(call autoconf_bool,CONFIG_IPV6,ipv6) \
82
83 CONFIGURE_VARS += \
84 LDFLAGS="$$$$LDFLAGS -lcrypto -lssl -lz" \
85 CC="$(filter-out ccache,$(TARGET_CC))"
86
87 #define Build/Configure
88 # (cd $(PKG_BUILD_DIR); \
89 # autoreconf -v --install || exit 1 \
90 # );
91 # $(call Build/Configure/Default)
92 #endef
93
94 define Build/Compile
95 $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
96 DESTDIR="$(PKG_INSTALL_DIR)" \
97 CC="$(TARGET_CC)" \
98 install
99 endef
100
101 define Build/InstallDev
102 $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
103 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl-config $(1)/usr/bin/
104 $(CP) $(PKG_INSTALL_DIR)/usr/include/curl $(1)/usr/include/
105 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.{a,so*} $(1)/usr/lib/
106 $(CP) $(PKG_BUILD_DIR)/libcurl.pc $(1)/usr/lib/pkgconfig/
107 $(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/curl-config
108 $(SED) 's#$(TARGET_LDFLAGS)##g' $(1)/usr/lib/pkgconfig/libcurl.pc
109 ln -sf $(STAGING_DIR)/usr/bin/curl-config $(2)/bin/
110 endef
111
112 define Package/curl/install
113 $(INSTALL_DIR) $(1)/usr/bin
114 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl $(1)/usr/bin/
115 endef
116
117 define Package/libcurl/install
118 $(INSTALL_DIR) $(1)/usr/lib
119 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.so.* $(1)/usr/lib/
120 endef
121
122 $(eval $(call BuildPackage,curl))
123 $(eval $(call BuildPackage,libcurl))