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