]> git.pld-linux.org Git - packages/curl.git/blob - curl.spec
up to 8.7.1 (fixes CVE-2024-2004 CVE-2024-2379 CVE-2024-2398 CVE-2024-2466)
[packages/curl.git] / curl.spec
1 # TODO: ngtpc2/nghttp3 or quiche or msh3 for HTTP3?
2 #
3 # Conditional build:
4 %bcond_without  static_libs     # static library
5 %bcond_without  ssh             # SSH support
6 %bcond_without  ssl             # SSL support
7 %bcond_with     gnutls          # GnuTLS instead of OpenSSL
8 %bcond_without  gsasl           # SCRAM support with gsasl
9 %bcond_without  kerberos5       # Heimdal Kerberos 5 support
10 %bcond_without  ldap            # LDAP support
11 %bcond_without  http2           # HTTP/2.0 support (nghttp2 based)
12 %bcond_with     http3           # HTTP/3.0 support (nghttp3/ngtcp2 based)
13 %if "%{pld_release}" != "ac"
14 %bcond_without  ares            # c-ares (asynchronous DNS operations) library support
15 %bcond_without  rtmp            # Real Time Media Protocol support
16 %else
17 %bcond_with     ares            # c-ares (asynchronous DNS operations) library support
18 %bcond_with     rtmp            # Real Time Media Protocol support
19 %endif
20
21 Summary:        A utility for getting files from remote servers (FTP, HTTP, and others)
22 Summary(es.UTF-8):      Un cliente para bajar archivos de servidores (FTP, HTTP, y otros)
23 Summary(pl.UTF-8):      Narzędzie do ściągania plików z serwerów (FTP, HTTP i innych)
24 Summary(pt_BR.UTF-8):   Busca URL (suporta FTP, TELNET, LDAP, GOPHER, DICT, HTTP e HTTPS)
25 Summary(ru.UTF-8):      Утилита для получения файлов с серверов FTP, HTTP и других
26 Summary(uk.UTF-8):      Утиліта для отримання файлів з серверів FTP, HTTP та інших
27 Name:           curl
28 Version:        8.7.1
29 Release:        1
30 License:        MIT-like
31 Group:          Applications/Networking
32 Source0:        https://curl.se/download/%{name}-%{version}.tar.xz
33 # Source0-md5:  f4f37253c5f1ad9ee85fa6215fdfeb42
34 Patch0:         %{name}-ac.patch
35 Patch1:         %{name}-krb5flags.patch
36 URL:            https://curl.se/
37 BuildRequires:  autoconf >= 2.57
38 BuildRequires:  automake
39 %{?with_ares:BuildRequires:     c-ares-devel >= 1.17.0}
40 %{?with_gsasl:BuildRequires:    gsasl-devel}
41 %{?with_kerberos5:BuildRequires:        heimdal-devel}
42 BuildRequires:  libbrotli-devel >= 1.0.0
43 BuildRequires:  libidn2-devel
44 BuildRequires:  libpsl-devel
45 %{?with_rtmp:BuildRequires:     librtmp-devel}
46 %{?with_ssh:BuildRequires:      libssh2-devel >= 1.11.0}
47 BuildRequires:  libtool
48 BuildRequires:  nettle-devel
49 %{?with_http2:BuildRequires:    nghttp2-devel >= 1.15.0}
50 %{?with_http3:BuildRequires:    nghttp3-devel}
51 # with gnutls or openssl crypto, conforming to chosen curl crypto library
52 %{?with_http3:BuildRequires:    ngtcp2-devel}
53 %{?with_ldap:BuildRequires:     openldap-devel}
54 BuildRequires:  pkgconfig
55 BuildRequires:  rpm >= 4.4.9-56
56 BuildRequires:  rpm-build >= 4.6
57 BuildRequires:  rpmbuild(macros) >= 1.527
58 %if %{with ssl}
59 %if %{with gnutls}
60 BuildRequires:  gnutls-devel >= 3.1.10
61 %else
62 BuildRequires:  openssl-devel >= 1.0.1
63 %endif
64 %endif
65 BuildRequires:  tar >= 1:1.22
66 BuildRequires:  xz
67 BuildRequires:  zlib-devel
68 BuildRequires:  zstd-devel
69 Requires:       %{name}-libs = %{version}-%{release}
70 Obsoletes:      libcurl2 < 7.12
71 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
72
73 %description
74 cURL is a tool for getting files with URL syntax, supporting FTP,
75 HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. cURL supports HTTP
76 POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies,
77 cookies, user+password authentication and a busload of other useful
78 tricks. The main use for curl is when you want to get or send files
79 automatically to or from a site using one of the supported protocols.
80
81 cURL is a tool for getting files from FTP, HTTP, Gopher, Telnet, and
82 Dict servers, using any of the supported protocols. cURL is designed
83 to work without user interaction or any kind of interactivity. cURL
84 offers many useful capabilities, like proxy support, user
85 authentication, FTP upload, HTTP post, and file transfer resume.
86
87 %description -l pl.UTF-8
88 cURL jest narzędziem do ściągania plików o składni URL. Obsługuje FTP,
89 HTTP, HTTPS, GOPHER, TELNET, DICT, FILE i LDAP. cURL obsługuje również
90 HTTP POST, HTTP PUT, załadowywanie (uploading) FTP, załadowywanie HTTP
91 oparte na formularzu, serwery proksy, ciasteczka, autoryzacja
92 użytkownik/hasło oraz wiele innych użytecznych sztuczek. Curla używa
93 się głównie wtedy, kiedy chce się automatycznie ściągnąć lub wysłać
94 pliki z/na serwer używając jednego z dostępnych protokołów.
95 %{?with_ssl:Ten pakiet obsługuje także SSL.}
96
97 %description -l pt_BR.UTF-8
98 Curl é um cliente para baixar/enviar arquivos de/para servidores
99 usando um dos protocolos suportados. É projetado para funcionar sem a
100 interação do usuário.
101
102 Curl trabalha com proxy, autenticação, FTP put, HTTP post, e pode
103 continuar transferências interrompidas, e mais...
104
105 %description -l ru.UTF-8
106 curl - это клиент с множеством поддерживаемых протоколов для получения
107 файлов с серверов, спроектированный для работы как в неинтерактивном
108 режиме, так и с возможностью диалога с пользователем.
109
110 curl поддерживает много полезных возможностей, среди которых поддержка
111 прокси, авторизация пользователя, закачивание по FTP, поддержка HTTP
112 POST, восстановление прерванной пересылки и многое другое.
113
114 curl - це кл╕╓нт з багатьма п╕дтримуваними протоколами для отримання
115 файл╕в з сервер╕в, спроектований для роботи як в не╕нтерактивному
116 режим╕, так ╕ з можлив╕стю д╕алогу з користувачем.
117
118 curl п╕дтриму╓ багато корисних можливостей, серед яких п╕дтримка
119 прокс╕, авторизац╕я користувача, в╕двантаження по FTP, HTTP POST,
120 в╕дновлення перервано╖ пересилки та багато ╕ншого.
121
122 %package libs
123 Summary:        curl library
124 Summary(pl.UTF-8):      Biblioteka curl
125 Group:          Libraries
126 %{?with_ares:Requires:  c-ares >= 1.17.0}
127 %{?with_gnutls:Requires:        gnutls-libs >= 3.1.10}
128 %{?with_ssh:Requires:   libssh2%{?_isa} >= 1.11.0}
129 %{?with_http2:Requires: nghttp2-libs >= 1.15.0}
130 %if %{with ssl} && %{without gnutls}
131 Requires:       libbrotli >= 1.0.0
132 Requires:       openssl >= 1.0.1
133 %endif
134 Suggests:       ca-certificates
135 Conflicts:      ca-certificates < 20080809-4
136
137 %description libs
138 curl library.
139
140 %description libs -l pl.UTF-8
141 Biblioteka curl.
142
143 %package devel
144 Summary:        Header files and development documentation for curl library
145 Summary(pl.UTF-8):      Pliki nagłówkowe i dokumentacja do biblioteki curl
146 Summary(pt_BR.UTF-8):   Arquivos de cabeçalho e bibliotecas de desenvolvimento
147 Summary(ru.UTF-8):      Файлы для разработки с использованием библиотеки curl
148 Summary(uk.UTF-8):      Файли для розробки з використанням бібліотеки curl
149 Group:          Development/Libraries
150 Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
151 %{?with_ares:Requires:  c-ares-devel}
152 %{?with_gsasl:Requires: gsasl-devel}
153 %{?with_kerberos5:Requires:     heimdal-devel}
154 Requires:       libbrotli-devel >= 1.0.0
155 Requires:       libidn2-devel
156 Requires:       libpsl-devel
157 %{?with_rtmp:Requires:  librtmp-devel}
158 %{?with_ssh:Requires:   libssh2-devel%{?_isa} >= 1.11.0}
159 %{?with_http2:Requires: nghttp2-devel >= 1.15.0}
160 %{?with_ldap:Requires:  openldap-devel}
161 %if %{with ssl}
162 %if %{with gnutls}
163 Requires:       gnutls-devel >= 3.1.10
164 %else
165 Requires:       openssl-devel >= 0.9.7c
166 %endif
167 %endif
168 Requires:       zlib-devel
169 Requires:       zstd-devel
170 Obsoletes:      libcurl2-devel < 7.12
171
172 %description devel
173 Header files and development documentation for curl library.
174
175 %description devel -l pl.UTF-8
176 Pliki nagłówkowe i dokumentacja do biblioteki curl.
177
178 %description devel -l pt_BR.UTF-8
179 Arquivos de cabeçalho e bibliotecas de desenvolvimento.
180
181 %description devel -l ru.UTF-8
182 Этот пакет содержит файлы, необходимые для разработки программ с
183 использованием библиотеки curl.
184
185 %description devel -l uk.UTF-8
186 Цей пакет містить файли, необхідні для розробки програм з
187 використанням бібліотеки curl.
188
189 %package static
190 Summary:        Static version of curl library
191 Summary(pl.UTF-8):      Statyczna wersja biblioteki curl
192 Summary(pt_BR.UTF-8):   Bibliotecas estáticas para desenvolvimento com o curl
193 Summary(ru.UTF-8):      Статические библиотеки для разработки с использованием библиотеки curl
194 Summary(uk.UTF-8):      Статичні бібліотеки для розробки з використанням бібліотеки curl
195 Group:          Development/Libraries
196 Requires:       %{name}-devel = %{version}-%{release}
197
198 %description static
199 Static version of curl library.
200
201 %description static -l pl.UTF-8
202 Statyczna wersja biblioteki curl.
203
204 %description static -l pt_BR.UTF-8
205 Bibliotecas estáticas para desenvolvimento com o curl.
206
207 %description static -l ru.UTF-8
208 Этот пакет содержит статическую библиотеку для разработки программ с
209 использованием библиотеки curl.
210
211 %description static -l uk.UTF-8
212 Цей пакет містить статичну бібліотеку для розробки програм з
213 використанням бібліотеки curl.
214
215 %package -n fish-completion-%{name}
216 Summary:        Fish completion for curl command
217 Summary(pl.UTF-8):      Dopełnianie parametrów w fish dla polecenia curl
218 Group:          Applications/Shells
219 Requires:       %{name} = %{version}-%{release}
220 Requires:       fish
221 BuildArch:      noarch
222
223 %description -n fish-completion-%{name}
224 Fish completion for curl command.
225
226 %description -n fish-completion-%{name} -l pl.UTF-8
227 Dopełnianie parametrów w fish dla polecenia curl.
228
229 %package -n zsh-completion-curl
230 Summary:        ZSH completion for curl command
231 Summary(pl.UTF-8):      Dopełnianianie parametrów w ZSH dla polecenia curl
232 Group:          Applications/Shells
233 Requires:       %{name} = %{version}-%{release}
234 Requires:       zsh
235 BuildArch:      noarch
236
237 %description -n zsh-completion-curl
238 ZSH completion for curl command.
239
240 %description -n zsh-completion-curl -l pl.UTF-8
241 Dopełnianianie parametrów w ZSH dla polecenia curl.
242
243 %prep
244 %setup -q
245 %patch0 -p1
246 %patch1 -p1
247
248 %{__rm} m4/lt*.m4 m4/libtool.m4
249
250 %build
251 %{__libtoolize}
252 %{__aclocal} -I m4
253 %{__autoconf}
254 %{__autoheader}
255 %{__automake}
256 %configure \
257         ac_cv_header_gss_h=no \
258         %{__enable_disable static_libs static} \
259         %{__enable_disable ares} \
260         %{__with_without gsasl libgsasl} \
261         --enable-headers-api \
262         --enable-ipv6 \
263         %{__enable_disable ldap} \
264         %{__enable_disable ldap ldaps} \
265         --disable-silent-rules \
266         --enable-websockets \
267 %if %{with ssl}
268         --with-ca-bundle=/etc/certs/ca-certificates.crt \
269 %if %{with gnutls}
270         --with-gnutls --without-openssl \
271 %else
272         --with-openssl=%{_prefix} \
273 %endif
274 %else
275         --without-ssl \
276 %endif
277         --with-fish-functions-dir=%{fish_compdir} \
278         --with-zsh-functions-dir=%{zsh_compdir} \
279         %{__with_without kerberos5 gssapi %{_prefix}} \
280         %{__with_without rtmp librtmp} \
281         %{__with_without http2 nghttp2} \
282         %{__with_without http3 nghttp3} \
283         %{__with_without http3 ngtcp2} \
284         %{__with_without ssh libssh2}
285
286 %{__make}
287
288 %install
289 rm -rf $RPM_BUILD_ROOT
290
291 %{__make} install \
292         DESTDIR=$RPM_BUILD_ROOT
293
294 %{__make} -C scripts install \
295         DESTDIR=$RPM_BUILD_ROOT
296
297 # obsoleted by pkg-config
298 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libcurl.la
299
300 # no longer in upstream but a lot of apps tries to include it so we create fake one
301 [ -e $RPM_BUILD_ROOT%{_includedir}/curl/types.h ] && exit 1
302 echo '#warning curl/types.h IS OBSOLETE FROM 2004. STOP USING IT' > $RPM_BUILD_ROOT%{_includedir}/curl/types.h
303
304 %clean
305 rm -rf $RPM_BUILD_ROOT
306
307 %post   libs -p /sbin/ldconfig
308 %postun libs -p /sbin/ldconfig
309
310 %files
311 %defattr(644,root,root,755)
312 %doc CHANGES COPYING README docs/{BUGS.md,FAQ,FEATURES.md,HISTORY.md,KNOWN_BUGS,SSLCERTS.md,THANKS,TODO,TheArtOfHttpScripting.md}
313 %attr(755,root,root) %{_bindir}/curl
314 %{_mandir}/man1/curl.1*
315
316 %files libs
317 %defattr(644,root,root,755)
318 %attr(755,root,root) %{_libdir}/libcurl.so.*.*.*
319 %attr(755,root,root) %ghost %{_libdir}/libcurl.so.4
320
321 %files devel
322 %defattr(644,root,root,755)
323 %doc docs/{CONTRIBUTE.md,INTERNALS.md}
324 %attr(755,root,root) %{_bindir}/curl-config
325 %attr(755,root,root) %{_libdir}/libcurl.so
326 %{_includedir}/curl
327 %{_pkgconfigdir}/libcurl.pc
328 %{_aclocaldir}/libcurl.m4
329 %{_mandir}/man1/curl-config.1*
330 %{_mandir}/man3/curl_*.3*
331 %{_mandir}/man3/libcurl*.3*
332 %{_mandir}/man3/CURLINFO_*.3*
333 %{_mandir}/man3/CURLOPT_*.3*
334 %{_mandir}/man3/CURLMOPT_*.3*
335 %{_mandir}/man3/CURLSHOPT_*.3*
336
337 %if %{with static_libs}
338 %files static
339 %defattr(644,root,root,755)
340 %{_libdir}/libcurl.a
341 %endif
342
343 %files -n fish-completion-%{name}
344 %defattr(644,root,root,755)
345 %{fish_compdir}/curl.fish
346
347 %files -n zsh-completion-curl
348 %defattr(644,root,root,755)
349 %{zsh_compdir}/_curl
This page took 0.092766 seconds and 4 git commands to generate.