2007-01-16 00:08:21 +01:00
|
|
|
#
|
2011-08-03 16:03:40 +02:00
|
|
|
# spec file for package curl
|
2007-01-16 00:08:21 +01:00
|
|
|
#
|
2022-01-10 10:11:10 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2007-01-16 00:08:21 +01:00
|
|
|
#
|
2008-09-05 22:26:25 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-10-31 12:23:21 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-16 00:08:21 +01:00
|
|
|
#
|
|
|
|
|
2012-01-18 13:51:12 +01:00
|
|
|
|
2010-10-22 19:36:46 +02:00
|
|
|
%bcond_without testsuite
|
2018-02-20 10:49:49 +01:00
|
|
|
%bcond_with mozilla_nss
|
|
|
|
# need ssl always for python-pycurl
|
|
|
|
%bcond_without openssl
|
2007-01-16 00:08:21 +01:00
|
|
|
Name: curl
|
2022-08-31 13:55:07 +02:00
|
|
|
Version: 7.85.0
|
2012-05-14 10:01:48 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: A Tool for Transferring Data from URLs
|
2017-06-28 21:20:16 +02:00
|
|
|
License: curl
|
2020-12-19 19:24:38 +01:00
|
|
|
URL: https://curl.se
|
|
|
|
Source: https://curl.se/download/curl-%{version}.tar.xz
|
|
|
|
Source2: https://curl.se/download/curl-%{version}.tar.xz.asc
|
2012-05-14 10:01:48 +02:00
|
|
|
Source3: baselibs.conf
|
2017-06-14 11:42:26 +02:00
|
|
|
Source4: https://daniel.haxx.se/mykey.asc#/curl.keyring
|
2014-11-15 17:38:21 +01:00
|
|
|
Patch0: libcurl-ocloexec.patch
|
2022-04-27 11:43:43 +02:00
|
|
|
Patch1: dont-mess-with-rpmoptflags.patch
|
2017-02-22 14:26:22 +01:00
|
|
|
Patch2: curl-secure-getenv.patch
|
2022-03-11 18:48:51 +01:00
|
|
|
#PATCH-FIX-OPENSUSE bsc#1076446 protocol redirection not supported or disabled
|
2020-12-19 19:24:38 +01:00
|
|
|
Patch3: curl-disabled-redirect-protocol-message.patch
|
2017-06-14 11:42:26 +02:00
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: pkgconfig
|
2020-02-18 15:31:05 +01:00
|
|
|
Requires: libcurl4 = %{version}
|
2015-05-21 16:02:13 +02:00
|
|
|
BuildRequires: groff
|
2012-01-18 13:50:45 +01:00
|
|
|
BuildRequires: lzma
|
|
|
|
BuildRequires: openldap2-devel
|
2019-11-06 19:43:40 +01:00
|
|
|
BuildRequires: pkgconfig(krb5)
|
2020-12-21 19:23:18 +01:00
|
|
|
BuildRequires: pkgconfig(libbrotlidec)
|
2019-11-06 19:43:40 +01:00
|
|
|
BuildRequires: pkgconfig(libidn2)
|
2021-11-19 09:25:50 +01:00
|
|
|
# Disable metalink [bsc#1188218, CVE-2021-22923][bsc#1188217, CVE-2021-22922]
|
2021-07-21 09:38:07 +02:00
|
|
|
# BuildRequires: pkgconfig(libmetalink)
|
2015-10-19 09:55:37 +02:00
|
|
|
BuildRequires: pkgconfig(libnghttp2)
|
2016-02-01 09:31:24 +01:00
|
|
|
BuildRequires: pkgconfig(libpsl)
|
2018-01-24 20:57:28 +01:00
|
|
|
BuildRequires: pkgconfig(libssh)
|
2020-12-21 19:23:18 +01:00
|
|
|
BuildRequires: pkgconfig(libzstd)
|
2015-02-15 18:07:47 +01:00
|
|
|
BuildRequires: pkgconfig(zlib)
|
2010-10-22 19:36:46 +02:00
|
|
|
%if %{with openssl}
|
2015-02-15 18:07:47 +01:00
|
|
|
BuildRequires: pkgconfig(libssl)
|
2010-10-22 19:36:46 +02:00
|
|
|
%endif
|
|
|
|
%if %{with mozilla_nss}
|
|
|
|
BuildRequires: mozilla-nss-devel
|
|
|
|
%endif
|
2014-03-13 14:18:58 +01:00
|
|
|
#BuildRequires: openssh
|
2008-09-15 12:13:37 +02:00
|
|
|
%if 0%{?_with_stunnel:1}
|
2007-11-19 10:19:29 +01:00
|
|
|
# used by the testsuite
|
|
|
|
BuildRequires: stunnel
|
2008-09-15 12:13:37 +02:00
|
|
|
%endif
|
2011-08-15 14:06:41 +02:00
|
|
|
|
2007-01-16 00:08:21 +01:00
|
|
|
%description
|
|
|
|
Curl is a client to get documents and files from or send documents to a
|
2008-09-05 22:26:25 +02:00
|
|
|
server using any of the supported protocols (HTTP, HTTPS, FTP, FTPS,
|
|
|
|
TFTP, DICT, TELNET, LDAP, or FILE). The command is designed to work
|
|
|
|
without user interaction or any kind of interactivity.
|
2007-01-16 00:08:21 +01:00
|
|
|
|
2020-02-18 15:31:05 +01:00
|
|
|
%package -n libcurl4
|
2019-01-28 21:39:11 +01:00
|
|
|
Summary: Library for transferring data from URLs
|
2007-04-12 17:12:15 +02:00
|
|
|
|
2020-02-18 15:31:05 +01:00
|
|
|
%description -n libcurl4
|
2019-01-28 21:39:11 +01:00
|
|
|
The cURL shared library for accessing data using different
|
2011-11-29 09:10:06 +01:00
|
|
|
network protocols.
|
2007-04-12 17:12:15 +02:00
|
|
|
|
2020-02-18 15:31:05 +01:00
|
|
|
%package -n libcurl-devel
|
2019-01-28 21:39:11 +01:00
|
|
|
Summary: Development files for the curl library
|
2012-05-14 10:01:48 +02:00
|
|
|
Requires: glibc-devel
|
2020-02-18 15:31:05 +01:00
|
|
|
Requires: libcurl4 = %{version}
|
2020-10-19 11:58:55 +02:00
|
|
|
Provides: curl-devel = %{version}
|
|
|
|
Obsoletes: curl-devel < %{version}
|
2007-04-12 17:12:15 +02:00
|
|
|
|
2020-02-18 15:31:05 +01:00
|
|
|
%description -n libcurl-devel
|
2007-04-12 17:12:15 +02:00
|
|
|
Curl is a client to get documents and files from or send documents to a
|
|
|
|
server using any of the supported protocols (HTTP, HTTPS, FTP, GOPHER,
|
|
|
|
DICT, TELNET, LDAP, or FILE). The command is designed to work without
|
|
|
|
user interaction or any kind of interactivity.
|
2007-01-16 00:08:21 +01:00
|
|
|
|
|
|
|
%prep
|
2018-02-20 10:49:49 +01:00
|
|
|
%setup -q -n curl-%{version}
|
2022-04-27 11:43:43 +02:00
|
|
|
%autopatch -p1
|
2019-07-17 13:56:03 +02:00
|
|
|
|
2007-01-16 00:08:21 +01:00
|
|
|
%build
|
2013-04-13 17:46:54 +02:00
|
|
|
# curl complains if macro definition is contained in CFLAGS
|
|
|
|
# see m4/xc-val-flgs.m4
|
|
|
|
CPPFLAGS="-D_FORTIFY_SOURCE=2"
|
2015-02-26 11:52:00 +01:00
|
|
|
CFLAGS=$(echo "%{optflags}" | sed -e 's/-D_FORTIFY_SOURCE=2//')
|
2020-12-19 19:24:38 +01:00
|
|
|
export CPPFLAGS
|
2015-01-02 16:18:12 +01:00
|
|
|
export CFLAGS="$CFLAGS -fPIE"
|
2021-03-05 08:59:37 +01:00
|
|
|
export LDFLAGS="$LDFLAGS -Wl,-z,defs,-z,now,-z,relro -pie"
|
2016-02-01 09:31:24 +01:00
|
|
|
autoreconf -fiv
|
2015-10-19 11:39:40 +02:00
|
|
|
# local hack to make curl-config --libs stop printing libraries it depends on
|
|
|
|
# (currently, libtool sets link_all_deplibs=(yes|unknown) everywhere,
|
|
|
|
# will hopefully change in the future)
|
|
|
|
sed -i 's/\(link_all_deplibs=\)unknown/\1no/' configure
|
2012-07-30 09:42:51 +02:00
|
|
|
%configure \
|
2015-12-02 13:46:01 +01:00
|
|
|
--enable-ipv6 \
|
2010-10-22 19:36:46 +02:00
|
|
|
%if %{with openssl}
|
2021-11-19 09:25:50 +01:00
|
|
|
--with-openssl \
|
2016-03-31 19:36:23 +02:00
|
|
|
--with-ca-fallback \
|
2015-12-02 13:46:01 +01:00
|
|
|
--without-ca-path \
|
|
|
|
--without-ca-bundle \
|
2010-10-22 19:36:46 +02:00
|
|
|
%else
|
2021-11-19 09:25:50 +01:00
|
|
|
--without-openssl \
|
2010-10-22 19:36:46 +02:00
|
|
|
%if %{with mozilla_nss}
|
2015-12-02 13:46:01 +01:00
|
|
|
--with-nss \
|
2010-10-22 19:36:46 +02:00
|
|
|
%endif
|
|
|
|
%endif
|
2020-06-15 16:56:44 +02:00
|
|
|
--with-gssapi=$(krb5-config --prefix) \
|
2017-02-22 14:26:22 +01:00
|
|
|
--with-libidn2 \
|
2018-01-24 20:57:28 +01:00
|
|
|
--with-libssh \
|
2015-12-02 13:46:01 +01:00
|
|
|
--enable-hidden-symbols \
|
|
|
|
--disable-static \
|
2017-06-14 11:42:26 +02:00
|
|
|
--enable-threaded-resolver
|
2011-04-09 23:16:06 +02:00
|
|
|
|
2015-10-19 11:39:40 +02:00
|
|
|
# if this fails, the above sed hack did not work
|
|
|
|
./libtool --config | grep -q link_all_deplibs=no
|
2007-05-23 17:37:15 +02:00
|
|
|
# enable-hidden-symbols needs gcc4 and causes that curl exports only its API
|
2020-12-19 19:24:38 +01:00
|
|
|
%make_build
|
2010-10-22 19:36:46 +02:00
|
|
|
|
|
|
|
%if %{with testsuite}
|
|
|
|
%check
|
2015-02-26 11:52:00 +01:00
|
|
|
pushd tests
|
2020-12-19 19:24:38 +01:00
|
|
|
%make_build
|
|
|
|
|
|
|
|
find -type f -name "*.pl" -exec sed -i 's|#!.*/usr/bin/env perl|#!/usr/bin/perl|' "{}" +
|
|
|
|
find -type f -name "*.py" -exec sed -i 's|#!.*/usr/bin/env python.*|#!/usr/bin/python3|' "{}" +
|
2015-08-01 10:40:59 +02:00
|
|
|
|
2020-12-19 19:24:38 +01:00
|
|
|
perl ./runtests.pl -a -v -p '!flaky' || exit
|
2015-02-26 11:52:00 +01:00
|
|
|
popd
|
2015-05-21 16:02:13 +02:00
|
|
|
%endif
|
2007-01-16 00:08:21 +01:00
|
|
|
|
|
|
|
%install
|
2015-02-26 11:52:00 +01:00
|
|
|
%make_install
|
|
|
|
rm -f %{buildroot}%{_libdir}/libcurl.la
|
|
|
|
install -Dm 0644 docs/libcurl/libcurl.m4 %{buildroot}%{_datadir}/aclocal/libcurl.m4
|
2016-06-17 15:15:20 +02:00
|
|
|
pushd scripts
|
2018-02-20 10:49:49 +01:00
|
|
|
%make_install
|
2016-06-17 15:15:20 +02:00
|
|
|
popd
|
2007-01-16 00:08:21 +01:00
|
|
|
|
2020-02-18 15:31:05 +01:00
|
|
|
%post -n libcurl4 -p /sbin/ldconfig
|
|
|
|
%postun -n libcurl4 -p /sbin/ldconfig
|
2007-01-16 00:08:21 +01:00
|
|
|
|
|
|
|
%files
|
2020-10-19 11:58:55 +02:00
|
|
|
%doc README RELEASE-NOTES CHANGES
|
2020-12-19 19:24:38 +01:00
|
|
|
%doc docs/{BUGS.md,FAQ,FEATURES.md,TODO,TheArtOfHttpScripting.md}
|
2014-11-15 17:38:21 +01:00
|
|
|
%{_bindir}/curl
|
2015-12-02 13:46:01 +01:00
|
|
|
%{_datadir}/zsh/site-functions/_curl
|
2019-11-06 19:43:40 +01:00
|
|
|
%{_mandir}/man1/curl.1%{?ext_man}
|
2015-12-02 14:16:36 +01:00
|
|
|
%dir %{_datadir}/zsh
|
2015-12-02 14:30:58 +01:00
|
|
|
%dir %{_datadir}/zsh/site-functions
|
2019-04-10 21:12:39 +02:00
|
|
|
%dir %{_datadir}/fish/
|
2019-05-22 19:50:36 +02:00
|
|
|
%dir %{_datadir}/fish/vendor_completions.d/
|
|
|
|
%{_datadir}/fish/vendor_completions.d/curl.fish
|
2007-01-16 00:08:21 +01:00
|
|
|
|
2020-02-18 15:31:05 +01:00
|
|
|
%files -n libcurl4
|
2018-02-20 10:49:49 +01:00
|
|
|
%license COPYING
|
2007-04-12 17:12:15 +02:00
|
|
|
%{_libdir}/libcurl.so.4*
|
|
|
|
|
2020-02-18 15:31:05 +01:00
|
|
|
%files -n libcurl-devel
|
2014-11-15 17:38:21 +01:00
|
|
|
%{_bindir}/curl-config
|
|
|
|
%{_includedir}/curl
|
2015-02-26 11:52:00 +01:00
|
|
|
%dir %{_datadir}/aclocal/
|
2014-11-15 17:38:21 +01:00
|
|
|
%{_datadir}/aclocal/libcurl.m4
|
2007-01-16 00:08:21 +01:00
|
|
|
%{_libdir}/libcurl.so
|
|
|
|
%{_libdir}/pkgconfig/libcurl.pc
|
2019-11-06 19:43:40 +01:00
|
|
|
%{_mandir}/man1/curl-config.1%{?ext_man}
|
2012-07-30 09:42:51 +02:00
|
|
|
%{_mandir}/man3/*
|
2009-03-03 22:12:52 +01:00
|
|
|
%doc docs/libcurl/symbols-in-versions
|
2007-12-12 18:05:45 +01:00
|
|
|
|
2007-02-16 18:20:49 +01:00
|
|
|
%changelog
|