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