Add default CA bundle
[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.50.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 Source1001:     %{name}.manifest
11
12 BuildRequires:  pkgconfig(openssl)
13 BuildRequires:  pkgconfig(libidn)
14 BuildRequires:  pkgconfig(zlib)
15 BuildRequires:  pkgconfig(libcares)
16 BuildRequires:  pkgconfig(libnghttp2)
17 BuildRequires:  ca-certificates-devel
18 Requires:       ca-certificates
19
20 Provides:   webclient
21
22
23 %description
24 curl is a client to get documents/files from servers, using any of the
25 supported protocols. The command is designed to work without user
26 interaction or any kind of interactivity.
27
28 curl offers a busload of useful tricks like proxy support, user
29 authentication, ftp upload, HTTP post, file transfer resume and more.
30
31 %package -n libcurl
32 Summary:    A library for getting files from web servers
33 Group:      System/Libraries
34 License:    MIT
35 Requires(post): /sbin/ldconfig
36 Requires(postun): /sbin/ldconfig
37
38 %description -n libcurl
39 This package provides a way for applications to use FTP, HTTP, Gopher and
40 other servers for getting files.
41
42
43 %package -n libcurl-devel
44 Summary:    Files needed for building applications with libcurl
45 Group:      Development/Libraries
46 License:    MIT
47 Requires:   libcurl = %{version}-%{release}
48 Requires:   libidn-devel
49 Provides:   curl-devel = %{version}-%{release}
50 Obsoletes:   curl-devel < %{version}-%{release}
51
52 %description -n libcurl-devel
53 libcurl is the core engine of curl; this packages contains all the libs,
54 headers, and manual pages to develop applications using libcurl.
55
56 %prep
57 %setup -q
58 cp %{SOURCE1001} .
59
60 #%patch01 -p1
61 #%patch02 -p1
62
63 %build
64
65 export CPPFLAGS="-DHAVE_PK11_CREATEGENERICOBJECT"
66
67 %if "%{TIZEN_PROFILE_TV}" == "1"
68 CFLAGS+=" -DTIZEN_TV_EXT"
69 %reconfigure --without-nss --without-gnutls --with-openssl --disable-ipv6 \
70 %else
71 %reconfigure --without-nss --without-gnutls --with-openssl --enable-ipv6 \
72 %endif
73 --with-ca-path==%{TZ_SYS_RO_CA_CERTS} \
74 --with-ca-bundle=%{TZ_SYS_RO_CA_BUNDLE} \
75 --with-libidn \
76 --with-lber-lib=lber \
77 --enable-manual --enable-versioned-symbols --enable-ares --enable-debug --enable-curldebug \
78 --disable-static \
79 --with-nghttp2 \
80 --without-zsh-functions-dir \
81
82 #--with-ca-bundle=%{_sysconfdir}/pki/tls/certs/ca-bundle.crt 
83
84 sed -i -e 's,-L/usr/lib ,,g;s,-L/usr/lib64 ,,g;s,-L/usr/lib$,,g;s,-L/usr/lib64$,,g' \
85 Makefile libcurl.pc
86 # Remove bogus rpath
87 sed -i \
88 -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
89 -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
90
91 make %{?_smp_mflags}
92
93 %install
94 rm -rf %{buildroot}
95
96 rm -rf $RPM_BUILD_ROOT
97
98 make DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p" install
99
100 rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
101 install -d $RPM_BUILD_ROOT/%{_datadir}/aclocal
102 install -m 644 docs/libcurl/libcurl.m4 $RPM_BUILD_ROOT/%{_datadir}/aclocal
103
104
105 # don't need curl's copy of the certs; use openssl's
106 find ${RPM_BUILD_ROOT} -name ca-bundle.crt -exec rm -f '{}' \;
107 rm -rf ${RPM_BUILD_ROOT}/usr/share/man
108
109 # LICENSE
110 rm -rf %{buildroot}/usr/share/license
111 mkdir -p %{buildroot}/usr/share/license
112 cp COPYING %{buildroot}/usr/share/license/%{name}
113
114 %post -n libcurl -p /sbin/ldconfig
115
116 %postun -n libcurl -p /sbin/ldconfig
117
118 %files
119 %{_bindir}/curl
120
121 %files -n libcurl
122 %manifest %{name}.manifest
123 %{_libdir}/libcurl.so.*
124 /usr/share/license/%{name}
125
126 %files -n libcurl-devel
127 %{_bindir}/curl-config*
128 %{_includedir}/curl
129 %{_libdir}/*.so
130 %{_libdir}/pkgconfig/*.pc
131 %{_datadir}/aclocal/libcurl.m4
132