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
#
2012-01-18 12:50:45 +00:00
# Copyright (c) 2012 SUSE LINUX Products 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
2008-02-25 16:03:38 +00:00
2007-01-15 23:08:21 +00:00
Name : curl
2012-07-30 07:42:51 +00:00
Version : 7.27.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
Patch : libcurl-ocloexec.patch
Patch1 : dont-mess-with-rpmoptflags.diff
2012-11-06 08:40:05 +00:00
# PATCH-FIX-UPSTREAM curl-ftp-prevent-the-multi-interface-from-blocking.patch sf#3579064 gber@opensuse.org -- Prevent the multi interface from blocking when using ftp and the remote end responds very slowly (backported from upstream git)
Patch2 : curl-ftp-prevent-the-multi-interface-from-blocking.patch
2012-01-18 12:50:45 +00:00
BuildRequires : libidn-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
BuildRequires : zlib-devel
2010-10-22 17:36:46 +00:00
%if %{with openssl}
BuildRequires : openssl-devel
%endif
%if %{with mozilla_nss}
BuildRequires : mozilla-nss-devel
%endif
2008-04-12 18:31:48 +00:00
BuildRequires : krb5-devel
2012-05-14 08:01:48 +00:00
BuildRequires : libcares-devel
2012-01-18 12:50:45 +00:00
BuildRequires : libssh2-devel
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
2012-05-14 08:01:48 +00:00
BuildRoot : %{_tmppath} /%{name} -%{version} -build
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
2012-02-02 18:50:23 +00:00
%patch
2012-01-18 12:50:45 +00:00
%patch1
2012-11-06 08:40:05 +00:00
%patch2 -p1
2011-08-15 12:06:41 +00:00
2007-01-15 23:08:21 +00:00
%build
2012-01-18 12:51:12 +00:00
autoreconf -fi
2008-01-30 17:04:20 +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/link_all_deplibs=no/' configure
2012-07-30 07:42:51 +00:00
%configure \
2007-02-02 15:10:02 +00:00
--enable-ipv6 \
2010-10-22 17:36:46 +00:00
%if %{with openssl}
2007-02-02 15:10:02 +00:00
--with-ssl \
2008-04-02 20:39:36 +00:00
--with-ca-path=/etc/ssl/certs/ \
2010-10-22 17:36:46 +00:00
%else
--without-ssl \
%if %{with mozilla_nss}
--with-nss \
%endif
%endif
2008-03-07 19:54:59 +00:00
--with-gssapi=/usr/lib/mit \
2010-03-26 15:17:01 +00:00
--with-libssh2\
2007-02-02 15:10:02 +00:00
--enable-hidden-symbols \
2011-04-09 21:16:06 +00:00
--disable-static \
2012-02-08 00:47:02 +00:00
--enable-threaded-resolver
2011-04-09 21:16:06 +00:00
2008-01-30 17:04:20 +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
2011-09-18 18:45:34 +00:00
make %{?_smp_mflags}
2010-10-22 17:36:46 +00:00
%if %{with testsuite}
%check
2007-07-10 15:25:05 +00:00
cd tests
make
# 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
base=$((8990 + $BUILD_INCARNATION * 20))
2008-09-12 21:53:11 +00:00
perl ./runtests.pl -a -b$base || {
2009-05-19 21:14:51 +00:00
%if 0%{?curl_testsuite_fatal:1}
2008-02-25 16:03:38 +00:00
exit
2009-05-19 21:14:51 +00:00
%else
echo " W A R N I N G : r u n t e s t s . p l f a i l e d w i t h c o d e $ ? , c o n t i n u i n g n e v e r t h e l e s s "
2008-02-25 16:03:38 +00:00
%endif
}
2010-10-22 17:36:46 +00:00
%endif
2007-01-15 23:08:21 +00:00
%install
2011-07-11 11:18:11 +00:00
%{makeinstall}
2007-02-02 15:10:02 +00:00
rm $RPM_BUILD_ROOT %_libdir /libcurl.la
2007-06-04 22:46:50 +00:00
install -d $RPM_BUILD_ROOT /usr/share/aclocal
install -m 644 docs/libcurl/libcurl.m4 $RPM_BUILD_ROOT /usr/share/aclocal/
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}
2008-09-05 20:26:25 +00:00
%doc lib/README.curl_off_t
2007-01-15 23:08:21 +00:00
%{_prefix} /bin/curl
2012-07-30 07:42:51 +00:00
%doc %{_mandir} /man1/curl.1%{ext_man}
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)
%{_prefix} /bin/curl-config
%{_prefix} /include/curl
2011-12-28 11:33:17 +00:00
%dir %{_prefix} /share/aclocal
2007-06-04 22:46:50 +00:00
%{_prefix} /share/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} /man1/mk-ca-bundle.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