Name: download-provider
Summary: Download the contents in background
-Version: 2.1.114
+Version: 2.3.11
Release: 0
Group: Development/Libraries
License: Apache-2.0
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(capi-content-mime-type)
BuildRequires: gettext-devel
-BuildRequires: pkgconfig(libsystemd-daemon)
+BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(capi-network-wifi-direct)
%if "%{?profile}" != "wearable"
BuildRequires: pkgconfig(notification)
BuildRequires: pkgconfig(cynara-client-async)
BuildRequires: pkgconfig(cynara-creds-socket)
BuildRequires: pkgconfig(cynara-creds-dbus)
-BuildRequires: pkgconfig(tpkp-curl)
BuildRequires: pkgconfig(libtzplatform-config)
%if 0%{?gtests:1}
%define _logdump_script_dir %{TZ_SYS_ETC}/dump.d/module.d
%define _http_lib libcurl
%define _manifest_name %{name}.manifest
+%if "%{?tizen_profile_name}" == "tv"
+%define _ca_cert /opt/data/cert/vdca.pem
+%define _ca_path /opt/data/cert/user/
+%define max_concurrent_downloads 15
+%else
+%define max_concurrent_downloads 50
+%endif
%build
export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
-DBIN_INSTALL_DIR:PATH=%{_bindir} \
-DLIB_INSTALL_DIR:PATH=%{_libdir} \
-DLIB_AGENT_PATH="/usr/%{?_lib}/libdownloadagent2.so.0.1.0" \
+ -DLIB_CACHE_AGENT_PATH="/usr/%{?_lib}/libcacheagent.so.0.1.0" \
-DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \
-DPKG_NAME=%{name} \
-DPKG_VERSION=%{version} \
-DSUPPORT_LOG_MESSAGE:BOOL=ON \
-DSUPPORT_OMA_DRM:BOOL=OFF \
-DSUPPORT_COMPANION_MODE:BOOL=OFF \
- -DTIZEN_2_3_UX:BOOL=ON \
%if "%{?profile}" == "wearable"
-DSUPPORT_MULTILINGUAL:BOOL=ON \
%else
-DSUPPORT_MULTILINGUAL:BOOL=OFF \
+ -DMAX_CONCURRENT_DOWNLOADS=%{?max_concurrent_downloads}\
%endif
-DCMAKE_LOG_DUMP_SCRIPT_DIR=%{_logdump_script_dir} \
-DHTTP_LIB=%{_http_lib} \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DBUILD_GTESTS=%{?gtests:1}%{!?gtests:0} \
-DBUILD_GCOV=%{?gcov:1}%{!?gcov:0} \
+ -DSUPPORT_LARGE_FILE:BOOL=ON \
+%if "%{?tizen_profile_name}" == "tv"
+ -DCA_CERT=%{_ca_cert} \
+ -DCA_PATH=%{_ca_path} \
+%endif
.
make %{?jobs:-j%jobs}
install -m 644 packaging/download-provider.notstrip %{buildroot}/etc/notstrip/download-provider.notstrip
%endif
+mkdir -p %{buildroot}/var/lib/download-provider/
+install -m 600 res/var/lib/download-provider/settings %{buildroot}/var/lib/download-provider/settings
+
## container_enable
mkdir -p %{buildroot}/etc/vasum/vsmzone.resource/
mv %{buildroot}/usr/share/download-provider/download-provider.res %{buildroot}/etc/vasum/vsmzone.resource/
-mkdir -p %{buildroot}/lib/systemd/system/graphical.target.wants
mkdir -p %{buildroot}/lib/systemd/system/sockets.target.wants
-ln -s ../download-provider.service %{buildroot}/lib/systemd/system/graphical.target.wants/
ln -s ../download-provider.socket %{buildroot}/lib/systemd/system/sockets.target.wants/
%post
chsmack -a 'System' %{_database_client_dir}
chown -R web_fw:web_fw %{_database_client_dir}
chown -R web_fw:web_fw %{_data_install_path}
+chown -R web_fw:web_fw /var/lib/download-provider/
+mkdir -p /opt/usr/data/download_cache
+chown -R web_fw:web_fw /opt/usr/data/download_cache
%files
%defattr(-,root,root,-)
%{_imagedir}/*.png
%{_localedir}/*/*/download-provider.mo
%{_libdir}/*.so.*
+%attr(0600,web_fw,web_fw) /var/lib/download-provider/settings
/lib/systemd/system/download-provider.service
-/lib/systemd/system/graphical.target.wants/download-provider.service
/lib/systemd/system/download-provider.socket
/lib/systemd/system/sockets.target.wants/download-provider.socket
%{_bindir}/%{name}
%{_libdir}/pkgconfig/download-provider.pc
%{_libdir}/pkgconfig/download-provider-interface.pc
%{_libdir}/pkgconfig/download-agent.pc
+%{_libdir}/pkgconfig/cache-agent.pc
%{_includedir}/download-provider/download-provider.h
%{_includedir}/download-provider/download-provider-interface.h
%{_includedir}/download-provider/download-agent-interface.h
+%{_includedir}/download-provider/cache-agent-interface.h
%if 0%{?gtests:1}
%{_bindir}/gtest*