[curl]: upgrade to 7.33.0, add myself as maintainer
[openwrt/svn-archive/archive.git] / libs / curl / Makefile
1 #
2 # Copyright (C) 2007-2013 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.33.0
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:=57409d6bf0bd97053b8378dbe0cadcef
23
24 PKG_LICENSE:=MIT
25 PKG_LICENSE_FILES:=COPYING
26
27 PKG_FIXUP:=autoreconf
28 PKG_BUILD_PARALLEL:=1
29
30 include $(INCLUDE_DIR)/package.mk
31
32 define Package/curl/Default
33 SECTION:=net
34 CATEGORY:=Network
35 URL:=http://curl.haxx.se/
36 MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
37 endef
38
39 define Package/curl
40 $(call Package/curl/Default)
41 SUBMENU:=File Transfer
42 DEPENDS:=+libcurl
43 TITLE:=A client-side URL transfer utility
44 endef
45
46 define Package/libcurl
47 $(call Package/curl/Default)
48 SECTION:=libs
49 CATEGORY:=Libraries
50 DEPENDS:=+libopenssl +zlib
51 TITLE:=A client-side URL transfer library
52 endef
53
54 TARGET_CFLAGS += $(FPIC)
55
56 CONFIGURE_ARGS += \
57 --enable-shared \
58 --enable-static \
59 --disable-thread \
60 --enable-cookies \
61 --enable-crypto-auth \
62 --enable-nonblocking \
63 --enable-file \
64 --enable-ftp \
65 --enable-http \
66 --disable-ares \
67 --disable-debug \
68 --disable-dict \
69 --disable-gopher \
70 --disable-ldap \
71 --disable-manual \
72 --disable-sspi \
73 --disable-telnet \
74 --enable-tftp \
75 --disable-verbose \
76 --with-random="/dev/urandom" \
77 --with-ssl="$(STAGING_DIR)/usr" \
78 --without-ca-bundle \
79 --without-gnutls \
80 --without-krb4 \
81 --without-libidn \
82 --without-nss \
83 --without-libssh2 \
84 --with-zlib="$(STAGING_DIR)/usr" \
85 $(call autoconf_bool,CONFIG_IPV6,ipv6) \
86
87 CONFIGURE_VARS += \
88 LIBS="-lcrypto -lssl -lz" \
89 CC="$(filter-out ccache,$(TARGET_CC))"
90
91 define Build/Compile
92 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
93 DESTDIR="$(PKG_INSTALL_DIR)" \
94 CC="$(TARGET_CC)" \
95 install
96 endef
97
98 define Build/InstallDev
99 $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig
100 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl-config $(1)/usr/bin/
101 $(CP) $(PKG_INSTALL_DIR)/usr/include/curl $(1)/usr/include/
102 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.{a,so*} $(1)/usr/lib/
103 $(CP) $(PKG_BUILD_DIR)/libcurl.pc $(1)/usr/lib/pkgconfig/
104 $(SED) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr/bin/curl-config
105 [ -n "$(TARGET_LDFLAGS)" ] && $(SED) 's#$(TARGET_LDFLAGS)##g' $(1)/usr/lib/pkgconfig/libcurl.pc || true
106 ln -sf $(STAGING_DIR)/usr/bin/curl-config $(2)/bin/
107 endef
108
109 define Package/curl/install
110 $(INSTALL_DIR) $(1)/usr/bin
111 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/curl $(1)/usr/bin/
112 endef
113
114 define Package/libcurl/install
115 $(INSTALL_DIR) $(1)/usr/lib
116 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcurl.so.* $(1)/usr/lib/
117 endef
118
119 $(eval $(call BuildPackage,curl))
120 $(eval $(call BuildPackage,libcurl))