1 %define _ux_define tizen2.3
2 Name: download-provider
3 Summary: Download the contents in background
6 Group: Development/Libraries
8 Source0: %{name}-%{version}.tar.gz
9 Requires(post): libdevice-node
10 Requires(post): sqlite
11 Requires(post): connman
12 Requires: security-config
14 BuildRequires: pkgconfig(dlog)
15 BuildRequires: pkgconfig(gobject-2.0)
16 BuildRequires: pkgconfig(xdgmime)
17 BuildRequires: pkgconfig(vconf)
18 BuildRequires: pkgconfig(sqlite3)
19 BuildRequires: pkgconfig(bundle)
20 BuildRequires: pkgconfig(capi-base-common)
21 BuildRequires: pkgconfig(capi-appfw-app-manager)
22 BuildRequires: pkgconfig(capi-appfw-application)
23 BuildRequires: pkgconfig(capi-network-connection)
24 BuildRequires: pkgconfig(appsvc)
25 BuildRequires: pkgconfig(libcurl)
26 BuildRequires: pkgconfig(capi-content-mime-type)
27 BuildRequires: pkgconfig(libsmack)
28 BuildRequires: gettext-devel
29 BuildRequires: pkgconfig(libsystemd-daemon)
30 BuildRequires: pkgconfig(capi-network-wifi-direct)
31 #BuildRequires: model-build-features T30
32 BuildRequires: pkgconfig(storage)
33 %if "%{?tizen_profile_name}" == "wearable"
34 BuildRequires: pkgconfig(security-server)
35 %else if "%{?tizen_profile_name}" == "mobile"
36 BuildRequires: pkgconfig(notification)
39 BuildRequires: pkgconfig(cynara-client)
40 BuildRequires: pkgconfig(cynara-client-async)
41 BuildRequires: pkgconfig(cynara-creds-socket)
42 BuildRequires: pkgconfig(cynara-creds-dbus)
43 BuildRequires: pkgconfig(tpkp-curl)
44 BuildRequires: pkgconfig(libtzplatform-config)
47 Description: Download the contents in background
50 Summary: download-provider
51 Group: Development/Libraries
52 Requires: %{name} = %{version}-%{release}
55 Description: Download the contents in background (development files)
60 %define _data_install_path %{TZ_SYS_GLOBALUSER_DATA}/%{name}
61 %define _resource_install_path /usr/share/%{name}
62 %define _imagedir %{_resource_install_path}/images
63 %define _localedir %{_resource_install_path}/locales
64 %define _databasedir %{_data_install_path}/database
65 %define _database_client_dir %{_databasedir}/clients
66 %define _notifydir %{_data_install_path}/notify
67 %define _ipc_socket /tmp/.download-provider.sock
68 %define _logdump_script_dir %{TZ_SYS_ETC}/dump.d/module.d
69 %define _http_lib libcurl
70 %define upgrade_script_path /usr/share/upgrade/scripts
72 %define download_booster OFF
73 %define support_oma_drm OFF
75 %define wifi_direct ON
77 %define wifi_direct OFF
79 %define support_security_privilege OFF
80 %define support_companion_mode OFF
81 %define support_notification ON
82 %define support_knox ON
83 %define _manifest_name %{name}.manifest
85 %if 0%{?model_build_feature_wlan_p2p_disable}
86 %define wifi_direct OFF
88 %if "%{?tizen_profile_name}" == "wearable"
89 %define download_booster OFF
90 %define support_notification OFF
91 %define _manifest_name %{name}-w.manifest
93 %if 0%{?sec_product_feature_container_enable}
94 %define support_knox ON
98 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
99 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
100 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
102 %cmake -DTZ_SYS_GLOBALUSER_DATA=%TZ_SYS_GLOBALUSER_DATA \
103 -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
104 -DBIN_INSTALL_DIR:PATH=%{_bindir} \
105 -DLIB_INSTALL_DIR:PATH=%{_libdir} \
106 %ifarch aarch64 x86_64
107 -DLIB_AGENT_PATH="/usr/lib64/libdownloadagent2.so.0.1.0" \
109 -DLIB_AGENT_PATH="/usr/lib/libdownloadagent2.so.0.1.0" \
111 -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \
113 -DPKG_VERSION=%{version} \
114 -DPKG_RELEASE=%{release} \
115 -DIPC_SOCKET:PATH=%{_ipc_socket} \
116 -DPROVIDER_DIR:PATH=%{_data_install_path} \
117 -DNOTIFY_DIR:PATH=%{_notifydir} \
118 -DDATABASE_DIR:PATH=%{_databasedir} \
119 -DDATABASE_CLIENT_DIR:PATH=%{_database_client_dir} \
120 -DIMAGE_DIR:PATH=%{_imagedir} \
121 -DLOCALE_DIR:PATH=%{_localedir} \
122 -DSUPPORT_WIFI_DIRECT:BOOL=OFF \
123 %if "%{?download_booster}" == "ON"
124 -DSUPPORT_DOWNLOAD_BOOSTER:BOOL=ON \
126 -DSUPPORT_DOWNLOAD_BOOSTER:BOOL=OFF \
128 %if "%{?support_notification}" == "ON"
129 -DSUPPORT_NOTIFICATION:BOOL=ON \
131 -DSUPPORT_NOTIFICATION:BOOL=OFF \
133 -DSUPPORT_LOG_MESSAGE:BOOL=ON \
134 %if "%{?support_oma_drm}" == "ON"
135 -DSUPPORT_OMA_DRM:BOOL=ON \
137 -DSUPPORT_OMA_DRM:BOOL=OFF \
139 %if "%{?support_security_privilege}" == "ON"
140 -DSUPPORT_SECURITY_PRIVILEGE:BOOL=ON \
142 -DSUPPORT_SECURITY_PRIVILEGE:BOOL=OFF \
144 %if "%{?support_companion_mode}" == "ON"
145 -DSUPPORT_COMPANION_MODE:BOOL=ON \
147 -DSUPPORT_COMPANION_MODE:BOOL=OFF \
149 %if "%{?support_knox}" == "ON"
150 -DSUPPORT_KNOX:BOOL=ON \
152 -DSUPPORT_KNOX:BOOL=OFF \
154 %if "%{?_ux_define}" == "tizen2.3"
155 -DTIZEN_2_3_UX:BOOL=ON \
157 -DCMAKE_LOG_DUMP_SCRIPT_DIR=%{_logdump_script_dir} \
158 -DHTTP_LIB=%{_http_lib} \
159 %if "%{?_lib}" == "lib64"
160 %{?_cmake_lib_suffix64} \
162 %{?_cmake_skip_rpath} \
163 -DBUILD_SHARED_LIBS:BOOL=ON \
166 make %{?jobs:-j%jobs}
171 %if ("%{VD_PRODUCT_TYPE}" == "AUDIO") || ("%{VD_PRODUCT_TYPE}" == "TV") || ("%{VD_PRODUCT_TYPE}" == "LFD") || ("%{VD_PRODUCT_TYPE}" == "HTV") || ("%{VD_PRODUCT_TYPE}" == "AV")
172 mkdir -p %{buildroot}/etc/notstrip/
173 install -m 644 packaging/download-provider.notstrip %{buildroot}/etc/notstrip/download-provider.notstrip
177 mkdir -p %{buildroot}/etc/vasum/vsmzone.resource/
178 mv %{buildroot}/usr/share/download-provider/download-provider.res %{buildroot}/etc/vasum/vsmzone.resource/
180 mkdir -p %{buildroot}/lib/systemd/system/graphical.target.wants
181 mkdir -p %{buildroot}/lib/systemd/system/sockets.target.wants
182 ln -s ../download-provider.service %{buildroot}/lib/systemd/system/graphical.target.wants/
183 ln -s ../download-provider.socket %{buildroot}/lib/systemd/system/sockets.target.wants/
186 mkdir -p %{buildroot}%{upgrade_script_path}
187 cp -f 500.download-provider_upgrade.sh %{buildroot}%{upgrade_script_path}
190 #make notify dir in post section for smack
191 mkdir %{TZ_SYS_GLOBALUSER_DATA}/download-provider
192 mkdir -p %{_notifydir}
193 chown -R web_fw:web_fw %{_notifydir}
194 chsmack -a 'System::Shared' %{_notifydir}
195 chsmack -t %{_notifydir}
196 mkdir -p --mode=0700 %{_databasedir}
197 chown -R web_fw:web_fw %{_databasedir}
198 chsmack -a 'System' %{_databasedir}
199 mkdir -p --mode=0700 %{_database_client_dir}
200 chsmack -a 'System' %{_database_client_dir}
201 chown -R web_fw:web_fw %{_database_client_dir}
202 chown -R web_fw:web_fw %{_data_install_path}
205 %defattr(-,root,root,-)
206 %manifest %{_manifest_name}
208 %{_localedir}/*/*/download-provider.mo
210 /lib/systemd/system/download-provider.service
211 /lib/systemd/system/graphical.target.wants/download-provider.service
212 /lib/systemd/system/download-provider.socket
213 /lib/systemd/system/sockets.target.wants/download-provider.socket
215 %attr(0544,root,root) %{_logdump_script_dir}/dump-%{name}.sh
217 %attr(0644,root,root) /etc/vasum/vsmzone.resource/download-provider.res
218 %{upgrade_script_path}/500.download-provider_upgrade.sh
219 %if ("%{VD_PRODUCT_TYPE}" == "AUDIO") || ("%{VD_PRODUCT_TYPE}" == "TV") || ("%{VD_PRODUCT_TYPE}" == "LFD") || ("%{VD_PRODUCT_TYPE}" == "HTV") || ("%{VD_PRODUCT_TYPE}" == "AV")
220 /etc/notstrip/download-provider.notstrip
222 %license LICENSE.APLv2
225 %defattr(-,root,root,-)
228 %{_libdir}/pkgconfig/download-provider.pc
229 %{_libdir}/pkgconfig/download-provider-interface.pc
230 %{_includedir}/download-provider/download-provider.h
231 %{_includedir}/download-provider/download-provider-interface.h