Add baselibs
[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
9 BuildRequires:  pkgconfig(openssl)
10 BuildRequires:  pkgconfig(libidn)
11 BuildRequires:  pkgconfig(nss)
12 BuildRequires:  pkgconfig(zlib)
13 BuildRequires:  pkgconfig(libcares)
14 Provides:   webclient
15
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
25
26 %package -n libcurl
27 Summary:    A library for getting files from web servers
28 Group:      System/Libraries
29
30 %description -n libcurl
31 This package provides a way for applications to use FTP, HTTP, Gopher and
32 other servers for getting files.
33
34
35 %package -n libcurl-devel
36 Summary:    Files needed for building applications with libcurl
37 Group:      Development/Libraries
38 Requires:   libcurl = %{version}-%{release}
39 Requires:   libidn-devel
40 Provides:   curl-devel = %{version}-%{release}
41 Obsoletes:   curl-devel < %{version}-%{release}
42
43 %description -n libcurl-devel
44 cURL is a tool for getting files from FTP, HTTP, Gopher, Telnet, and
45 Dict servers, using any of the supported protocols. The libcurl-devel
46 package includes files needed for developing applications which can
47 use cURL's capabilities internally.
48
49
50
51 %prep
52 %setup -q
53
54
55 %build
56
57 export CPPFLAGS="$(pkg-config --cflags nss) -DHAVE_PK11_CREATEGENERICOBJECT"
58
59 %reconfigure --without-nss --without-gnutls --with-openssl --disable-ipv6 \
60 --with-ca-path=/etc/ssl/certs \
61 --with-libidn \
62 --with-lber-lib=lber \
63 --enable-manual --enable-versioned-symbols --enable-ares --enable-debug --enable-curldebug \
64 --disable-static
65
66 #--with-ca-bundle=%{_sysconfdir}/pki/tls/certs/ca-bundle.crt 
67
68 sed -i -e 's,-L/usr/lib ,,g;s,-L/usr/lib64 ,,g;s,-L/usr/lib$,,g;s,-L/usr/lib64$,,g' \
69 Makefile libcurl.pc
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 rm -rf %{buildroot}
79
80 rm -rf $RPM_BUILD_ROOT
81
82 make DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p" install
83
84 rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
85 install -d $RPM_BUILD_ROOT/%{_datadir}/aclocal
86 install -m 644 docs/libcurl/libcurl.m4 $RPM_BUILD_ROOT/%{_datadir}/aclocal
87
88
89 # don't need curl's copy of the certs; use openssl's
90 find ${RPM_BUILD_ROOT} -name ca-bundle.crt -exec rm -f '{}' \;
91 rm -rf ${RPM_BUILD_ROOT}/usr/share/man
92
93 %post -n libcurl -p /sbin/ldconfig
94
95 %postun -n libcurl -p /sbin/ldconfig
96
97 %files
98 %license COPYING
99 %{_bindir}/curl
100
101 %files -n libcurl
102 %{_libdir}/libcurl.so.*
103
104 %files -n libcurl-devel
105 %{_bindir}/curl-config*
106 %{_includedir}/curl
107 %{_libdir}/*.so
108 %{_libdir}/pkgconfig/*.pc
109 %{_datadir}/aclocal/libcurl.m4
110
111