2 # Copyright (C) 2007-2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
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 ftp
://ftp.sunet.se
/pub
/www
/utilities
/curl
/ \
18 ftp
://ftp.planetmirror.com
/pub
/curl
/ \
19 http
://www.mirrormonster.com
/curl
/download
/ \
20 http
://curl.mirrors.cyberservers.net
/download
/
21 PKG_MD5SUM
:=e6d1f9d1b59da5062109ffe14e0569a4
24 PKG_LICENSE_FILES
:=COPYING
29 PKG_CONFIG_DEPENDS
:= \
43 LIBCURL_LIBCURL_OPTION \
54 LIBCURL_THREADED_RESOLVER \
58 include $(INCLUDE_DIR
)/package.mk
60 define Package
/curl
/Default
63 URL
:=http
://curl.haxx.se
/
64 MAINTAINER
:=Imre Kaloz
<kaloz@openwrt.org
>
68 $(call Package
/curl
/Default
)
69 SUBMENU
:=File Transfer
71 TITLE
:=A client-side URL transfer utility
74 define Package
/libcurl
75 $(call Package
/curl
/Default
)
78 DEPENDS
:=+LIBCURL_POLARSSL
:libpolarssl
+LIBCURL_CYASSL
:libcyassl
+LIBCURL_AXTLS
:libaxtls
+LIBCURL_OPENSSL
:libopenssl
+LIBCURL_GNUTLS
:libgnutls
+LIBCURL_ZLIB
:zlib
+LIBCURL_THREADED_RESOLVER
:libpthread
79 TITLE
:=A client-side URL transfer library using
$(if
$(CONFIG_LIBCURL_POLARSSL
),PolarSSL
)$(if
$(CONFIG_LIBCURL_OPENSSL
),OpenSSL
)$(if
$(CONFIG_LIBCURL_GNUTLS
),GNUTLS
)$(if
$(CONFIG_LIBCURL_NOSSL
),no SSL
)
84 define Package
/libcurl
/config
85 source
"$(SOURCE)/Config.in"
88 TARGET_CFLAGS
+= $(FPIC
)
94 --enable-nonblocking \
104 $(call autoconf_bool
,CONFIG_IPV6
,ipv6
) \
105 $(if
$(CONFIG_LIBCURL_AXTLS
),--with-axtls
="$(STAGING_DIR)/usr",--without-axtls
) \
106 $(if
$(CONFIG_LIBCURL_COOKIES
),--enable
,--disable
)-cookies \
107 $(if
$(CONFIG_LIBCURL_CRYPTO-AUTH
),--enable
,--disable
)-crypto-auth \
108 $(if
$(CONFIG_LIBCURL_CYASSL
),--with-cyassl
="$(STAGING_DIR)/usr",--without-cyassl
) \
109 $(if
$(CONFIG_LIBCURL_DICT
),--enable
,--disable
)-dict \
110 $(if
$(CONFIG_LIBCURL_FILE
),--enable
,--disable
)-file \
111 $(if
$(CONFIG_LIBCURL_FTP
),--enable
,--disable
)-ftp \
112 $(if
$(CONFIG_LIBCURL_GOPHER
),--enable
,--disable
)-gopher \
113 $(if
$(CONFIG_LIBCURL_GNUTLS
),--with-gnutls
="$(STAGING_DIR)/usr",--without-gnutls
) \
114 $(if
$(CONFIG_LIBCURL_HTTP
),--enable
,--disable
)-http \
115 $(if
$(CONFIG_LIBCURL_IMAP
),--enable
,--disable
)-imap \
116 $(if
$(CONFIG_LIBCURL_LDAP
),--enable
,--disable
)-ldap \
117 $(if
$(CONFIG_LIBCURL_LDAPS
),--enable
,--disable
)-ldaps \
118 $(if
$(CONFIG_LIBCURL_LIBCURL-OPTION
),--enable
,--disable
)-libcurl-option \
119 $(if
$(CONFIG_LIBCURL_OPENSSL
),--with-ssl
="$(STAGING_DIR)/usr",--without-ssl
) \
120 $(if
$(CONFIG_LIBCURL_POLARSSL
),--with-polarssl
="$(STAGING_DIR)/usr",--without-polarssl
) \
121 $(if
$(CONFIG_LIBCURL_POP3
),--enable
,--disable
)-pop3 \
122 $(if
$(CONFIG_LIBCURL_PROXY
),--enable
,--disable
)-proxy \
123 $(if
$(CONFIG_LIBCURL_RTSP
),--enable
,--disable
)-rtsp \
124 $(if
$(CONFIG_LIBCURL_TELNET
),--enable
,--disable
)-telnet \
125 $(if
$(CONFIG_LIBCURL_TFTP
),--enable
,--disable
)-tftp \
126 $(if
$(CONFIG_LIBCURL_SMTP
),--enable
,--disable
)-smtp \
127 $(if
$(CONFIG_LIBCURL_SSPI
),--enable
,--disable
)-sspi \
128 $(if
$(CONFIG_LIBCURL_THREADED_RESOLVER
),--enable
,--disable
)-threaded-resolver \
129 $(if
$(CONFIG_LIBCURL_TLS-SRP
),--enable
,--disable
)-tls-srp \
130 $(if
$(CONFIG_LIBCURL_ZLIB
),--with-zlib
="$(STAGING_DIR)/usr",--without-zlib
) \
133 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
134 DESTDIR
="$(PKG_INSTALL_DIR)" \
139 define Build
/InstallDev
140 $(INSTALL_DIR
) $(2)/bin
$(1)/usr
/bin
$(1)/usr
/include $(1)/usr
/lib
$(1)/usr
/lib
/pkgconfig
141 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/curl-config
$(1)/usr
/bin
/
142 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/curl
$(1)/usr
/include/
143 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libcurl.
{a
,so
*} $(1)/usr
/lib
/
144 $(CP
) $(PKG_BUILD_DIR
)/libcurl.
pc $(1)/usr
/lib
/pkgconfig
/
145 $(SED
) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr
/bin
/curl-config
146 [ -n
"$(TARGET_LDFLAGS)" ] && $(SED
) 's#$(TARGET_LDFLAGS)##g' $(1)/usr
/lib
/pkgconfig
/libcurl.
pc || true
147 ln
-sf
$(STAGING_DIR
)/usr
/bin
/curl-config
$(2)/bin
/
150 define Package
/curl
/install
151 $(INSTALL_DIR
) $(1)/usr
/bin
152 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/curl
$(1)/usr
/bin
/
155 define Package
/libcurl
/install
156 $(INSTALL_DIR
) $(1)/usr
/lib
157 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libcurl.so.
* $(1)/usr
/lib
/
160 $(eval
$(call BuildPackage
,curl
))
161 $(eval
$(call BuildPackage
,libcurl
))