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