Revert "Update to 7.40.1"
[platform/upstream/curl.git] / packaging / curl.spec
1 Name:           curl
2 Version:        7.37.1
3 Release:        0
4 License:        MIT
5 Summary:        A utility for getting files from remote servers (FTP, HTTP, and others)
6 Url:            http://curl.haxx.se/
7 Group:          Base/Utilities
8 Source0:        %{name}-%{version}.tar.bz2
9 Source1001:     %{name}.manifest
10 BuildRequires:  pkgconfig(libcares)
11 BuildRequires:  pkgconfig(libidn)
12 BuildRequires:  pkgconfig(nss)
13 BuildRequires:  pkgconfig(openssl)
14 BuildRequires:  pkgconfig(zlib)
15 Provides:       webclient
16
17 %description
18 cURL is a tool for getting files from HTTP, FTP, FILE, LDAP, LDAPS,
19 DICT, TELNET and TFTP servers, using any of the supported protocols.
20 cURL is designed to work without user interaction or any kind of
21 interactivity. cURL offers many useful capabilities, like proxy support,
22 user authentication, FTP upload, HTTP post, and file transfer resume.
23
24 %package -n libcurl
25 Summary:        A library for getting files from web servers
26 Group:          Base/Libraries
27
28 %description -n libcurl
29 This package provides a way for applications to use FTP, HTTP, Gopher and
30 other servers for getting files.
31
32 %package -n libcurl-devel
33 Summary:        Files needed for building applications with libcurl
34 Group:          Base/Development
35 Requires:       libcurl = %{version}
36 Requires:       libidn-devel
37 Provides:       curl-devel = %{version}
38 Obsoletes:      curl-devel < %{version}
39
40 %description -n libcurl-devel
41 cURL is a tool for getting files from FTP, HTTP, Gopher, Telnet, and
42 Dict servers, using any of the supported protocols. The libcurl-devel
43 package includes files needed for developing applications which can
44 use cURL's capabilities internally.
45
46 %prep
47 %setup -q
48 cp %{SOURCE1001} .
49
50 %build
51 export CPPFLAGS="$(pkg-config --cflags nss) -DHAVE_PK11_CREATEGENERICOBJECT"
52
53 %reconfigure --without-nss \
54         --without-gnutls \
55         --with-openssl \
56         --disable-ipv6 \
57         --with-ca-path=/etc/ssl/certs \
58         --with-libidn \
59         --with-lber-lib=lber \
60         --enable-manual \
61         --enable-versioned-symbols \
62         --enable-ares \
63         --enable-debug \
64         --enable-curldebug \
65         --disable-static
66
67 sed -i -e 's,-L/usr/lib ,,g;s,-L/usr/lib64 ,,g;s,-L/usr/lib$,,g;s,-L/usr/lib64$,,g' \
68 Makefile libcurl.pc
69
70 # Remove bogus rpath
71 sed -i \
72 -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
73 -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
74
75 %__make %{?_smp_mflags}
76
77 %install
78 %make_install INSTALL="install -p"
79
80 rm -f %{buildroot}%{_libdir}/libcurl.la
81 install -d %{buildroot}/%{_datadir}/aclocal
82 install -m 644 docs/libcurl/libcurl.m4 %{buildroot}/%{_datadir}/aclocal
83
84 # don't need curl's copy of the certs; use openssl's
85 find %{buildroot} -name ca-bundle.crt -exec rm -f '{}' \;
86 rm -rf %{buildroot}%{_datadir}/man
87
88 %post -n libcurl -p /sbin/ldconfig
89
90 %postun -n libcurl -p /sbin/ldconfig
91
92 %files
93 %manifest %{name}.manifest
94 %license COPYING
95 %{_bindir}/curl
96
97 %files -n libcurl
98 %manifest %{name}.manifest
99 %license COPYING
100 %{_libdir}/libcurl.so.*
101
102 %files -n libcurl-devel
103 %manifest %{name}.manifest
104 %{_bindir}/curl-config*
105 %{_includedir}/curl
106 %{_libdir}/*.so
107 %{_libdir}/pkgconfig/*.pc
108 %{_datadir}/aclocal/libcurl.m4
109