1 Name: download-provider
2 Summary: Download the contents in background
5 Group: Development/Libraries
7 Source0: %{name}-%{version}.tar.gz
9 Requires(post): connman
10 Requires: security-config
12 BuildRequires: pkgconfig(dlog)
13 BuildRequires: pkgconfig(gobject-2.0)
14 BuildRequires: pkgconfig(xdgmime)
15 BuildRequires: pkgconfig(vconf)
16 BuildRequires: pkgconfig(sqlite3)
17 BuildRequires: pkgconfig(bundle)
18 BuildRequires: pkgconfig(capi-base-common)
19 BuildRequires: pkgconfig(capi-appfw-app-manager)
20 BuildRequires: pkgconfig(capi-appfw-application)
21 BuildRequires: pkgconfig(capi-network-connection)
22 BuildRequires: pkgconfig(appsvc)
23 BuildRequires: pkgconfig(libcurl)
24 BuildRequires: pkgconfig(capi-content-mime-type)
25 BuildRequires: gettext-devel
26 BuildRequires: pkgconfig(libsystemd)
27 BuildRequires: pkgconfig(capi-network-wifi-direct)
28 %if "%{?profile}" != "wearable"
29 BuildRequires: pkgconfig(notification)
31 BuildRequires: pkgconfig(storage)
32 BuildRequires: pkgconfig(cynara-client)
33 BuildRequires: pkgconfig(cynara-client-async)
34 BuildRequires: pkgconfig(cynara-creds-socket)
35 BuildRequires: pkgconfig(cynara-creds-dbus)
36 BuildRequires: pkgconfig(libtzplatform-config)
39 BuildRequires: pkgconfig(gmock)
43 Description: Download the contents in background
46 Summary: download-provider
47 Group: Development/Libraries
48 Requires: %{name} = %{version}-%{release}
51 Description: Download the contents in background (development files)
56 %define _data_install_path %{TZ_SYS_GLOBALUSER_DATA}/%{name}
57 %define _resource_install_path /usr/share/%{name}
58 %define _imagedir %{_resource_install_path}/images
59 %define _localedir %{_resource_install_path}/locales
60 %define _databasedir %{_data_install_path}/database
61 %define _database_client_dir %{_databasedir}/clients
62 %define _notifydir %{_data_install_path}/notify
63 %define _ipc_socket /tmp/.download-provider.sock
64 %define _logdump_script_dir %{TZ_SYS_ETC}/dump.d/module.d
65 %define _http_lib libcurl
66 %define _manifest_name %{name}.manifest
67 %if "%{?tizen_profile_name}" == "tv"
68 %define _ca_cert /opt/data/cert/vdca.pem
69 %define _ca_path /opt/data/cert/user/
70 %define max_concurrent_downloads 15
72 %define max_concurrent_downloads 50
76 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
77 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
78 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
81 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
82 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
83 export FFLAGS+=" -fprofile-arcs -ftest-coverage"
84 export LDFLAGS+=" -lgcov"
87 %cmake -DTZ_SYS_GLOBALUSER_DATA=%TZ_SYS_GLOBALUSER_DATA \
88 -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
89 -DBIN_INSTALL_DIR:PATH=%{_bindir} \
90 -DLIB_INSTALL_DIR:PATH=%{_libdir} \
91 -DLIB_AGENT_PATH="/usr/%{?_lib}/libdownloadagent2.so.0.1.0" \
92 -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \
94 -DPKG_VERSION=%{version} \
95 -DPKG_RELEASE=%{release} \
96 -DIPC_SOCKET:PATH=%{_ipc_socket} \
97 -DPROVIDER_DIR:PATH=%{_data_install_path} \
98 -DNOTIFY_DIR:PATH=%{_notifydir} \
99 -DDATABASE_DIR:PATH=%{_databasedir} \
100 -DDATABASE_CLIENT_DIR:PATH=%{_database_client_dir} \
101 -DIMAGE_DIR:PATH=%{_imagedir} \
102 -DLOCALE_DIR:PATH=%{_localedir} \
103 -DSUPPORT_WIFI_DIRECT:BOOL=OFF \
104 -DSUPPORT_DOWNLOAD_BOOSTER:BOOL=OFF \
105 %if "%{?profile}" == "wearable"
106 -DSUPPORT_NOTIFICATION:BOOL=OFF \
108 -DSUPPORT_NOTIFICATION:BOOL=ON \
110 -DSUPPORT_LOG_MESSAGE:BOOL=ON \
111 -DSUPPORT_OMA_DRM:BOOL=OFF \
112 -DSUPPORT_COMPANION_MODE:BOOL=OFF \
113 %if "%{?profile}" == "wearable"
114 -DSUPPORT_MULTILINGUAL:BOOL=ON \
116 -DSUPPORT_MULTILINGUAL:BOOL=OFF \
117 -DMAX_CONCURRENT_DOWNLOADS=%{?max_concurrent_downloads}\
119 -DCMAKE_LOG_DUMP_SCRIPT_DIR=%{_logdump_script_dir} \
120 -DHTTP_LIB=%{_http_lib} \
121 %if "%{?_lib}" == "lib64"
122 %{?_cmake_lib_suffix64} \
124 %{?_cmake_skip_rpath} \
125 -DBUILD_SHARED_LIBS:BOOL=ON \
126 -DBUILD_GTESTS=%{?gtests:1}%{!?gtests:0} \
127 -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0} \
128 -DSUPPORT_LARGE_FILE:BOOL=ON \
129 %if "%{?tizen_profile_name}" == "tv"
130 -DCA_CERT=%{_ca_cert} \
131 -DCA_PATH=%{_ca_path} \
135 make %{?jobs:-j%jobs}
140 %if "%{?tizen_profile_name}" == "tv"
141 mkdir -p %{buildroot}/etc/notstrip/
142 install -m 644 packaging/download-provider.notstrip %{buildroot}/etc/notstrip/download-provider.notstrip
146 mkdir -p %{buildroot}/etc/vasum/vsmzone.resource/
147 mv %{buildroot}/usr/share/download-provider/download-provider.res %{buildroot}/etc/vasum/vsmzone.resource/
149 mkdir -p %{buildroot}/lib/systemd/system/sockets.target.wants
150 ln -s ../download-provider.socket %{buildroot}/lib/systemd/system/sockets.target.wants/
153 #make notify dir in post section for smack
154 mkdir %{TZ_SYS_GLOBALUSER_DATA}/download-provider
155 mkdir -p %{_notifydir}
156 chown -R web_fw:web_fw %{_notifydir}
157 chsmack -a 'System::Shared' %{_notifydir}
158 chsmack -t %{_notifydir}
159 mkdir -p --mode=0700 %{_databasedir}
160 chown -R web_fw:web_fw %{_databasedir}
161 chsmack -a 'System' %{_databasedir}
162 mkdir -p --mode=0700 %{_database_client_dir}
163 chsmack -a 'System' %{_database_client_dir}
164 chown -R web_fw:web_fw %{_database_client_dir}
165 chown -R web_fw:web_fw %{_data_install_path}
168 %defattr(-,root,root,-)
169 %manifest %{_manifest_name}
171 %{_localedir}/*/*/download-provider.mo
173 /lib/systemd/system/download-provider.service
174 /lib/systemd/system/download-provider.socket
175 /lib/systemd/system/sockets.target.wants/download-provider.socket
177 %attr(0544,root,root) %{_logdump_script_dir}/dump-%{name}.sh
179 %attr(0644,root,root) /etc/vasum/vsmzone.resource/download-provider.res
180 %if "%{?tizen_profile_name}" == "tv"
181 /etc/notstrip/download-provider.notstrip
183 %license LICENSE.APLv2
186 %defattr(-,root,root,-)
189 %{_libdir}/pkgconfig/download-provider.pc
190 %{_libdir}/pkgconfig/download-provider-interface.pc
191 %{_libdir}/pkgconfig/download-agent.pc
192 %{_includedir}/download-provider/download-provider.h
193 %{_includedir}/download-provider/download-provider-interface.h
194 %{_includedir}/download-provider/download-agent-interface.h