| 1 | Summary: A utility for getting files from remote servers (FTP, HTTP, and others) | 
|---|
| 2 | Name: curl | 
|---|
| 3 | Version: 7.21.1 | 
|---|
| 4 | Release: 4%{?dist} | 
|---|
| 5 | License: MIT | 
|---|
| 6 | Group: Applications/Internet | 
|---|
| 7 | Source: http://curl.haxx.se/download/%{name}-%{version}.tar.gz | 
|---|
| 8 |  | 
|---|
| 9 | Patch0: curl-os2.diff | 
|---|
| 10 |  | 
|---|
| 11 | Provides: webclient | 
|---|
| 12 | URL: http://curl.haxx.se/ | 
|---|
| 13 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | 
|---|
| 14 |  | 
|---|
| 15 | #BuildRequires: automake | 
|---|
| 16 | #BuildRequires: groff | 
|---|
| 17 | #BuildRequires: krb5-devel | 
|---|
| 18 | #BuildRequires: libidn-devel | 
|---|
| 19 | #BuildRequires: libssh2-devel >= 1.2 | 
|---|
| 20 | #BuildRequires: nss-devel | 
|---|
| 21 | #BuildRequires: openldap-devel | 
|---|
| 22 | #BuildRequires: openssh-clients | 
|---|
| 23 | #BuildRequires: openssh-server | 
|---|
| 24 | BuildRequires: openssl-devel | 
|---|
| 25 | BuildRequires: pkgconfig | 
|---|
| 26 | #BuildRequires: stunnel | 
|---|
| 27 |  | 
|---|
| 28 | # valgrind is not available on s390(x) | 
|---|
| 29 | %ifnarch s390 s390x | 
|---|
| 30 | #BuildRequires: valgrind | 
|---|
| 31 | %endif | 
|---|
| 32 |  | 
|---|
| 33 | BuildRequires: zlib-devel | 
|---|
| 34 | Requires: libcurl = %{version}-%{release} | 
|---|
| 35 |  | 
|---|
| 36 | # TODO: mention also IMAP(S), POP3(S), SMTP(S) and RTSP protocols | 
|---|
| 37 | %description | 
|---|
| 38 | cURL is a tool for getting files from HTTP, FTP, FILE, LDAP, LDAPS, | 
|---|
| 39 | DICT, TELNET and TFTP servers, using any of the supported protocols. | 
|---|
| 40 | cURL is designed to work without user interaction or any kind of | 
|---|
| 41 | interactivity. cURL offers many useful capabilities, like proxy support, | 
|---|
| 42 | user authentication, FTP upload, HTTP post, and file transfer resume. | 
|---|
| 43 |  | 
|---|
| 44 | %package -n libcurl | 
|---|
| 45 | Summary: A library for getting files from web servers | 
|---|
| 46 | Group: Development/Libraries | 
|---|
| 47 |  | 
|---|
| 48 | # libssh2 ABI has been changed since libssh2-1.0 | 
|---|
| 49 | # this forces update of libssh2 before update of libcurl | 
|---|
| 50 | #Requires: libssh2 >= 1.2 | 
|---|
| 51 | Requires: openssl | 
|---|
| 52 |  | 
|---|
| 53 | %description -n libcurl | 
|---|
| 54 | This package provides a way for applications to use FTP, HTTP, Gopher and | 
|---|
| 55 | other servers for getting files. | 
|---|
| 56 |  | 
|---|
| 57 | %package -n libcurl-devel | 
|---|
| 58 | Summary: Files needed for building applications with libcurl | 
|---|
| 59 | Group: Development/Libraries | 
|---|
| 60 | #Requires: automake | 
|---|
| 61 | Requires: libcurl = %{version}-%{release} | 
|---|
| 62 | #Requires: libidn-devel | 
|---|
| 63 | Requires: pkgconfig | 
|---|
| 64 |  | 
|---|
| 65 | Provides: curl-devel = %{version}-%{release} | 
|---|
| 66 | Obsoletes: curl-devel < %{version}-%{release} | 
|---|
| 67 |  | 
|---|
| 68 | %description -n libcurl-devel | 
|---|
| 69 | cURL is a tool for getting files from FTP, HTTP, Gopher, Telnet, and | 
|---|
| 70 | Dict servers, using any of the supported protocols. The libcurl-devel | 
|---|
| 71 | package includes files needed for developing applications which can | 
|---|
| 72 | use cURL's capabilities internally. | 
|---|
| 73 |  | 
|---|
| 74 | %prep | 
|---|
| 75 | %setup -q | 
|---|
| 76 |  | 
|---|
| 77 | # Convert docs to UTF-8 | 
|---|
| 78 | # NOTE: we do this _before_ applying of all patches, which are already UTF-8 | 
|---|
| 79 | #for f in CHANGES README; do | 
|---|
| 80 | #    iconv -f iso-8859-1 -t utf8 < ${f} > ${f}.utf8 | 
|---|
| 81 | #    mv -f ${f}.utf8 ${f} | 
|---|
| 82 | #done | 
|---|
| 83 |  | 
|---|
| 84 | %patch0 -p1 -b .os2~ | 
|---|
| 85 |  | 
|---|
| 86 | #autoreconf | 
|---|
| 87 | # replace hard wired port numbers in the test suite | 
|---|
| 88 | #sed -i s/899\\\([0-9]\\\)/%{?__isa_bits}9\\1/ tests/data/test* | 
|---|
| 89 |  | 
|---|
| 90 | %build | 
|---|
| 91 | export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe" | 
|---|
| 92 | export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" ; \ | 
|---|
| 93 | export LIBS="-lurpo -lmmap -lpthread" ; \ | 
|---|
| 94 | %configure \ | 
|---|
| 95 | --disable-ipv6 \ | 
|---|
| 96 | --disable-ldaps \ | 
|---|
| 97 | --enable-manual \ | 
|---|
| 98 | --with-ca-bundle=%{_sysconfdir}/pki/tls/certs/ca-bundle.crt \ | 
|---|
| 99 | --with-gssapi=%{_prefix}/kerberos \ | 
|---|
| 100 | --without-libidn \ | 
|---|
| 101 | --without-libssh2 \ | 
|---|
| 102 | --with-ssl --without-nss \ | 
|---|
| 103 | --enable-shared --disable-static \ | 
|---|
| 104 | "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache" | 
|---|
| 105 |  | 
|---|
| 106 | # uncomment to turn off optimizations | 
|---|
| 107 | # find -name Makefile | xargs sed -i 's/-O2/-O0/' | 
|---|
| 108 | # Remove bogus rpath | 
|---|
| 109 | #sed -i \ | 
|---|
| 110 | #       -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ | 
|---|
| 111 | #       -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool | 
|---|
| 112 |  | 
|---|
| 113 | make %{?_smp_mflags} | 
|---|
| 114 |  | 
|---|
| 115 | #%check | 
|---|
| 116 | #LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} | 
|---|
| 117 | #export LD_LIBRARY_PATH | 
|---|
| 118 | #cd tests | 
|---|
| 119 | #make %{?_smp_mflags} | 
|---|
| 120 | # use different port range for 32bit and 64bit build, thus make it possible | 
|---|
| 121 | # to run both in parallel on the same machine | 
|---|
| 122 | #./runtests.pl -a -b%{?__isa_bits}90 -p -v | 
|---|
| 123 |  | 
|---|
| 124 | %install | 
|---|
| 125 | rm -rf $RPM_BUILD_ROOT | 
|---|
| 126 |  | 
|---|
| 127 | make DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p" install | 
|---|
| 128 |  | 
|---|
| 129 | rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la | 
|---|
| 130 |  | 
|---|
| 131 | install -d $RPM_BUILD_ROOT/%{_datadir}/aclocal | 
|---|
| 132 | install -m 644 docs/libcurl/libcurl.m4 $RPM_BUILD_ROOT/%{_datadir}/aclocal | 
|---|
| 133 |  | 
|---|
| 134 | install -m 755 lib/curl7.dll $RPM_BUILD_ROOT/%{_libdir} | 
|---|
| 135 | #install -m 755 lib/.libs/curl.lib $RPM_BUILD_ROOT/%{_libdir} | 
|---|
| 136 | install -m 755 lib/.libs/curl_s.a $RPM_BUILD_ROOT/%{_libdir} | 
|---|
| 137 |  | 
|---|
| 138 | #%define _curlbuild_h curlbuild-32.h | 
|---|
| 139 | #mv $RPM_BUILD_ROOT%{_includedir}/curl/curlbuild.h \ | 
|---|
| 140 | #   $RPM_BUILD_ROOT%{_includedir}/curl/%{_curlbuild_h} | 
|---|
| 141 | #install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/curl/curlbuild.h | 
|---|
| 142 |  | 
|---|
| 143 | %clean | 
|---|
| 144 | rm -rf $RPM_BUILD_ROOT | 
|---|
| 145 |  | 
|---|
| 146 | #%post -n libcurl -p /sbin/ldconfig | 
|---|
| 147 |  | 
|---|
| 148 | #%postun -n libcurl -p /sbin/ldconfig | 
|---|
| 149 |  | 
|---|
| 150 | %files | 
|---|
| 151 | %defattr(-,root,root,-) | 
|---|
| 152 | %doc CHANGES README* COPYING | 
|---|
| 153 | %doc docs/BUGS docs/FAQ docs/FEATURES | 
|---|
| 154 | %doc docs/MANUAL docs/RESOURCES | 
|---|
| 155 | %doc docs/TheArtOfHttpScripting docs/TODO | 
|---|
| 156 | %{_bindir}/curl.exe | 
|---|
| 157 | %{_mandir}/man1/curl.1* | 
|---|
| 158 |  | 
|---|
| 159 | %files -n libcurl | 
|---|
| 160 | %defattr(-,root,root,-) | 
|---|
| 161 | %{_libdir}/curl7.dll | 
|---|
| 162 |  | 
|---|
| 163 | %files -n libcurl-devel | 
|---|
| 164 | %defattr(-,root,root,-) | 
|---|
| 165 | %doc docs/examples/*.c docs/examples/Makefile.example docs/INTERNALS | 
|---|
| 166 | %doc docs/CONTRIBUTE docs/libcurl/ABI | 
|---|
| 167 | %{_bindir}/curl-config* | 
|---|
| 168 | %{_includedir}/curl | 
|---|
| 169 | %{_libdir}/*.a | 
|---|
| 170 | #%{_libdir}/*.lib | 
|---|
| 171 | %{_libdir}/pkgconfig/*.pc | 
|---|
| 172 | %{_mandir}/man1/curl-config.1* | 
|---|
| 173 | %{_mandir}/man3/* | 
|---|
| 174 | %{_datadir}/aclocal/libcurl.m4 | 
|---|
| 175 |  | 
|---|
| 176 | %changelog | 
|---|
| 177 | * Mon Jan 16 2012 yd | 
|---|
| 178 | - rebuild with libc 0.6.4 runtime. | 
|---|