1 Name: download-provider
2 Summary: Download the contents in background
5 Group: Development/Libraries
7 Source0: %{name}-%{version}.tar.gz
8 Requires(post): libdevice-node
10 Requires(post): connman
11 Requires: security-config
13 BuildRequires: pkgconfig(dlog)
14 BuildRequires: pkgconfig(gobject-2.0)
15 BuildRequires: pkgconfig(xdgmime)
16 BuildRequires: pkgconfig(vconf)
17 BuildRequires: pkgconfig(sqlite3)
18 BuildRequires: pkgconfig(bundle)
19 BuildRequires: pkgconfig(capi-base-common)
20 BuildRequires: pkgconfig(capi-appfw-app-manager)
21 BuildRequires: pkgconfig(capi-appfw-application)
22 BuildRequires: pkgconfig(capi-network-connection)
23 BuildRequires: pkgconfig(appsvc)
24 BuildRequires: pkgconfig(libcurl)
25 BuildRequires: pkgconfig(capi-content-mime-type)
26 BuildRequires: gettext-devel
27 BuildRequires: pkgconfig(libsystemd-daemon)
28 BuildRequires: pkgconfig(capi-network-wifi-direct)
29 BuildRequires: pkgconfig(storage)
30 BuildRequires: pkgconfig(notification)
31 BuildRequires: pkgconfig(cynara-client)
32 BuildRequires: pkgconfig(cynara-client-async)
33 BuildRequires: pkgconfig(cynara-creds-socket)
34 BuildRequires: pkgconfig(cynara-creds-dbus)
35 BuildRequires: pkgconfig(tpkp-curl)
36 BuildRequires: pkgconfig(libtzplatform-config)
40 BuildRequires: pkgconfig(gmock)
44 Description: Download the contents in background
47 Summary: download-provider
48 Group: Development/Libraries
49 Requires: %{name} = %{version}-%{release}
52 Description: Download the contents in background (development files)
57 %define _data_install_path %{TZ_SYS_GLOBALUSER_DATA}/%{name}
58 %define _resource_install_path /usr/share/%{name}
59 %define _imagedir %{_resource_install_path}/images
60 %define _localedir %{_resource_install_path}/locales
61 %define _databasedir %{_data_install_path}/database
62 %define _database_client_dir %{_databasedir}/clients
63 %define _notifydir %{_data_install_path}/notify
64 %define _ipc_socket /tmp/.download-provider.sock
65 %define _logdump_script_dir %{TZ_SYS_ETC}/dump.d/module.d
66 %define _http_lib libcurl
67 %define _manifest_name %{name}.manifest
70 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
71 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
72 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
75 export LDFLAGS+=" -lgcov"
78 %cmake -DTZ_SYS_GLOBALUSER_DATA=%TZ_SYS_GLOBALUSER_DATA \
79 -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
80 -DBIN_INSTALL_DIR:PATH=%{_bindir} \
81 -DLIB_INSTALL_DIR:PATH=%{_libdir} \
82 -DLIB_AGENT_PATH="/usr/%{?_lib}/libdownloadagent2.so.0.1.0" \
83 -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \
85 -DPKG_VERSION=%{version} \
86 -DPKG_RELEASE=%{release} \
87 -DIPC_SOCKET:PATH=%{_ipc_socket} \
88 -DPROVIDER_DIR:PATH=%{_data_install_path} \
89 -DNOTIFY_DIR:PATH=%{_notifydir} \
90 -DDATABASE_DIR:PATH=%{_databasedir} \
91 -DDATABASE_CLIENT_DIR:PATH=%{_database_client_dir} \
92 -DIMAGE_DIR:PATH=%{_imagedir} \
93 -DLOCALE_DIR:PATH=%{_localedir} \
94 -DSUPPORT_WIFI_DIRECT:BOOL=OFF \
95 -DSUPPORT_DOWNLOAD_BOOSTER:BOOL=OFF \
96 -DSUPPORT_NOTIFICATION:BOOL=ON \
97 -DSUPPORT_LOG_MESSAGE:BOOL=ON \
98 -DSUPPORT_OMA_DRM:BOOL=OFF \
99 -DSUPPORT_COMPANION_MODE:BOOL=OFF \
100 -DTIZEN_2_3_UX:BOOL=ON \
101 -DCMAKE_LOG_DUMP_SCRIPT_DIR=%{_logdump_script_dir} \
102 -DHTTP_LIB=%{_http_lib} \
103 %if "%{?_lib}" == "lib64"
104 %{?_cmake_lib_suffix64} \
106 %{?_cmake_skip_rpath} \
107 -DBUILD_SHARED_LIBS:BOOL=ON \
108 -DBUILD_GTESTS=%{?gtests:1}%{!?gtests:0} \
109 -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0} \
112 make %{?jobs:-j%jobs}
117 %if "{tizen_profile_name}" == "tv"
118 mkdir -p %{buildroot}/etc/notstrip/
119 install -m 644 packaging/download-provider.notstrip %{buildroot}/etc/notstrip/download-provider.notstrip
123 mkdir -p %{buildroot}/etc/vasum/vsmzone.resource/
124 mv %{buildroot}/usr/share/download-provider/download-provider.res %{buildroot}/etc/vasum/vsmzone.resource/
126 mkdir -p %{buildroot}/lib/systemd/system/graphical.target.wants
127 mkdir -p %{buildroot}/lib/systemd/system/sockets.target.wants
128 ln -s ../download-provider.service %{buildroot}/lib/systemd/system/graphical.target.wants/
129 ln -s ../download-provider.socket %{buildroot}/lib/systemd/system/sockets.target.wants/
132 #make notify dir in post section for smack
133 mkdir %{TZ_SYS_GLOBALUSER_DATA}/download-provider
134 mkdir -p %{_notifydir}
135 chown -R web_fw:web_fw %{_notifydir}
136 chsmack -a 'System::Shared' %{_notifydir}
137 chsmack -t %{_notifydir}
138 mkdir -p --mode=0700 %{_databasedir}
139 chown -R web_fw:web_fw %{_databasedir}
140 chsmack -a 'System' %{_databasedir}
141 mkdir -p --mode=0700 %{_database_client_dir}
142 chsmack -a 'System' %{_database_client_dir}
143 chown -R web_fw:web_fw %{_database_client_dir}
144 chown -R web_fw:web_fw %{_data_install_path}
147 %defattr(-,root,root,-)
148 %manifest %{_manifest_name}
150 %{_localedir}/*/*/download-provider.mo
152 /lib/systemd/system/download-provider.service
153 /lib/systemd/system/graphical.target.wants/download-provider.service
154 /lib/systemd/system/download-provider.socket
155 /lib/systemd/system/sockets.target.wants/download-provider.socket
157 %attr(0544,root,root) %{_logdump_script_dir}/dump-%{name}.sh
159 %attr(0644,root,root) /etc/vasum/vsmzone.resource/download-provider.res
160 %if "{tizen_profile_name}" == "tv"
161 /etc/notstrip/download-provider.notstrip
163 %license LICENSE.APLv2
166 %defattr(-,root,root,-)
169 %{_libdir}/pkgconfig/download-provider.pc
170 %{_libdir}/pkgconfig/download-provider-interface.pc
171 %{_libdir}/pkgconfig/download-agent.pc
172 %{_includedir}/download-provider/download-provider.h
173 %{_includedir}/download-provider/download-provider-interface.h
174 %{_includedir}/download-provider/download-agent-interface.h