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)
39 Description: Download the contents in background
42 Summary: download-provider
43 Group: Development/Libraries
44 Requires: %{name} = %{version}-%{release}
47 Description: Download the contents in background (development files)
52 %define _data_install_path %{TZ_SYS_GLOBALUSER_DATA}/%{name}
53 %define _resource_install_path /usr/share/%{name}
54 %define _imagedir %{_resource_install_path}/images
55 %define _localedir %{_resource_install_path}/locales
56 %define _databasedir %{_data_install_path}/database
57 %define _database_client_dir %{_databasedir}/clients
58 %define _notifydir %{_data_install_path}/notify
59 %define _ipc_socket /tmp/.download-provider.sock
60 %define _logdump_script_dir %{TZ_SYS_ETC}/dump.d/module.d
61 %define _http_lib libcurl
62 %define _manifest_name %{name}.manifest
65 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
66 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
67 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
69 %cmake -DTZ_SYS_GLOBALUSER_DATA=%TZ_SYS_GLOBALUSER_DATA \
70 -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
71 -DBIN_INSTALL_DIR:PATH=%{_bindir} \
72 -DLIB_INSTALL_DIR:PATH=%{_libdir} \
73 -DLIB_AGENT_PATH="/usr/%{?_lib}/libdownloadagent2.so.0.1.0" \
74 -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \
76 -DPKG_VERSION=%{version} \
77 -DPKG_RELEASE=%{release} \
78 -DIPC_SOCKET:PATH=%{_ipc_socket} \
79 -DPROVIDER_DIR:PATH=%{_data_install_path} \
80 -DNOTIFY_DIR:PATH=%{_notifydir} \
81 -DDATABASE_DIR:PATH=%{_databasedir} \
82 -DDATABASE_CLIENT_DIR:PATH=%{_database_client_dir} \
83 -DIMAGE_DIR:PATH=%{_imagedir} \
84 -DLOCALE_DIR:PATH=%{_localedir} \
85 -DSUPPORT_WIFI_DIRECT:BOOL=OFF \
86 -DSUPPORT_DOWNLOAD_BOOSTER:BOOL=OFF \
87 -DSUPPORT_NOTIFICATION:BOOL=ON \
88 -DSUPPORT_LOG_MESSAGE:BOOL=ON \
89 -DSUPPORT_OMA_DRM:BOOL=OFF \
90 -DSUPPORT_COMPANION_MODE:BOOL=OFF \
91 -DTIZEN_2_3_UX:BOOL=ON \
92 -DCMAKE_LOG_DUMP_SCRIPT_DIR=%{_logdump_script_dir} \
93 -DHTTP_LIB=%{_http_lib} \
94 %if "%{?_lib}" == "lib64"
95 %{?_cmake_lib_suffix64} \
97 %{?_cmake_skip_rpath} \
98 -DBUILD_SHARED_LIBS:BOOL=ON \
101 make %{?jobs:-j%jobs}
106 %if "{tizen_profile_name}" == "tv"
107 mkdir -p %{buildroot}/etc/notstrip/
108 install -m 644 packaging/download-provider.notstrip %{buildroot}/etc/notstrip/download-provider.notstrip
112 mkdir -p %{buildroot}/etc/vasum/vsmzone.resource/
113 mv %{buildroot}/usr/share/download-provider/download-provider.res %{buildroot}/etc/vasum/vsmzone.resource/
115 mkdir -p %{buildroot}/lib/systemd/system/graphical.target.wants
116 mkdir -p %{buildroot}/lib/systemd/system/sockets.target.wants
117 ln -s ../download-provider.service %{buildroot}/lib/systemd/system/graphical.target.wants/
118 ln -s ../download-provider.socket %{buildroot}/lib/systemd/system/sockets.target.wants/
121 #make notify dir in post section for smack
122 mkdir %{TZ_SYS_GLOBALUSER_DATA}/download-provider
123 mkdir -p %{_notifydir}
124 chown -R web_fw:web_fw %{_notifydir}
125 chsmack -a 'System::Shared' %{_notifydir}
126 chsmack -t %{_notifydir}
127 mkdir -p --mode=0700 %{_databasedir}
128 chown -R web_fw:web_fw %{_databasedir}
129 chsmack -a 'System' %{_databasedir}
130 mkdir -p --mode=0700 %{_database_client_dir}
131 chsmack -a 'System' %{_database_client_dir}
132 chown -R web_fw:web_fw %{_database_client_dir}
133 chown -R web_fw:web_fw %{_data_install_path}
136 %defattr(-,root,root,-)
137 %manifest %{_manifest_name}
139 %{_localedir}/*/*/download-provider.mo
141 /lib/systemd/system/download-provider.service
142 /lib/systemd/system/graphical.target.wants/download-provider.service
143 /lib/systemd/system/download-provider.socket
144 /lib/systemd/system/sockets.target.wants/download-provider.socket
146 %attr(0544,root,root) %{_logdump_script_dir}/dump-%{name}.sh
148 %attr(0644,root,root) /etc/vasum/vsmzone.resource/download-provider.res
149 %if "{tizen_profile_name}" == "tv"
150 /etc/notstrip/download-provider.notstrip
152 %license LICENSE.APLv2
155 %defattr(-,root,root,-)
158 %{_libdir}/pkgconfig/download-provider.pc
159 %{_libdir}/pkgconfig/download-provider-interface.pc
160 %{_includedir}/download-provider/download-provider.h
161 %{_includedir}/download-provider/download-provider-interface.h