Apply DLP feature
[platform/upstream/curl.git] / packaging / curl.spec
index 2465047..2a11e0f 100644 (file)
@@ -1,6 +1,6 @@
 Name:       curl
 Summary:    A utility for getting files from remote servers (FTP, HTTP, and others)
-Version:    7.48.0
+Version:    7.59.0
 Release:    1
 Group:      Applications/Internet
 License:    MIT
@@ -9,8 +9,8 @@ URL:        http://curl.haxx.se/
 Source0:    %{name}-%{version}.tar.gz
 Source1001:     %{name}.manifest
 
+BuildRequires:  pkgconfig(icu-uc)
 BuildRequires:  pkgconfig(openssl)
-BuildRequires:  pkgconfig(libidn)
 BuildRequires:  pkgconfig(zlib)
 BuildRequires:  pkgconfig(libcares)
 BuildRequires: pkgconfig(libnghttp2)
@@ -42,7 +42,6 @@ Summary:    Files needed for building applications with libcurl
 Group:      Development/Libraries
 License:    MIT
 Requires:   libcurl = %{version}-%{release}
-Requires:   libidn-devel
 Provides:   curl-devel = %{version}-%{release}
 Obsoletes:   curl-devel < %{version}-%{release}
 
@@ -50,6 +49,15 @@ Obsoletes:   curl-devel < %{version}-%{release}
 libcurl is the core engine of curl; this packages contains all the libs,
 headers, and manual pages to develop applications using libcurl.
 
+%package -n libcurl-extension-dlp
+Summary:       Extensions for Tizen OS
+Provides:      libcurl-extension-dlp = %{version}-%{release}
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+
+%description -n libcurl-extension-dlp
+libcurl extensions for Tinen OS.
+
 %prep
 %setup -q
 cp %{SOURCE1001} .
@@ -60,20 +68,22 @@ cp %{SOURCE1001} .
 %build
 
 export CPPFLAGS="-DHAVE_PK11_CREATEGENERICOBJECT"
-
+CFLAGS+=" -fstack-protector-strong -Wl,-z,relro -D_FORTIFY_SOURCE=2 -fPIE -pie"
 %if "%{TIZEN_PROFILE_TV}" == "1"
 CFLAGS+=" -DTIZEN_TV_EXT"
 %reconfigure --without-nss --without-gnutls --with-openssl --disable-ipv6 \
 %else
 %reconfigure --without-nss --without-gnutls --with-openssl --enable-ipv6 \
 %endif
---with-ca-path=/etc/ssl/certs \
---with-libidn \
+--with-ca-path==/etc/ssl/certs \
+--with-ca-bundle=/etc/ssl/ca-bundle.pem \
+--with-icu-uc \
 --with-lber-lib=lber \
 --enable-manual --enable-versioned-symbols --enable-ares --enable-debug --enable-curldebug \
 --disable-static \
 --with-nghttp2 \
 --without-zsh-functions-dir \
+--enable-dlp \
 
 #--with-ca-bundle=%{_sysconfdir}/pki/tls/certs/ca-bundle.crt 
 
@@ -93,7 +103,7 @@ rm -rf $RPM_BUILD_ROOT
 
 make DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p" install
 
-rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
+rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl{,_extension_dlp}.la
 install -d $RPM_BUILD_ROOT/%{_datadir}/aclocal
 install -m 644 docs/libcurl/libcurl.m4 $RPM_BUILD_ROOT/%{_datadir}/aclocal
 
@@ -102,22 +112,18 @@ install -m 644 docs/libcurl/libcurl.m4 $RPM_BUILD_ROOT/%{_datadir}/aclocal
 find ${RPM_BUILD_ROOT} -name ca-bundle.crt -exec rm -f '{}' \;
 rm -rf ${RPM_BUILD_ROOT}/usr/share/man
 
-# LICENSE
-rm -rf %{buildroot}/usr/share/license
-mkdir -p %{buildroot}/usr/share/license
-cp COPYING %{buildroot}/usr/share/license/%{name}
-
 %post -n libcurl -p /sbin/ldconfig
 
 %postun -n libcurl -p /sbin/ldconfig
 
 %files
 %{_bindir}/curl
+%license COPYING
 
 %files -n libcurl
 %manifest %{name}.manifest
 %{_libdir}/libcurl.so.*
-/usr/share/license/%{name}
+%license COPYING
 
 %files -n libcurl-devel
 %{_bindir}/curl-config*
@@ -126,3 +132,7 @@ cp COPYING %{buildroot}/usr/share/license/%{name}
 %{_libdir}/pkgconfig/*.pc
 %{_datadir}/aclocal/libcurl.m4
 
+%files -n libcurl-extension-dlp
+%manifest %{name}.manifest
+%{_libdir}/libcurl_extension_dlp.so.*
+%license COPYING