352f6a7e085ec17056d28858437e2e70d0a0be3b
[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.40.1_2
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 Source0:    %{name}-%{version}.tar.gz
10
11 BuildRequires:  pkgconfig(openssl)
12 BuildRequires:  pkgconfig(libidn)
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 Requires(post): /sbin/ldconfig
31 Requires(postun): /sbin/ldconfig
32
33 %description -n libcurl
34 This package provides a way for applications to use FTP, HTTP, Gopher and
35 other servers for getting files.
36
37
38 %package -n libcurl-devel
39 Summary:    Files needed for building applications with libcurl
40 Group:      Development/Libraries
41 Requires:   libcurl = %{version}-%{release}
42 Requires:   libidn-devel
43 Provides:   curl-devel = %{version}-%{release}
44 Obsoletes:   curl-devel < %{version}-%{release}
45
46 %description -n libcurl-devel
47 cURL is a tool for getting files from FTP, HTTP, Gopher, Telnet, and
48 Dict servers, using any of the supported protocols. The libcurl-devel
49 package includes files needed for developing applications which can
50 use cURL's capabilities internally.
51
52
53
54 %prep
55 %setup -q
56
57 #%patch01 -p1
58 #%patch02 -p1
59
60 %build
61
62 export CPPFLAGS="-DHAVE_PK11_CREATEGENERICOBJECT"
63
64 %reconfigure --without-nss --without-gnutls --with-openssl --enable-ipv6 \
65 --with-ca-path=/etc/ssl/certs \
66 --with-libidn \
67 --with-lber-lib=lber \
68 --enable-manual --enable-versioned-symbols --enable-ares --enable-debug --enable-curldebug \
69 --disable-static \
70
71 #--with-ca-bundle=%{_sysconfdir}/pki/tls/certs/ca-bundle.crt 
72
73 sed -i -e 's,-L/usr/lib ,,g;s,-L/usr/lib64 ,,g;s,-L/usr/lib$,,g;s,-L/usr/lib64$,,g' \
74 Makefile libcurl.pc
75 # Remove bogus rpath
76 sed -i \
77 -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
78 -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
79
80 make %{?_smp_mflags}
81
82 %install
83 rm -rf %{buildroot}
84
85 rm -rf $RPM_BUILD_ROOT
86
87 make DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p" install
88
89 rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
90 install -d $RPM_BUILD_ROOT/%{_datadir}/aclocal
91 install -m 644 docs/libcurl/libcurl.m4 $RPM_BUILD_ROOT/%{_datadir}/aclocal
92
93
94 # don't need curl's copy of the certs; use openssl's
95 find ${RPM_BUILD_ROOT} -name ca-bundle.crt -exec rm -f '{}' \;
96 rm -rf ${RPM_BUILD_ROOT}/usr/share/man
97
98 # LICENSE
99 rm -rf %{buildroot}/usr/share/license
100 mkdir -p %{buildroot}/usr/share/license
101 cp COPYING %{buildroot}/usr/share/license/%{name}
102
103 %post -n libcurl -p /sbin/ldconfig
104
105 %postun -n libcurl -p /sbin/ldconfig
106
107 %files
108 %{_bindir}/curl
109
110 %files -n libcurl
111 %manifest %{name}.manifest
112 %{_libdir}/libcurl.so.*
113 /usr/share/license/%{name}
114
115 %files -n libcurl-devel
116 %{_bindir}/curl-config*
117 %{_includedir}/curl
118 %{_libdir}/*.so
119 %{_libdir}/pkgconfig/*.pc
120 %{_datadir}/aclocal/libcurl.m4
121