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)
37 BuildRequires: elementary-tizen
41 BuildRequires: pkgconfig(gmock)
45 Description: Download the contents in background
48 Summary: download-provider
49 Group: Development/Libraries
50 Requires: %{name} = %{version}-%{release}
53 Description: Download the contents in background (development files)
58 %define _data_install_path %{TZ_SYS_GLOBALUSER_DATA}/%{name}
59 %define _resource_install_path /usr/share/%{name}
60 %define _imagedir %{_resource_install_path}/images
61 %define _localedir %{_resource_install_path}/locales
62 %define _databasedir %{_data_install_path}/database
63 %define _database_client_dir %{_databasedir}/clients
64 %define _notifydir %{_data_install_path}/notify
65 %define _ipc_socket /tmp/.download-provider.sock
66 %define _logdump_script_dir %{TZ_SYS_ETC}/dump.d/module.d
67 %define _http_lib libcurl
68 %define _manifest_name %{name}.manifest
71 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
72 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
73 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
76 export LDFLAGS+=" -lgcov"
79 %cmake -DTZ_SYS_GLOBALUSER_DATA=%TZ_SYS_GLOBALUSER_DATA \
80 -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
81 -DBIN_INSTALL_DIR:PATH=%{_bindir} \
82 -DLIB_INSTALL_DIR:PATH=%{_libdir} \
83 -DLIB_AGENT_PATH="/usr/%{?_lib}/libdownloadagent2.so.0.1.0" \
84 -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \
86 -DPKG_VERSION=%{version} \
87 -DPKG_RELEASE=%{release} \
88 -DIPC_SOCKET:PATH=%{_ipc_socket} \
89 -DPROVIDER_DIR:PATH=%{_data_install_path} \
90 -DNOTIFY_DIR:PATH=%{_notifydir} \
91 -DDATABASE_DIR:PATH=%{_databasedir} \
92 -DDATABASE_CLIENT_DIR:PATH=%{_database_client_dir} \
93 -DIMAGE_DIR:PATH=%{_imagedir} \
94 -DLOCALE_DIR:PATH=%{_localedir} \
95 -DSUPPORT_WIFI_DIRECT:BOOL=OFF \
96 -DSUPPORT_DOWNLOAD_BOOSTER:BOOL=OFF \
97 -DSUPPORT_NOTIFICATION:BOOL=ON \
98 -DSUPPORT_LOG_MESSAGE:BOOL=ON \
99 -DSUPPORT_OMA_DRM:BOOL=OFF \
100 -DSUPPORT_COMPANION_MODE:BOOL=OFF \
101 -DTIZEN_2_3_UX:BOOL=ON \
102 -DCMAKE_LOG_DUMP_SCRIPT_DIR=%{_logdump_script_dir} \
103 -DHTTP_LIB=%{_http_lib} \
104 %if "%{?_lib}" == "lib64"
105 %{?_cmake_lib_suffix64} \
107 %{?_cmake_skip_rpath} \
108 -DBUILD_SHARED_LIBS:BOOL=ON \
109 -DBUILD_GTESTS=%{?gtests:1}%{!?gtests:0} \
110 -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0} \
113 make %{?jobs:-j%jobs}
118 %if "{tizen_profile_name}" == "tv"
119 mkdir -p %{buildroot}/etc/notstrip/
120 install -m 644 packaging/download-provider.notstrip %{buildroot}/etc/notstrip/download-provider.notstrip
124 mkdir -p %{buildroot}/etc/vasum/vsmzone.resource/
125 mv %{buildroot}/usr/share/download-provider/download-provider.res %{buildroot}/etc/vasum/vsmzone.resource/
127 mkdir -p %{buildroot}/lib/systemd/system/graphical.target.wants
128 mkdir -p %{buildroot}/lib/systemd/system/sockets.target.wants
129 ln -s ../download-provider.service %{buildroot}/lib/systemd/system/graphical.target.wants/
130 ln -s ../download-provider.socket %{buildroot}/lib/systemd/system/sockets.target.wants/
133 #make notify dir in post section for smack
134 mkdir %{TZ_SYS_GLOBALUSER_DATA}/download-provider
135 mkdir -p %{_notifydir}
136 chown -R web_fw:web_fw %{_notifydir}
137 chsmack -a 'System::Shared' %{_notifydir}
138 chsmack -t %{_notifydir}
139 mkdir -p --mode=0700 %{_databasedir}
140 chown -R web_fw:web_fw %{_databasedir}
141 chsmack -a 'System' %{_databasedir}
142 mkdir -p --mode=0700 %{_database_client_dir}
143 chsmack -a 'System' %{_database_client_dir}
144 chown -R web_fw:web_fw %{_database_client_dir}
145 chown -R web_fw:web_fw %{_data_install_path}
148 %defattr(-,root,root,-)
149 %manifest %{_manifest_name}
151 %{_localedir}/*/*/download-provider.mo
153 /lib/systemd/system/download-provider.service
154 /lib/systemd/system/graphical.target.wants/download-provider.service
155 /lib/systemd/system/download-provider.socket
156 /lib/systemd/system/sockets.target.wants/download-provider.socket
158 %attr(0544,root,root) %{_logdump_script_dir}/dump-%{name}.sh
160 %attr(0644,root,root) /etc/vasum/vsmzone.resource/download-provider.res
161 %if "{tizen_profile_name}" == "tv"
162 /etc/notstrip/download-provider.notstrip
164 %license LICENSE.APLv2
167 %defattr(-,root,root,-)
170 %{_libdir}/pkgconfig/download-provider.pc
171 %{_libdir}/pkgconfig/download-provider-interface.pc
172 %{_libdir}/pkgconfig/download-agent.pc
173 %{_includedir}/download-provider/download-provider.h
174 %{_includedir}/download-provider/download-provider-interface.h
175 %{_includedir}/download-provider/download-agent-interface.h