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: pkgconfig(libsmack)
27 BuildRequires: gettext-devel
28 BuildRequires: pkgconfig(libsystemd-daemon)
29 BuildRequires: pkgconfig(capi-network-wifi-direct)
30 BuildRequires: pkgconfig(storage)
31 BuildRequires: pkgconfig(notification)
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(tpkp-curl)
37 BuildRequires: pkgconfig(libtzplatform-config)
40 Description: Download the contents in background
43 Summary: download-provider
44 Group: Development/Libraries
45 Requires: %{name} = %{version}-%{release}
48 Description: Download the contents in background (development files)
53 %define _data_install_path %{TZ_SYS_GLOBALUSER_DATA}/%{name}
54 %define _resource_install_path /usr/share/%{name}
55 %define _imagedir %{_resource_install_path}/images
56 %define _localedir %{_resource_install_path}/locales
57 %define _databasedir %{_data_install_path}/database
58 %define _database_client_dir %{_databasedir}/clients
59 %define _notifydir %{_data_install_path}/notify
60 %define _ipc_socket /tmp/.download-provider.sock
61 %define _logdump_script_dir %{TZ_SYS_ETC}/dump.d/module.d
62 %define _http_lib libcurl
63 %define _manifest_name %{name}.manifest
66 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
67 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
68 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
70 %cmake -DTZ_SYS_GLOBALUSER_DATA=%TZ_SYS_GLOBALUSER_DATA \
71 -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
72 -DBIN_INSTALL_DIR:PATH=%{_bindir} \
73 -DLIB_INSTALL_DIR:PATH=%{_libdir} \
74 -DLIB_AGENT_PATH="/usr/%{?_lib}/libdownloadagent2.so.0.1.0" \
75 -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \
77 -DPKG_VERSION=%{version} \
78 -DPKG_RELEASE=%{release} \
79 -DIPC_SOCKET:PATH=%{_ipc_socket} \
80 -DPROVIDER_DIR:PATH=%{_data_install_path} \
81 -DNOTIFY_DIR:PATH=%{_notifydir} \
82 -DDATABASE_DIR:PATH=%{_databasedir} \
83 -DDATABASE_CLIENT_DIR:PATH=%{_database_client_dir} \
84 -DIMAGE_DIR:PATH=%{_imagedir} \
85 -DLOCALE_DIR:PATH=%{_localedir} \
86 -DSUPPORT_WIFI_DIRECT:BOOL=OFF \
87 -DSUPPORT_DOWNLOAD_BOOSTER:BOOL=OFF \
88 -DSUPPORT_NOTIFICATION:BOOL=ON \
89 -DSUPPORT_LOG_MESSAGE:BOOL=ON \
90 -DSUPPORT_OMA_DRM:BOOL=OFF \
91 -DSUPPORT_SECURITY_PRIVILEGE:BOOL=OFF \
92 -DSUPPORT_COMPANION_MODE:BOOL=OFF \
93 -DTIZEN_2_3_UX:BOOL=ON \
94 -DCMAKE_LOG_DUMP_SCRIPT_DIR=%{_logdump_script_dir} \
95 -DHTTP_LIB=%{_http_lib} \
96 %if "%{?_lib}" == "lib64"
97 %{?_cmake_lib_suffix64} \
99 %{?_cmake_skip_rpath} \
100 -DBUILD_SHARED_LIBS:BOOL=ON \
103 make %{?jobs:-j%jobs}
108 %if "{tizen_profile_name}" == "tv"
109 mkdir -p %{buildroot}/etc/notstrip/
110 install -m 644 packaging/download-provider.notstrip %{buildroot}/etc/notstrip/download-provider.notstrip
114 mkdir -p %{buildroot}/etc/vasum/vsmzone.resource/
115 mv %{buildroot}/usr/share/download-provider/download-provider.res %{buildroot}/etc/vasum/vsmzone.resource/
117 mkdir -p %{buildroot}/lib/systemd/system/graphical.target.wants
118 mkdir -p %{buildroot}/lib/systemd/system/sockets.target.wants
119 ln -s ../download-provider.service %{buildroot}/lib/systemd/system/graphical.target.wants/
120 ln -s ../download-provider.socket %{buildroot}/lib/systemd/system/sockets.target.wants/
123 #make notify dir in post section for smack
124 mkdir %{TZ_SYS_GLOBALUSER_DATA}/download-provider
125 mkdir -p %{_notifydir}
126 chown -R web_fw:web_fw %{_notifydir}
127 chsmack -a 'System::Shared' %{_notifydir}
128 chsmack -t %{_notifydir}
129 mkdir -p --mode=0700 %{_databasedir}
130 chown -R web_fw:web_fw %{_databasedir}
131 chsmack -a 'System' %{_databasedir}
132 mkdir -p --mode=0700 %{_database_client_dir}
133 chsmack -a 'System' %{_database_client_dir}
134 chown -R web_fw:web_fw %{_database_client_dir}
135 chown -R web_fw:web_fw %{_data_install_path}
138 %defattr(-,root,root,-)
139 %manifest %{_manifest_name}
141 %{_localedir}/*/*/download-provider.mo
143 /lib/systemd/system/download-provider.service
144 /lib/systemd/system/graphical.target.wants/download-provider.service
145 /lib/systemd/system/download-provider.socket
146 /lib/systemd/system/sockets.target.wants/download-provider.socket
148 %attr(0544,root,root) %{_logdump_script_dir}/dump-%{name}.sh
150 %attr(0644,root,root) /etc/vasum/vsmzone.resource/download-provider.res
151 %if "{tizen_profile_name}" == "tv"
152 /etc/notstrip/download-provider.notstrip
154 %license LICENSE.APLv2
157 %defattr(-,root,root,-)
160 %{_libdir}/pkgconfig/download-provider.pc
161 %{_libdir}/pkgconfig/download-provider-interface.pc
162 %{_includedir}/download-provider/download-provider.h
163 %{_includedir}/download-provider/download-provider-interface.h