File compat-curl3.spec of Package compat-curl3

#
# spec file for package curl
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%bcond_without openssl
%bcond_with mozilla_nss
%bcond_without testsuite

Name:           compat-curl3
%define rname	curl
%define lname	libcurl3
BuildRequires:  libidn-devel
BuildRequires:  libtool
BuildRequires:  lzma
BuildRequires:  openldap2-devel
BuildRequires:  pkg-config
BuildRequires:  zlib-devel
%if %{with openssl}
BuildRequires:  openssl-devel
%endif
%if %{with mozilla_nss}
BuildRequires:  mozilla-nss-devel
%endif
BuildRequires:  krb5-devel
BuildRequires:  libssh2-devel
BuildRequires:  openssh
BuildRequires:  libcares-devel
%if 0%{?_with_stunnel:1}
# used by the testsuite
BuildRequires:  stunnel
%endif
Version:        7.15.5
Release:        1.1
# bug437293
%ifarch ppc64
Obsoletes:      curl-64bit
%endif
#
Summary:        A Tool for Transferring Data from URLs
License:        BSD-3-Clause ; MIT
Group:          Productivity/Networking/Web/Utilities
Url:            http://curl.haxx.se/
Source:         http://curl.haxx.se/download/%rname-%version.tar.bz2
Source2:        baselibs.conf
BuildRoot:      %_tmppath/%name-%version-build
Patch2:         %rname-7.15.1-lfs.patch
Patch3:         %rname-7.15.1-ipv6tests.patch

%description
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, FTPS,
TFTP, DICT, TELNET, LDAP, or FILE). The command is designed to work
without user interaction or any kind of interactivity.

%package -n %lname
Summary:        Version 4 of cURL shared library
Group:          Productivity/Networking/Web/Utilities

%description -n %lname
The cURL shared library version 4 for accessing data using different
network protocols.

%package -n compat-curl3-devel
Summary:        A Tool for Transferring Data from URLs
Group:          Development/Libraries/C and C++
Requires:       %lname = %{version} glibc-devel

%description -n compat-curl3-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.

%prep
%setup -qn curl-%version
%patch2
%patch3

%build
autoreconf -fi
# 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
%configure \
	--enable-ipv6 \
%if %{with openssl}
	--with-ssl \
	--with-ca-path=/etc/ssl/certs/ \
%else
	--without-ssl \
%if %{with mozilla_nss}
	--with-nss \
%endif
%endif
	--with-gssapi=/usr/lib/mit \
	--with-libssh2\
	--enable-hidden-symbols \
	--disable-static \
    --enable-threaded-resolver

: if this fails, the above sed hack did not work
./libtool --config | grep -q link_all_deplibs=no
# enable-hidden-symbols needs gcc4 and causes that curl exports only its API
make %{?_smp_mflags}

%if %{with testsuite}

%check
exit 0
cd tests
make
# make sure the testsuite runs don't race on MP machines in autobuild
if test -z "$BUILD_INCARNATION" -a -r /.buildenv; then
	. /.buildenv
fi
if test -z "$BUILD_INCARNATION"; then
	BUILD_INCARNATION=0
fi
base=$((8990 + $BUILD_INCARNATION * 20))
perl ./runtests.pl -a -b$base || {
%if 0%{?curl_testsuite_fatal:1}
	exit
%else
	echo "WARNING: runtests.pl failed with code $?, continuing nevertheless"
%endif
}
%endif

%install
%{makeinstall}
rm $RPM_BUILD_ROOT%_libdir/libcurl.la
install -d $RPM_BUILD_ROOT/usr/share/aclocal
install -m 644 docs/libcurl/libcurl.m4 $RPM_BUILD_ROOT/usr/share/aclocal/
rm -f "%buildroot/%_datadir/curl/curl-ca-bundle.crt"
rm -f "%buildroot/%_libdir/pkgconfig"/*.pc;

%post -n %lname -p /sbin/ldconfig

%postun -n %lname -p /sbin/ldconfig

%files
%defattr(-,root,root)
#doc README RELEASE-NOTES
#doc docs/{BUGS,FAQ,FEATURES,MANUAL,RESOURCES,TODO,TheArtOfHttpScripting}
#doc lib/README.curl_off_t
%{_prefix}/bin/curl
%doc %{_mandir}/man1/curl.1.gz

%files -n %lname
%defattr(-,root,root)
%{_libdir}/libcurl.so.3*

%files -n compat-curl3-devel
%defattr(-,root,root)
%{_prefix}/bin/curl-config
%{_prefix}/include/curl
%dir %{_prefix}/share/aclocal
%{_prefix}/share/aclocal/libcurl.m4
%{_libdir}/libcurl.so
#%{_libdir}/pkgconfig/libcurl.pc
%doc %{_mandir}/man1/curl-config.1.gz
%doc %{_mandir}/man3/*
#doc docs/libcurl/symbols-in-versions

%changelog
* Tue Aug 15 2006 mmarek@suse.cz
- configure with --enable-hidden-symbols to compile libcurl with
  - fvisibility=hidden, exporting only symbols from the API
* Tue Aug 15 2006 mmarek@suse.cz
- updated to version 7.15.5
  * added --ftp-ssl-reqd
  * modified the prototype for the socket callback set with
    CURLMOPT_SOCKETFUNCTION
  * added curl_multi_assign()
  * added CURLOPT_FTP_ALTERNATIVE_TO_USER and --ftp-alternative-to-user
  * added a vcproj file for building libcurl
  * added curl_formget()
  * added CURLOPT_MAX_SEND_SPEED_LARGE and CURLOPT_MAX_RECV_SPEED_LARGE
  * Made -K on a file that couldn't be read cause a warning to be displayed
  * some bugfixes
- dropped epsv-firewall.patch which was intergrated in 7.15.2
* Sat Jul  1 2006 cthiel@suse.de
- update to version 7.15.4, changes & fixes for this version:
  * NTLM2 session response support
  * CURLOPT_COOKIELIST set to "SESS" clears all session cookies
  * CURLINFO_LASTSOCKET returned sockets are now checked more before
    returned
  * curl-config got a --checkfor option to compare version numbers
  * line end conversions for FTP ASCII transfers
  * curl_multi_socket() API added (still mostly untested)
  * conversion callback options for EBCDIC <=> ASCII conversions
  * added CURLINFO_FTP_ENTRY_PATH
  * less blocking for the multi interface during (Open)SSL connect
    negotiation
  * builds fine on cygwin
  * md5-sess with Digest authentication
  * dict with letters such as space in a word
  * dict with url-encoded words in the URL
  * libcurl.m4 when default=yes but no libcurl was found
  * numerous bugs fixed in the TFTP code
  * possible memory leak when adding easy handles to multi stack
  * TFTP works in a more portable fashion (== on more platforms)
  * WSAGetLastError() is now used (better) on Windows
  * GnuTLS non-block case that could cause data trashing
  * deflate code survives lack of zlib header
  * CURLOPT_INTERFACE works with hostname
  * configure runs fine with ICC
  * closed control connection with FTP when easy handle was removed from
    multi
  * curl --trace crash when built with VS2005
  * SSL connect time-out
  * improved NTLM functionality
  * following redirects with more than one question mark in source URL
  * fixed debug build crash with -d
  * generates a fine AIX Toolbox RPM spec
  * treat FTP AUTH failures properly
  * TFTP transfers could trash data
  * -d + -G combo crash
* Wed Jun 14 2006 mmarek@suse.cz
- fixed syntax error in configure
* Sun May 28 2006 cthiel@suse.de
- update to version 7.15.3, changes & fixes for this version:
  * added docs for --ftp-method and CURLOPT_FTP_FILEMETHOD
  * TFTP Packet Buffer Overflow Vulnerability (CVE-2006-1061)
  * properly detecting problems with sending the FTP command USER
  * wrong error message shown when certificate verification failed
  * multi-part formpost with multi interface crash
  * the CURLFTPSSL_CONTROL setting for CURLOPT_FTP_SSL is acknowledged
  * "SSL: couldn't set callback" is now treated as a less serious problem
  * Interix build fix
  * fixed curl "hang" when out of file handles at start
  * prevent FTP uploads to URLs with trailing slash
- changes & fixes in 7.15.2
  * Support for SOCKS4 proxies (added --socks4)
  * CURLOPT_CONNECT_ONLY and CURLINFO_LASTSOCKET added
  * CURLOPT_LOCALPORT and CURLOPT_LOCALPORTRANGE (--local-port) added
  * Dropped support for the LPRT ftp command
  * Gopher is now officially abandoned as a protocol (lib)curl tries to
    support
  * curl_global_init() and curl_global_cleanup() are now using a refcount so
    that it is now legal to call them multiple times. See updated info for
    details
  * two bugs concerning using curl_multi_remove_handle() before the transfer
    was complete
  * multi-pass authentication and compressed content
  * minor format string mistake in the GSS/Negotiate code
  * cached DNS entries could remain in the cache too long
  * improved GnuTLS check in configure
  * re-used FTP connections when the second request didn't do a transfer
  * plain --limit-rate [num] means bytes
  * re-creating a dead connection is no longer counted internally as a
    followed redirect and thus prevents a weird error that would occur if a
    FTP connection died on an attempted re-use
  * Try PASV after failing to connect to the port the EPSV response
    contained
  * -P [IP] with non-local address with ipv6-enabled curl
  * -P [hostname] with ipv6-disabled curl
  * libcurl.m4 was updated
  * configure no longer warns if the current path contains a space
  * test suite kill race condition
  * FTP_SKIP_PASV_IP and FTP_USE_EPSV when doing FTP over HTTP proxy
  * Doing a second request with FTP on the same bath path, would make
    libcurl confuse what current working directory it had
  * FTP over HTTP proxy now sends the second CONNECT properly
  * numerous compiler warnings and build quirks for various compilers have
    been addressed
  * supports name and passwords up to 255 bytes long, embedded in URLs
  * the HTTP_ONLY define disables the TFTP support
- removed curl-7.15.1-CVE-2006-1061.patch, included upstream
- removed curl-7.15.1-aliasing.patch
* Tue Mar 14 2006 mmarek@suse.cz
- fix buffer overflow in TFTP code
  [#157874] (CVE-2006-1061.patch)
* Wed Feb 15 2006 ro@suse.de
- added libidn-devel to requires of devel package
* Mon Feb 13 2006 mmarek@suse.cz
- build with libidn support
  [#150313]
* Fri Jan 27 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Jan 23 2006 mmarek@suse.cz
- fallback to PASV if some firewall doesn't let an EPSV connection
  trough
* Thu Jan 12 2006 mmarek@suse.cz
- build with -fstack-protector
- add dependency on curl = %%%%{version} to curl-devel
* Tue Jan 10 2006 mmarek@suse.cz
- remove non-existent path /usr/ssl, which caused -L/usr/ssl/lib to
  appeared in curl-config output
- use make -j
* Tue Dec 13 2005 mmarek@suse.cz
- updated to 7.15.1, fixing previous vulnerabilities
* Thu Oct 13 2005 mmarek@suse.cz
- fix stack buffer overflow in lib/http_ntlm.c [#128065]
* Mon Oct 10 2005 mmarek@suse.cz
- updated to 7.14.1
- updated curl-7.14.1-aliasing.patch
* Mon Jun 20 2005 anicka@suse.cz
- update to 7.14.0
- remove obsolete patch curl-ntlm.patch
* Tue Apr 12 2005 tcrhak@suse.cz
- packaged curl-ca-bundle.crt (bug #64301)
* Thu Feb 24 2005 meissner@suse.de
- enable make test. fixed test 241 to use ::1 directly.
* Tue Feb 22 2005 mcihar@suse.cz
- fix buffer overflow in NTLM (bug #65752)
* Tue Feb  8 2005 mcihar@suse.cz
- update to 7.13.0
* Wed Aug 11 2004 tcrhak@suse.cz
- update to 7.12.0
* Wed Apr 28 2004 tcrhak@suse.cz
- strict aliasing fix
* Tue Mar 16 2004 tcrhak@suse.cz
- fix for lfs for in transfer.c (bug #36040)
* Wed Feb 25 2004 tcrhak@suse.cz
- ignore leading slashes of url-path in URLs like
  ftp://user@name//url-path, i.e don't change to the
  root directory (RFC 1738, bug #34471)
* Tue Feb 10 2004 tcrhak@suse.cz
- update to version 7.11.0
* Sat Jan 10 2004 adrian@suse.de
- add %%defattr and %%run_ldconfig
* Wed Nov  5 2003 tcrhak@suse.cz
- added large file support, patch lfs [bug #32411]
* Thu Sep  4 2003 tcrhak@suse.cz
- require zlib-devel, openssl-devel and glibc-devel in curl-devel [bug #29881]
* Fri Aug  8 2003 tcrhak@suse.cz
- terminate array of directory components by NULL (bug #28351, patch dirs)
* Wed Jul 23 2003 tcrhak@suse.cz
- update to version 7.10.5
* Tue Jun  3 2003 ro@suse.de
- remove unpackaged files from buildroot
* Wed Nov 27 2002 tcrhak@suse.cz
- update to version 7.10.2
- moved curl-config.1.gz to the devel subpackage [bug #21966]
* Sat Jul 13 2002 tcrhak@suse.cz
- update to version 7.9.8
- added automake
* Fri Jan 18 2002 tcrhak@suse.cz
- used macros %%{_lib} and %%{_libdir}
- update to 7.9.2
* Fri Oct 19 2001 ro@suse.de
- do not pack shared library into both, main and devel package
* Mon Oct  8 2001 tcrhak@suse.cz
- update to version 7.9
* Fri Sep 21 2001 adostal@suse.cz
- fix manual in man.patch
* Tue Aug 21 2001 adostal@suse.cz
- update to version 7.8.1
* Wed Jul 18 2001 adostal@suse.cz
- files devel fixed
* Mon Jul  2 2001 adostal@suse.cz
- update to version 7.8
* Wed Jun 13 2001 ro@suse.de
- fixed to compile with new autoconf
* Mon Apr  9 2001 cihlar@suse.cz
- update to version 7.7.1
* Tue Mar  6 2001 cihlar@suse.cz
- update to version 7.6.1
* Wed Jan  3 2001 cihlar@suse.cz
- fixed Provides and Obsoletes also for curl-devel
* Tue Dec 19 2000 cihlar@suse.cz
- fixed name
- added Obsoletes: curl_ssl
* Mon Dec 18 2000 cihlar@suse.cz
- changed to ssl support
* Thu Nov 16 2000 cihlar@suse.cz
- renamed curldev -> curl-devel
- update to version 7.4.2
* Tue Oct 17 2000 cihlar@suse.cz
- update to version 7.4.1 - security bug fixed
* Wed Aug 30 2000 cihlar@suse.cz
- package created