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.xz
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
:=31b1118eb8bfd43cd95d9a3f146f814ff874f6ed3999b29d94f4d1e7dbac5ef6
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 \
62 CONFIG_LIBCURL_COOKIES \
63 CONFIG_LIBCURL_CRYPTO_AUTH \
64 CONFIG_LIBCURL_LIBCURL_OPTION \
65 CONFIG_LIBCURL_PROXY \
66 CONFIG_LIBCURL_THREADED_RESOLVER \
67 CONFIG_LIBCURL_TLS_SRP \
68 CONFIG_LIBCURL_UNIX_SOCKETS \
69 CONFIG_LIBCURL_VERBOSE \
71 $(if
$(CONFIG_LIBCURL_OPENSSL
), \
72 CONFIG_OPENSSL_ENGINE \
73 CONFIG_OPENSSL_WITH_COMPRESSION \
74 CONFIG_OPENSSL_WITH_NPN
)
76 include $(INCLUDE_DIR
)/package.mk
78 define Package
/curl
/Default
82 MAINTAINER
:=Stan Grishin
<stangri@melmac.ca
>
86 $(call Package
/curl
/Default
)
87 SUBMENU
:=File Transfer
89 TITLE
:=A client-side URL transfer utility
92 define Package
/libcurl
93 $(call Package
/curl
/Default
)
96 DEPENDS
:= +LIBCURL_WOLFSSL
:libwolfssl
+LIBCURL_OPENSSL
:libopenssl
+LIBCURL_GNUTLS
:libgnutls
+LIBCURL_MBEDTLS
:libmbedtls
97 DEPENDS
+= +LIBCURL_ZLIB
:zlib
+LIBCURL_ZSTD
:libzstd
+LIBCURL_THREADED_RESOLVER
:libpthread
+LIBCURL_LDAP
:libopenldap
98 DEPENDS
+= +LIBCURL_LIBIDN2
:libidn2
+LIBCURL_SSH2
:libssh2
+LIBCURL_NGHTTP2
:libnghttp2
+ca-bundle
99 TITLE
:=A client-side URL transfer library
104 define Package
/libcurl
/config
105 source
"$(SOURCE)/Config.in"
108 TARGET_CFLAGS
+= $(FPIC
)
109 TARGET_CPPFLAGS
+= $(if
$(CONFIG_LIBCURL_NTLM
),,-DCURL_DISABLE_NTLM
)
110 TARGET_LDFLAGS
+= -Wl
,--gc-sections
123 --with-ca-bundle
=/etc
/ssl
/certs
/ca-certificates.crt \
125 $(call autoconf_bool
,CONFIG_IPV6
,ipv6
) \
127 $(if
$(CONFIG_LIBCURL_WOLFSSL
)$(CONFIG_LIBCURL_GNUTLS
)$(CONFIG_LIBCURL_OPENSSL
)$(CONFIG_LIBCURL_MBEDTLS
),,--without-ssl
) \
128 $(if
$(CONFIG_LIBCURL_WOLFSSL
),--with-wolfssl
="$(STAGING_DIR)/usr",--without-wolfssl
) \
129 $(if
$(CONFIG_LIBCURL_GNUTLS
),--with-gnutls
="$(STAGING_DIR)/usr",--without-gnutls
) \
130 $(if
$(CONFIG_LIBCURL_OPENSSL
),--with-openssl
="$(STAGING_DIR)/usr",--without-openssl
) \
131 $(if
$(CONFIG_LIBCURL_MBEDTLS
),--with-mbedtls
="$(STAGING_DIR)/usr",--without-mbedtls
) \
133 $(if
$(CONFIG_LIBCURL_LIBIDN2
),--with-libidn2
="$(STAGING_DIR)/usr",--without-libidn2
) \
134 $(if
$(CONFIG_LIBCURL_SSH2
),--with-libssh2
="$(STAGING_DIR)/usr",--without-libssh2
) \
135 $(if
$(CONFIG_LIBCURL_ZLIB
),--with-zlib
="$(STAGING_DIR)/usr",--without-zlib
) \
136 $(if
$(CONFIG_LIBCURL_ZSTD
),--with-zstd
="$(STAGING_DIR)/usr",--without-zstd
) \
137 $(if
$(CONFIG_LIBCURL_NGHTTP2
),--with-nghttp2
="$(STAGING_DIR)/usr",--without-nghttp2
) \
139 $(call autoconf_bool
,CONFIG_LIBCURL_DICT
,dict
) \
140 $(call autoconf_bool
,CONFIG_LIBCURL_FILE
,file
) \
141 $(call autoconf_bool
,CONFIG_LIBCURL_FTP
,ftp
) \
142 $(call autoconf_bool
,CONFIG_LIBCURL_GOPHER
,gopher
) \
143 $(call autoconf_bool
,CONFIG_LIBCURL_HTTP
,http
) \
144 $(call autoconf_bool
,CONFIG_LIBCURL_IMAP
,imap
) \
145 $(call autoconf_bool
,CONFIG_LIBCURL_LDAP
,ldap
) \
146 $(call autoconf_bool
,CONFIG_LIBCURL_LDAPS
,ldaps
) \
147 $(call autoconf_bool
,CONFIG_LIBCURL_POP3
,pop3
) \
148 $(call autoconf_bool
,CONFIG_LIBCURL_RTSP
,rtsp
) \
149 $(call autoconf_bool
,CONFIG_LIBCURL_SMB
,smb
) \
150 $(call autoconf_bool
,CONFIG_LIBCURL_SMTP
,smtp
) \
151 $(call autoconf_bool
,CONFIG_LIBCURL_TELNET
,telnet
) \
152 $(call autoconf_bool
,CONFIG_LIBCURL_TFTP
,tftp
) \
154 $(call autoconf_bool
,CONFIG_LIBCURL_COOKIES
,cookies
) \
155 $(call autoconf_bool
,CONFIG_LIBCURL_CRYPTO_AUTH
,crypto-auth
) \
156 $(call autoconf_bool
,CONFIG_LIBCURL_LIBCURL_OPTION
,libcurl-option
) \
157 $(call autoconf_bool
,CONFIG_LIBCURL_PROXY
,proxy
) \
158 $(call autoconf_bool
,CONFIG_LIBCURL_THREADED_RESOLVER
,threaded-resolver
) \
159 $(call autoconf_bool
,CONFIG_LIBCURL_TLS_SRP
,tls-srp
) \
160 $(call autoconf_bool
,CONFIG_LIBCURL_UNIX_SOCKETS
,unix-sockets
) \
161 $(call autoconf_bool
,CONFIG_LIBCURL_VERBOSE
,verbose
) \
163 define Build
/InstallDev
164 $(INSTALL_DIR
) $(2)/bin
$(1)/usr
/bin
$(1)/usr
/include $(1)/usr
/lib
$(1)/usr
/lib
/pkgconfig
165 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/curl-config
$(1)/usr
/bin
/
166 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/curl
$(1)/usr
/include/
167 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libcurl.
{a
,so
*} $(1)/usr
/lib
/
168 $(CP
) $(PKG_BUILD_DIR
)/libcurl.
pc $(1)/usr
/lib
/pkgconfig
/
169 $(SED
) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(1)/usr
/bin
/curl-config
170 [ -n
"$(TARGET_LDFLAGS)" ] && $(SED
) 's#$(TARGET_LDFLAGS)##g' $(1)/usr
/lib
/pkgconfig
/libcurl.
pc || true
171 $(LN
) $(STAGING_DIR
)/usr
/bin
/curl-config
$(2)/bin
/
174 define Package
/curl
/install
175 $(INSTALL_DIR
) $(1)/usr
/bin
176 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/curl
$(1)/usr
/bin
/
179 define Package
/libcurl
/install
180 $(INSTALL_DIR
) $(1)/usr
/lib
181 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libcurl.so.
* $(1)/usr
/lib
/
184 $(eval
$(call BuildPackage
,libcurl
))
185 $(eval
$(call BuildPackage
,curl
))