# The naming scheme in non-Mandriva-based distros %if 0%{!?mklibname:1} %define mklibname(ds) lib%{1}%{?2:%{2}}%{-s:-static}%{-d:-devel} %endif %if 0%{!?mkrel:1} %define mkrel(c) %{1}%{?dist} %endif %bcond_without check %define major 4 %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d # Update this to match the date of this package's latest security patch # if this is not the latest released version of curl #define patchdate YYYY-MM-DD Summary: Gets a file from an FTP, GOPHER or HTTP server Name: curl Epoch: 1 Version: 8.15.0 Release: %mkrel 1.4 License: BSD-like Group: Networking/Other URL: https://curl.haxx.se Source0: https://curl.haxx.se/download/%{name}-%{version}.tar.xz Source1: https://curl.haxx.se/download/%{name}-%{version}.tar.xz.asc Patch0: curl-7.58.0-multilib.patch BuildRequires: cmake BuildRequires: gcc BuildRequires: perl # I'd love to use mbedtls instead of openssl, but that produces a "no handle # specified" error in DNF. Hence the reason that release is 1.1. BuildRequires: pkgconfig(gnutls) BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(libbrotlidec) BuildRequires: pkgconfig(libidn2) BuildRequires: pkgconfig(libnghttp2) >= 1.35.0 BuildRequires: pkgconfig(libpsl) BuildRequires: pkgconfig(libssh2) BuildRequires: pkgconfig(python3) BuildRequires: pkgconfig(ldap) BuildRequires: pkgconfig(krb5) BuildRequires: pkgconfig(libgsasl) BuildRequires: pkgconfig(libcares) # (misc) required for testing BuildRequires: (locales-en or %{_datadir}/locale/en_US) BuildRequires: stunnel # Mageia 9 and earlier didn't enable the applications tool %if 0%{!?mageia:1} || 0%{?mageia} >= 10 BuildRequires: nghttp2 %endif Provides: webfetch %description curl is a client to get documents/files from servers, using any of the supported protocols. The command is designed to work without user interaction or any kind of interactivity. curl offers a busload of useful tricks like proxy support, user authentication, ftp upload, HTTP post, file transfer resume and more. %package -n %{libname} Summary: A library of functions for file transfer Group: Networking/Other Provides: libcurl%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: rootcerts >= 1:20070713.00 %description -n %{libname} libcurl is a library of functions for sending and receiving files through various protocols, including http and ftp. %package -n %{develname} Summary: Header files and libraries for libcurl Group: Development/C Requires: %{libname} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} Provides: %{name}-devel = %{?epoch:%{epoch}:}%{version}-%{release} Provides: lib%{name}-devel = %{?epoch:%{epoch}:}%{version}-%{release} Provides: libcurl%{major}-devel = %{?epoch:%{epoch}:}%{version}-%{release} Provides: %mklibname %{name} 4 -d %description -n %{develname} libcurl is a library of functions for sending and receiving files through various protocols, including http and ftp. You should install this package if you wish to develop applications that use libcurl. %package examples Summary: Example files for %{name} development Group: Development/C BuildArch: noarch Requires: %{name}-devel >= %{?epoch:%{epoch}:}%{version}-%{release} %description examples Example files for %{name} development. %prep %autosetup -p1 # Remove ldflags from curl-config output sed -i -e 's/@LDFLAGS@\s\+//g' curl-config.in %build %if %{defined patchdate} export CPPFLAGS="$CPPFLAGS -DCURL_PATCHSTAMP='\"%{patchdate}\"'" %endif %cmake \ %if %{?mageia} -DCURL_CA_BUNDLE=%{_sysconfdir}/pki/tls/certs/ca-bundle.crt \ %endif -DCURL_USE_GSASL=ON \ -DCURL_USE_GSSAPI=ON \ -DCURL_USE_GNUTLS=ON \ -DCURL_USE_LIBSSH2=ON \ -DTHREADED_RESOLVER=ON \ -DCURL_COMPLETION_FISH=ON \ -DCURL_COMPLETION_ZSH=ON \ -DENABLE_ARES=ON %cmake_build %if %{with check} %ifnarch %arm %ctest %endif %endif %install %cmake_install rm -f %{buildroot}%{_mandir}/man1/{runtests,testcurl}.1* %files %{_bindir}/curl %{_bindir}/wcurl %{_mandir}/man1/curl.1* %{_mandir}/man1/wcurl.1* %{_datadir}/fish/vendor_completions.d/curl.fish %{_datadir}/zsh/site-functions/_curl %files -n %{libname} %{_libdir}/*.so.%{major}{,.*} %files -n %{develname} %doc docs/BUGS.md docs/KNOWN_BUGS docs/CONTRIBUTE.md docs/FAQ RELEASE-NOTES %doc docs/TODO docs/THANKS docs/INTERNALS.md %{_bindir}/curl-config %{_libdir}/cmake/CURL %{_libdir}/libcurl.so %{_includedir}/curl %{_libdir}/pkgconfig/*.pc %{_mandir}/man1/curl-config.1* %{_mandir}/man3/* %files examples %doc docs/examples