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