2 # Copyright (C) 2007-2020 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
9 include $(INCLUDE_DIR
)/nls.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
16 PKG_SOURCE_URL
:=https
://github.com
/curl
/curl
/releases
/download
/curl-
$(subst .
,_
,$(PKG_VERSION
))/ \
17 https
://dl.uxnr.de
/mirror
/curl
/ \
18 https
://curl.askapache.com
/download
/ \
19 https
://curl.se
/download
/
20 PKG_HASH
:=05bbd2b698e9cfbab477c33aa5e99b4975501835a41b7ca6ca71de03d8849e76
23 PKG_LICENSE_FILES
:=COPYING
24 PKG_CPE_ID
:=cpe
:/a
:haxx
:libcurl
30 PKG_CONFIG_DEPENDS
:= \
33 CONFIG_LIBCURL_WOLFSSL \
34 CONFIG_LIBCURL_GNUTLS \
35 CONFIG_LIBCURL_OPENSSL \
36 CONFIG_LIBCURL_MBEDTLS \
37 CONFIG_LIBCURL_NOSSL \
39 CONFIG_LIBCURL_LIBIDN2 \
47 CONFIG_LIBCURL_GOPHER \
51 CONFIG_LIBCURL_LDAPS \
54 CONFIG_LIBCURL_NO_RTSP \
56 CONFIG_LIBCURL_NO_SMB \
58 CONFIG_LIBCURL_TELNET \
60 CONFIG_LIBCURL_NGHTTP2 \
61 CONFIG_LIBCURL_NGHTTP3 \
62 CONFIG_LIBCURL_NGTCP2 \
64 CONFIG_LIBCURL_COOKIES \
65 CONFIG_LIBCURL_CRYPTO_AUTH \
66 CONFIG_LIBCURL_LIBCURL_OPTION \
67 CONFIG_LIBCURL_PROXY \
68 CONFIG_LIBCURL_THREADED_RESOLVER \
69 CONFIG_LIBCURL_TLS_SRP \
70 CONFIG_LIBCURL_UNIX_SOCKETS \
71 CONFIG_LIBCURL_VERBOSE \
73 $(if
$(CONFIG_LIBCURL_OPENSSL
), \
74 CONFIG_OPENSSL_ENGINE \
75 CONFIG_OPENSSL_WITH_COMPRESSION \
76 CONFIG_OPENSSL_WITH_NPN
)
78 include $(INCLUDE_DIR
)/package.mk
80 define Package
/curl
/Default
88 $(call Package
/curl
/Default
)
89 SUBMENU
:=File Transfer
91 TITLE
:=A client-side URL transfer utility
94 define Package
/libcurl
95 $(call Package
/curl
/Default
)
98 DEPENDS
:= +LIBCURL_WOLFSSL
:libwolfssl
+LIBCURL_OPENSSL
:libopenssl
+LIBCURL_GNUTLS
:libgnutls
+LIBCURL_MBEDTLS
:libmbedtls
99 DEPENDS
+= +LIBCURL_ZLIB
:zlib
+LIBCURL_ZSTD
:libzstd
+LIBCURL_THREADED_RESOLVER
:libpthread
+LIBCURL_LDAP
:libopenldap
100 DEPENDS
+= +LIBCURL_LIBIDN2
:libidn2
+LIBCURL_SSH2
:libssh2
+LIBCURL_NGHTTP2
:libnghttp2
+LIBCURL_NGHTTP3
:libnghttp3
+LIBCURL_NGTCP2
:libngtcp2
+ca-bundle
101 TITLE
:=A client-side URL transfer library
106 define Package
/libcurl
/config
107 source
"$(SOURCE)/Config.in"
110 TARGET_CFLAGS
+= $(FPIC
)
111 TARGET_CPPFLAGS
+= $(if
$(CONFIG_LIBCURL_NTLM
),,-DCURL_DISABLE_NTLM
)
112 TARGET_LDFLAGS
+= -Wl
,--gc-sections
126 --with-ca-bundle
=/etc
/ssl
/certs
/ca-certificates.crt \
128 $(call autoconf_bool
,CONFIG_IPV6
,ipv6
) \
130 $(if
$(CONFIG_LIBCURL_WOLFSSL
)$(CONFIG_LIBCURL_GNUTLS
)$(CONFIG_LIBCURL_OPENSSL
)$(CONFIG_LIBCURL_MBEDTLS
),,--without-ssl
) \
131 $(if
$(CONFIG_LIBCURL_WOLFSSL
),--with-wolfssl
="$(STAGING_DIR)/usr",--without-wolfssl
) \
132 $(if
$(CONFIG_LIBCURL_GNUTLS
),--with-gnutls
="$(STAGING_DIR)/usr",--without-gnutls
) \
133 $(if
$(CONFIG_LIBCURL_OPENSSL
),--with-openssl
="$(STAGING_DIR)/usr",--without-openssl
) \
134 $(if
$(CONFIG_LIBCURL_MBEDTLS
),--with-mbedtls
="$(STAGING_DIR)/usr",--without-mbedtls
) \
136 $(if
$(CONFIG_LIBCURL_LIBIDN2
),--with-libidn2
="$(STAGING_DIR)/usr",--without-libidn2
) \
137 $(if
$(CONFIG_LIBCURL_SSH2
),--with-libssh2
="$(STAGING_DIR)/usr",--without-libssh2
) \
138 $(if
$(CONFIG_LIBCURL_ZLIB
),--with-zlib
="$(STAGING_DIR)/usr",--without-zlib
) \
139 $(if
$(CONFIG_LIBCURL_ZSTD
),--with-zstd
="$(STAGING_DIR)/usr",--without-zstd
) \
140 $(if
$(CONFIG_LIBCURL_NGHTTP2
),--with-nghttp2
="$(STAGING_DIR)/usr",--without-nghttp2
) \
141 $(if
$(CONFIG_LIBCURL_NGHTTP3
),--with-nghttp3
="$(STAGING_DIR)/usr",--without-nghttp3
) \
142 $(if
$(CONFIG_LIBCURL_NGTCP2
),--with-ngtcp2
="$(STAGING_DIR)/usr",--without-ngtcp2
) \
144 $(call autoconf_bool
,CONFIG_LIBCURL_DICT
,dict
) \
145 $(call autoconf_bool
,CONFIG_LIBCURL_FILE
,file
) \
146 $(call autoconf_bool
,CONFIG_LIBCURL_FTP
,ftp
) \
147 $(call autoconf_bool
,CONFIG_LIBCURL_GOPHER
,gopher
) \
148 $(call autoconf_bool
,CONFIG_LIBCURL_HTTP
,http
) \
149 $(call autoconf_bool
,CONFIG_LIBCURL_IMAP
,imap
) \
150 $(call autoconf_bool
,CONFIG_LIBCURL_LDAP
,ldap
) \
151 $(call autoconf_bool
,CONFIG_LIBCURL_LDAPS
,ldaps
) \
152 $(call autoconf_bool
,CONFIG_LIBCURL_POP3
,pop3
) \
153 $(call autoconf_bool
,CONFIG_LIBCURL_RTSP
,rtsp
) \
154 $(call autoconf_bool
,CONFIG_LIBCURL_SMB
,smb
) \
155 $(call autoconf_bool
,CONFIG_LIBCURL_SMTP
,smtp
) \
156 $(call autoconf_bool
,CONFIG_LIBCURL_TELNET
,telnet
) \
157 $(call autoconf_bool
,CONFIG_LIBCURL_TFTP
,tftp
) \
159 $(call autoconf_bool
,CONFIG_LIBCURL_COOKIES
,cookies
) \
160 $(call autoconf_bool
,CONFIG_LIBCURL_CRYPTO_AUTH
,crypto-auth
) \
161 $(call autoconf_bool
,CONFIG_LIBCURL_LIBCURL_OPTION
,libcurl-option
) \
162 $(call autoconf_bool
,CONFIG_LIBCURL_PROXY
,proxy
) \
163 $(call autoconf_bool
,CONFIG_LIBCURL_THREADED_RESOLVER
,threaded-resolver
) \
164 $(call autoconf_bool
,CONFIG_LIBCURL_TLS_SRP
,tls-srp
) \
165 $(call autoconf_bool
,CONFIG_LIBCURL_UNIX_SOCKETS
,unix-sockets
) \
166 $(call autoconf_bool
,CONFIG_LIBCURL_VERBOSE
,verbose
) \
168 define Build
/InstallDev
169 $(INSTALL_DIR
) $(2)/bin
$(1)/usr
/bin
$(1)/usr
/include $(1)/usr
/lib
$(1)/usr
/lib
/pkgconfig
170 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/curl-config
$(1)/usr
/bin
/
171 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/curl
$(1)/usr
/include/
172 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libcurl.
{a
,so
*} $(1)/usr
/lib
/
173 $(CP
) $(PKG_BUILD_DIR
)/libcurl.
pc $(1)/usr
/lib
/pkgconfig
/
174 $(SED
) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr
/bin
/curl-config
175 [ -n
"$(TARGET_LDFLAGS)" ] && $(SED
) 's#$(TARGET_LDFLAGS)##g' $(1)/usr
/lib
/pkgconfig
/libcurl.
pc || true
176 $(LN
) $(STAGING_DIR
)/usr
/bin
/curl-config
$(2)/bin
/
179 define Package
/curl
/install
180 $(INSTALL_DIR
) $(1)/usr
/bin
181 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/curl
$(1)/usr
/bin
/
184 define Package
/libcurl
/install
185 $(INSTALL_DIR
) $(1)/usr
/lib
186 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libcurl.so.
* $(1)/usr
/lib
/
189 $(eval
$(call BuildPackage
,libcurl
))
190 $(eval
$(call BuildPackage
,curl
))