2 # Copyright (C) 2007-2016 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_HASH
:=7f8240048907e5030f67be0a6129bc4b333783b9cca1391026d700835a788dde
24 PKG_LICENSE_FILES
:=COPYING
29 PKG_CONFIG_DEPENDS
:= \
32 CONFIG_LIBCURL_CYASSL \
33 CONFIG_LIBCURL_GNUTLS \
34 CONFIG_LIBCURL_OPENSSL \
35 CONFIG_LIBCURL_POLARSSL \
36 CONFIG_LIBCURL_MBEDTLS \
37 CONFIG_LIBCURL_NOSSL \
39 CONFIG_LIBCURL_LIBIDN \
46 CONFIG_LIBCURL_GOPHER \
50 CONFIG_LIBCURL_LDAPS \
53 CONFIG_LIBCURL_NO_RTSP \
55 CONFIG_LIBCURL_NO_SMB \
57 CONFIG_LIBCURL_TELNET \
60 CONFIG_LIBCURL_COOKIES \
61 CONFIG_LIBCURL_CRYPTO_AUTH \
62 CONFIG_LIBCURL_LIBCURL_OPTION \
63 CONFIG_LIBCURL_PROXY \
64 CONFIG_LIBCURL_THREADED_RESOLVER \
65 CONFIG_LIBCURL_TLS_SRP \
66 CONFIG_LIBCURL_UNIX_SOCKETS \
67 CONFIG_LIBCURL_VERBOSE \
70 include $(INCLUDE_DIR
)/package.mk
72 define Package
/curl
/Default
75 URL
:=http
://curl.haxx.se
/
76 MAINTAINER
:=Imre Kaloz
<kaloz@openwrt.org
>
80 $(call Package
/curl
/Default
)
81 SUBMENU
:=File Transfer
83 TITLE
:=A client-side URL transfer utility
86 define Package
/libcurl
87 $(call Package
/curl
/Default
)
90 DEPENDS
:=+LIBCURL_POLARSSL
:libpolarssl
+LIBCURL_CYASSL
:libcyassl
+LIBCURL_OPENSSL
:libopenssl
+LIBCURL_GNUTLS
:libgnutls
+LIBCURL_MBEDTLS
:libmbedtls
91 DEPENDS
+= +LIBCURL_ZLIB
:zlib
+LIBCURL_THREADED_RESOLVER
:libpthread
+LIBCURL_LDAP
:libopenldap
+LIBCURL_LIBIDN
:libidn
+LIBCURL_SSH2
:libssh2
92 TITLE
:=A client-side URL transfer library
97 define Package
/libcurl
/config
98 source
"$(SOURCE)/Config.in"
101 TARGET_CFLAGS
+= $(FPIC
) -ffunction-sections
-fdata-sections
102 TARGET_CPPFLAGS
+= $(if
$(CONFIG_LIBCURL_NTLM
),,-DCURL_DISABLE_NTLM
)
103 TARGET_LDFLAGS
+= -Wl
,--gc-sections
112 --without-libmetalink \
115 $(call autoconf_bool
,CONFIG_IPV6
,ipv6
) \
117 $(if
$(CONFIG_LIBCURL_CYASSL
),--with-cyassl
="$(STAGING_DIR)/usr" --without-ca-path
--with-ca-bundle
=/etc
/ssl
/certs
/ca-certificates.crt
,--without-cyassl
) \
118 $(if
$(CONFIG_LIBCURL_GNUTLS
),--with-gnutls
="$(STAGING_DIR)/usr" --without-ca-bundle
--with-ca-path
=/etc
/ssl
/certs
,--without-gnutls
) \
119 $(if
$(CONFIG_LIBCURL_OPENSSL
),--with-ssl
="$(STAGING_DIR)/usr" --without-ca-bundle
--with-ca-path
=/etc
/ssl
/certs
,--without-ssl
) \
120 $(if
$(CONFIG_LIBCURL_POLARSSL
),--with-polarssl
="$(STAGING_DIR)/usr" --without-ca-bundle
--with-ca-path
=/etc
/ssl
/certs
,--without-polarssl
) \
121 $(if
$(CONFIG_LIBCURL_MBEDTLS
),--with-mbedtls
="$(STAGING_DIR)/usr" --without-ca-path
--with-ca-bundle
=/etc
/ssl
/certs
/ca-certificates.crt
,--without-mbedtls
) \
123 $(if
$(CONFIG_LIBCURL_LIBIDN
),--with-libidn
="$(STAGING_DIR)/usr",--without-libidn
) \
124 $(if
$(CONFIG_LIBCURL_SSH2
),--with-libssh2
="$(STAGING_DIR)/usr",--without-libssh2
) \
125 $(if
$(CONFIG_LIBCURL_ZLIB
),--with-zlib
="$(STAGING_DIR)/usr",--without-zlib
) \
127 $(call autoconf_bool
,CONFIG_LIBCURL_DICT
,dict
) \
128 $(call autoconf_bool
,CONFIG_LIBCURL_FILE
,file
) \
129 $(call autoconf_bool
,CONFIG_LIBCURL_FTP
,ftp
) \
130 $(call autoconf_bool
,CONFIG_LIBCURL_GOPHER
,gopher
) \
131 $(call autoconf_bool
,CONFIG_LIBCURL_HTTP
,http
) \
132 $(call autoconf_bool
,CONFIG_LIBCURL_IMAP
,imap
) \
133 $(call autoconf_bool
,CONFIG_LIBCURL_LDAP
,ldap
) \
134 $(call autoconf_bool
,CONFIG_LIBCURL_LDAPS
,ldaps
) \
135 $(call autoconf_bool
,CONFIG_LIBCURL_POP3
,pop3
) \
136 $(call autoconf_bool
,CONFIG_LIBCURL_RTSP
,rtsp
) \
137 $(call autoconf_bool
,CONFIG_LIBCURL_SMB
,smb
) \
138 $(call autoconf_bool
,CONFIG_LIBCURL_SMTP
,smtp
) \
139 $(call autoconf_bool
,CONFIG_LIBCURL_TELNET
,telnet
) \
140 $(call autoconf_bool
,CONFIG_LIBCURL_TFTP
,tftp
) \
142 $(call autoconf_bool
,CONFIG_LIBCURL_COOKIES
,cookies
) \
143 $(call autoconf_bool
,CONFIG_LIBCURL_CRYPTO_AUTH
,crypto-auth
) \
144 $(call autoconf_bool
,CONFIG_LIBCURL_LIBCURL_OPTION
,libcurl-option
) \
145 $(call autoconf_bool
,CONFIG_LIBCURL_PROXY
,proxy
) \
146 $(call autoconf_bool
,CONFIG_LIBCURL_THREADED_RESOLVER
,threaded-resolver
) \
147 $(call autoconf_bool
,CONFIG_LIBCURL_TLS_SRP
,tls-srp
) \
148 $(call autoconf_bool
,CONFIG_LIBCURL_UNIX_SOCKETS
,unix-sockets
) \
149 $(call autoconf_bool
,CONFIG_LIBCURL_VERBOSE
,verbose
) \
152 +$(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
) \
153 DESTDIR
="$(PKG_INSTALL_DIR)" \
158 define Build
/InstallDev
159 $(INSTALL_DIR
) $(2)/bin
$(1)/usr
/bin
$(1)/usr
/include $(1)/usr
/lib
$(1)/usr
/lib
/pkgconfig
160 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/curl-config
$(1)/usr
/bin
/
161 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/curl
$(1)/usr
/include/
162 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libcurl.
{a
,so
*} $(1)/usr
/lib
/
163 $(CP
) $(PKG_BUILD_DIR
)/libcurl.
pc $(1)/usr
/lib
/pkgconfig
/
164 $(SED
) 's,-L$$$${exec_prefix}/lib,,g' $(1)/usr
/bin
/curl-config
165 [ -n
"$(TARGET_LDFLAGS)" ] && $(SED
) 's#$(TARGET_LDFLAGS)##g' $(1)/usr
/lib
/pkgconfig
/libcurl.
pc || true
166 $(LN
) $(STAGING_DIR
)/usr
/bin
/curl-config
$(2)/bin
/
169 define Package
/curl
/install
170 $(INSTALL_DIR
) $(1)/usr
/bin
171 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/curl
$(1)/usr
/bin
/
174 define Package
/libcurl
/install
175 $(INSTALL_DIR
) $(1)/usr
/lib
176 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libcurl.so.
* $(1)/usr
/lib
/
179 $(eval
$(call BuildPackage
,curl
))
180 $(eval
$(call BuildPackage
,libcurl
))