2007-01-15 23:08:21 +00:00
#
2011-08-03 14:03:40 +00:00
# spec file for package curl
2007-01-15 23:08:21 +00:00
#
2016-01-06 13:19:01 +00:00
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
2007-01-15 23:08:21 +00:00
#
2008-09-05 20:26:25 +00: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.
2007-01-15 23:08:21 +00:00
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
2012-01-18 12:51:12 +00:00
2010-10-22 17:36:46 +00:00
%bcond_without openssl
%bcond_with mozilla_nss
%bcond_without testsuite
2007-01-15 23:08:21 +00:00
Name : curl
2016-03-31 17:36:23 +00:00
Version : 7.48.0
2012-05-14 08:01:48 +00:00
Release : 0
Summary : A Tool for Transferring Data from URLs
2012-11-06 08:40:05 +00:00
License : BSD-3-Clause and MIT
2012-05-14 08:01:48 +00:00
Group : Productivity/Networking/Web/Utilities
Url : http://curl.haxx.se/
Source : http://curl.haxx.se/download/%{name} -%{version} .tar.lzma
Source2 : http://curl.haxx.se/download/%{name} -%{version} .tar.lzma.asc
Source3 : baselibs.conf
2012-12-18 10:09:31 +00:00
Source4 : %{name} .keyring
2014-11-15 16:38:21 +00:00
Patch0 : libcurl-ocloexec.patch
2012-05-14 08:01:48 +00:00
Patch1 : dont-mess-with-rpmoptflags.diff
2013-02-18 09:00:56 +00:00
Patch3 : curl-secure-getenv.patch
2016-05-09 07:57:49 +00:00
# PATCH-FIX-UPSTREAM 0001-Fix-invalid-Network-is-unreachable-errors.patch -- Fixes "network is unreachable" errors in valid situations when ipv6 is not working but ipv4 is
Patch4 : 0001-Fix-invalid-Network-is-unreachable-errors.patch
2015-05-21 14:02:13 +00:00
BuildRequires : groff
2014-11-15 16:38:21 +00:00
BuildRequires : krb5-mini-devel
2012-02-02 18:50:23 +00:00
BuildRequires : libtool
2012-01-18 12:50:45 +00:00
BuildRequires : lzma
BuildRequires : openldap2-devel
BuildRequires : pkg-config
2015-02-15 17:07:47 +00:00
BuildRequires : pkgconfig(libidn)
BuildRequires : pkgconfig(libmetalink)
2015-10-19 07:55:37 +00:00
BuildRequires : pkgconfig(libnghttp2)
2016-02-01 08:31:24 +00:00
BuildRequires : pkgconfig(libpsl)
2016-06-06 10:22:45 +00:00
BuildRequires : pkgconfig(libssh2) >= 1.6.0
2015-02-15 17:07:47 +00:00
BuildRequires : pkgconfig(zlib)
2014-11-15 16:38:21 +00:00
Requires : libcurl4 = %{version}
BuildRoot : %{_tmppath} /%{name} -%{version} -build
2010-10-22 17:36:46 +00:00
%if %{with openssl}
2015-02-15 17:07:47 +00:00
BuildRequires : pkgconfig(libssl)
2010-10-22 17:36:46 +00:00
%endif
%if %{with mozilla_nss}
BuildRequires : mozilla-nss-devel
%endif
2014-03-13 13:18:58 +00:00
#BuildRequires: openssh
2008-09-15 10:13:37 +00:00
%if 0%{?_with_stunnel:1}
2007-11-19 09:19:29 +00:00
# used by the testsuite
BuildRequires : stunnel
2008-09-15 10:13:37 +00:00
%endif
2008-11-02 14:37:35 +00:00
# bug437293
%ifarch ppc64
Obsoletes : curl-64bit
%endif
2011-08-15 12:06:41 +00:00
2007-01-15 23:08:21 +00:00
%description
Curl is a client to get documents and files from or send documents to a
2008-09-05 20:26:25 +00: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-15 23:08:21 +00:00
2007-04-12 15:12:15 +00:00
%package -n libcurl4
2011-11-29 08:10:06 +00:00
Summary : Version 4 of cURL shared library
2007-04-12 15:12:15 +00:00
Group : Productivity/Networking/Web/Utilities
%description -n libcurl4
2011-11-29 08:10:06 +00:00
The cURL shared library version 4 for accessing data using different
network protocols.
2007-04-12 15:12:15 +00:00
%package -n libcurl-devel
Summary : A Tool for Transferring Data from URLs
2007-10-09 14:57:38 +00:00
Group : Development/Libraries/C and C++
2012-05-14 08:01:48 +00:00
Requires : glibc-devel
Requires : libcurl4 = %{version}
2007-05-06 15:12:17 +00:00
# curl-devel (v 7.15.5) was last used in 10.2
2007-08-03 13:41:16 +00:00
Provides : curl-devel <= 7.15.5
2007-06-03 19:11:39 +00:00
Obsoletes : curl-devel < 7.16.2
2007-04-12 15:12:15 +00:00
%description -n libcurl-devel
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-15 23:08:21 +00:00
%prep
2011-11-29 08:41:20 +00:00
%setup -q
2014-11-15 16:38:21 +00:00
%patch0
2012-01-18 12:50:45 +00:00
%patch1
2013-02-18 09:00:56 +00:00
%patch3
2016-05-09 07:57:49 +00:00
%patch4 -p1
2014-04-10 09:06:38 +00:00
2007-01-15 23:08:21 +00:00
%build
2013-04-13 15:46:54 +00:00
# curl complains if macro definition is contained in CFLAGS
# see m4/xc-val-flgs.m4
CPPFLAGS=" - D _ F O R T I F Y _ S O U R C E = 2 "
2015-02-26 10:52:00 +00:00
CFLAGS=$(echo " %{optflags} " | sed -e 's/-D_FORTIFY_SOURCE=2//' )
2013-04-13 15:46:54 +00:00
export CPPFLAGS CFLAGS
2015-01-02 15:18:12 +00:00
export CFLAGS=" $ C F L A G S - f P I E "
export LDFLAGS=" $ L D F L A G S - p i e "
2016-02-01 08:31:24 +00:00
autoreconf -fiv
2015-10-19 09:39:40 +00: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 07:42:51 +00:00
%configure \
2015-12-02 12:46:01 +00:00
--enable-ipv6 \
2010-10-22 17:36:46 +00:00
%if %{with openssl}
2015-12-02 12:46:01 +00:00
--with-ssl \
2016-03-31 17:36:23 +00:00
--with-ca-fallback \
2015-12-02 12:46:01 +00:00
--without-ca-path \
--without-ca-bundle \
2010-10-22 17:36:46 +00:00
%else
2015-12-02 12:46:01 +00:00
--without-ssl \
2010-10-22 17:36:46 +00:00
%if %{with mozilla_nss}
2015-12-02 12:46:01 +00:00
--with-nss \
2010-10-22 17:36:46 +00:00
%endif
%endif
2015-12-02 12:46:01 +00:00
--with-gssapi=%{_libexecdir} /mit \
--with-libssh2\
--enable-hidden-symbols \
--disable-static \
--enable-threaded-resolver \
--with-libmetalink
2011-04-09 21:16:06 +00:00
2015-10-19 09:39:40 +00:00
# if this fails, the above sed hack did not work
./libtool --config | grep -q link_all_deplibs=no
2007-05-23 15:37:15 +00:00
# enable-hidden-symbols needs gcc4 and causes that curl exports only its API
2016-02-01 08:31:24 +00:00
make %{?_smp_mflags} V=1
2010-10-22 17:36:46 +00:00
%if %{with testsuite}
%check
2015-02-26 10:52:00 +00:00
pushd tests
2014-11-15 16:38:21 +00:00
make %{?_smp_mflags}
2007-07-10 15:25:05 +00:00
# make sure the testsuite runs don't race on MP machines in autobuild
if test -z " $ B U I L D _ I N C A R N A T I O N " -a -r /.buildenv; then
. /.buildenv
fi
if test -z " $ B U I L D _ I N C A R N A T I O N " ; then
BUILD_INCARNATION=0
fi
2015-08-01 08:40:59 +00:00
2007-07-10 15:25:05 +00:00
base=$((8990 + $BUILD_INCARNATION * 20))
2015-08-01 08:40:59 +00:00
# bug940009 do not run flaky tests for any architecture
# at least test 1510 do fail for i586 and ppc64le
perl ./runtests.pl -a -b$base '!flaky' || exit
2015-02-26 10:52:00 +00:00
popd
2015-05-21 14:02:13 +00:00
%endif
2007-01-15 23:08:21 +00:00
%install
2015-02-26 10:52:00 +00:00
%make_install
rm -f %{buildroot} %{_libdir} /libcurl.la
install -Dm 0644 docs/libcurl/libcurl.m4 %{buildroot} %{_datadir} /aclocal/libcurl.m4
2007-01-15 23:08:21 +00:00
2007-06-03 19:11:39 +00:00
%post -n libcurl4 -p /sbin/ldconfig
2007-01-15 23:08:21 +00:00
2007-06-03 19:11:39 +00:00
%postun -n libcurl4 -p /sbin/ldconfig
2007-01-15 23:08:21 +00:00
%files
%defattr (-,root,root)
2007-10-09 14:57:38 +00:00
%doc README RELEASE-NOTES
%doc docs/{BUGS,FAQ,FEATURES,MANUAL,RESOURCES,TODO,TheArtOfHttpScripting}
2014-11-15 16:38:21 +00:00
%{_bindir} /curl
2015-12-02 12:46:01 +00:00
%{_datadir} /zsh/site-functions/_curl
2015-05-21 14:02:13 +00:00
%{_mandir} /man1/curl.1%{ext_man}
2015-12-02 13:16:36 +00:00
%dir %{_datadir} /zsh
2015-12-02 13:30:58 +00:00
%dir %{_datadir} /zsh/site-functions
2007-01-15 23:08:21 +00:00
2007-04-12 15:12:15 +00:00
%files -n libcurl4
%defattr (-,root,root)
%{_libdir} /libcurl.so.4*
%files -n libcurl-devel
2007-01-15 23:08:21 +00:00
%defattr (-,root,root)
2014-11-15 16:38:21 +00:00
%{_bindir} /curl-config
%{_includedir} /curl
2015-02-26 10:52:00 +00:00
%dir %{_datadir} /aclocal/
2014-11-15 16:38:21 +00:00
%{_datadir} /aclocal/libcurl.m4
2007-01-15 23:08:21 +00:00
%{_libdir} /libcurl.so
%{_libdir} /pkgconfig/libcurl.pc
2012-07-30 07:42:51 +00:00
%{_mandir} /man1/curl-config.1%{ext_man}
%{_mandir} /man3/*
2009-03-03 21:12:52 +00:00
%doc docs/libcurl/symbols-in-versions
2007-12-12 17:05:45 +00:00
2007-02-16 17:20:49 +00:00
%changelog