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