5 Summary: Messaging Framework Library
6 Group: System/Libraries
7 Source0: %{name}-%{version}.tar.gz
8 Source1: msg-server.service
9 Source2: msg-server.socket
11 %if "%{?profile}" == "tv"
12 ExcludeArch: %{arm} %ix86 x86_64
15 Requires(post): /usr/bin/sqlite3
16 Requires(post): /sbin/ldconfig
17 Requires(postun): /sbin/ldconfig
18 Requires(post): systemd
19 Requires(postun): systemd
21 Requires: security-config
23 BuildRequires: pkgconfig(alarm-service)
24 BuildRequires: pkgconfig(aul)
25 BuildRequires: pkgconfig(boost)
26 BuildRequires: pkgconfig(bundle)
27 BuildRequires: pkgconfig(capi-media-image-util)
28 BuildRequires: pkgconfig(capi-media-metadata-extractor)
29 BuildRequires: pkgconfig(capi-media-thumbnail-util)
30 BuildRequires: pkgconfig(capi-network-connection)
31 BuildRequires: pkgconfig(capi-system-device)
32 BuildRequires: pkgconfig(capi-system-info)
33 BuildRequires: pkgconfig(capi-telephony)
34 BuildRequires: pkgconfig(csr)
35 BuildRequires: pkgconfig(cynara-client)
36 BuildRequires: pkgconfig(cynara-creds-commons)
37 BuildRequires: pkgconfig(cynara-creds-socket)
38 BuildRequires: pkgconfig(cynara-session)
39 BuildRequires: pkgconfig(deviced)
40 BuildRequires: pkgconfig(dlog)
41 BuildRequires: pkgconfig(dpm)
42 BuildRequires: pkgconfig(eventsystem)
43 BuildRequires: pkgconfig(gio-2.0)
44 BuildRequires: pkgconfig(icu-uc)
45 BuildRequires: pkgconfig(json-glib-1.0)
46 BuildRequires: pkgconfig(lbs-dbus)
47 BuildRequires: pkgconfig(libcurl)
48 BuildRequires: pkgconfig(libsmack)
49 BuildRequires: pkgconfig(libsystemd-login)
50 BuildRequires: pkgconfig(libtzplatform-config)
51 BuildRequires: pkgconfig(libxml-2.0)
52 BuildRequires: pkgconfig(libwbxml2)
53 BuildRequires: pkgconfig(motion)
54 BuildRequires: pkgconfig(sqlite3)
55 BuildRequires: pkgconfig(tapi)
56 BuildRequires: pkgconfig(vconf)
57 %if "%{?profile}" != "wearable"
58 BuildRequires: pkgconfig(contacts-service2)
60 %if "%{?profile}" == "mobile"
61 BuildRequires: gettext-tools
62 BuildRequires: hash-signer
63 BuildRequires: pkgconfig(badge)
64 BuildRequires: pkgconfig(callmgr_client)
65 BuildRequires: pkgconfig(capi-appfw-application)
66 BuildRequires: pkgconfig(capi-appfw-package-manager)
67 BuildRequires: pkgconfig(capi-appfw-service-application)
68 BuildRequires: pkgconfig(capi-media-player)
69 BuildRequires: pkgconfig(capi-media-sound-manager)
70 BuildRequires: pkgconfig(feedback)
71 BuildRequires: pkgconfig(notification)
75 Description: Messaging Framework Library
80 Summary: Messaging Framework Library (development)
81 Requires: %{name} = %{version}-%{release}
82 Group: Development/Libraries
85 Description: Messaging Framework Library (development)
90 Summary: Messaging server application
91 Requires: %{name} = %{version}-%{release}
92 Group: TO_BU / FILL_IN
93 Requires(post): /usr/bin/sqlite3
94 Requires(post): /sbin/ldconfig
95 Requires(postun): /sbin/ldconfig
98 Description: Messaging server application
101 %package -n sms-plugin
103 Summary: SMS plugin library
104 Requires: %{name} = %{version}-%{release}
105 Group: System/Libraries
106 Requires(post): /sbin/ldconfig
107 Requires(postun): /sbin/ldconfig
109 %description -n sms-plugin
110 Description: SMS plugin library
112 %package -n mms-plugin
114 Summary: MMS plugin library
115 Requires: %{name} = %{version}-%{release}
116 Group: System/Libraries
117 Requires(post): /sbin/ldconfig
118 Requires(postun): /sbin/ldconfig
120 %description -n mms-plugin
121 Description: MMS plugin library
123 %package -n msg-manager
125 Summary: Message manager application
126 Requires: %{name} = %{version}-%{release}
129 %description -n msg-manager
130 Description: Message manager application
132 %if "%{?profile}" == "mobile"
133 %define APP_PKGNAME org.tizen.msg-manager
134 %define APP_PREFIX %{TZ_SYS_RO_APP}/%{APP_PKGNAME}
135 %define APP_BINDIR %{APP_PREFIX}/bin
136 %define APP_RESDIR %{APP_PREFIX}/res
137 %define APP_LOCALEDIR %{APP_RESDIR}/locale
138 %define APP_MANIFESTDIR %{TZ_SYS_RO_PACKAGES}
145 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
146 -DLIB_INSTALL_DIR=%{_libdir} \
147 %if "%{?profile}" == "mobile"
148 -DAPP_MANIFESTDIR=%{APP_MANIFESTDIR} \
149 -DAPP_BINDIR=%{APP_BINDIR} \
150 -DAPP_LOCALEDIR=%{APP_LOCALEDIR} \
152 -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
153 -DTZ_SYS_GLOBALUSER_DATA=%TZ_SYS_GLOBALUSER_DATA \
154 -DTZ_SYS_GLOBALUSER_DB=%TZ_SYS_GLOBALUSER_DB \
155 -DTZ_SYS_HOME=%TZ_SYS_HOME \
156 -DTZ_SYS_BIN=%TZ_SYS_BIN \
158 -D_TIZEN_I586_ENABLED:BOOL=ON \
160 -D_TIZEN_I586_ENABLED:BOOL=OFF \
162 %if "%{?profile}" == "wearable"
163 -D_MSG_WEARABLE_PROFILE:BOOL=ON \
165 -D_MSG_WEARABLE_PROFILE:BOOL=OFF \
167 %if "%{?profile}" == "mobile"
168 -D_MSG_MOBILE_PROFILE:BOOL=ON \
170 -D_MSG_MOBILE_PROFILE:BOOL=OFF \
173 make %{?jobs:-j%jobs}
177 mkdir -p %{buildroot}/usr/share/license
178 mkdir -p %{buildroot}/etc/config
179 mkdir -p %{buildroot}/usr/share/upgrade/scripts
180 cp -f 500.msg-service.patch.sh %{buildroot}/usr/share/upgrade/scripts
184 %if "%{?profile}" == "mobile"
186 %define tizen_sign_base %{APP_PREFIX}
187 %define tizen_sign_level platform
188 %define tizen_author_sign 1
189 %define tizen_dist_sign 1
192 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
193 install -m 0644 %SOURCE1 %{buildroot}%{_unitdir}/msg-server.service
194 %install_service multi-user.target.wants msg-server.service
196 mkdir -p %{buildroot}%{_unitdir}/sockets.target.wants
197 install -m 0644 %SOURCE2 %{buildroot}%{_unitdir}/msg-server.socket
198 %install_service sockets.target.wants msg-server.socket
200 mkdir -p %{buildroot}%{TZ_SYS_GLOBALUSER_DB}
201 sqlite3 %{buildroot}%{TZ_SYS_GLOBALUSER_DB}/.msg_service.db "PRAGMA journal_mode = PERSIST;"
202 sqlite3 %{buildroot}%{TZ_SYS_GLOBALUSER_DB}/.msg_service.db < %{buildroot}/usr/share/msg-service/msg-service-db.sql
204 rm %{buildroot}/usr/share/msg-service/msg-service-db.sql
209 chmod 640 %{TZ_SYS_GLOBALUSER_DB}/.msg_service.db
210 chmod 660 %{TZ_SYS_GLOBALUSER_DB}/.msg_service.db-journal
212 mkdir -p -m 770 %{TZ_SYS_GLOBALUSER_DATA}/msg-service
213 mkdir -p -m 750 %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata
214 mkdir -p -m 750 %{TZ_SYS_GLOBALUSER_DATA}/msg-service/smildata
215 mkdir -p -m 770 %{TZ_SYS_GLOBALUSER_DATA}/msg-service/ipcdata
216 mkdir -p -m 750 %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata/thumbnails
218 chown messaging:priv_message_read %{TZ_SYS_GLOBALUSER_DB}/.msg_service.db
219 chown messaging:priv_message_read %{TZ_SYS_GLOBALUSER_DB}/.msg_service.db-journal
220 chown messaging:priv_message_read %{TZ_SYS_GLOBALUSER_DATA}/msg-service
221 chown messaging:priv_message_read %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata
222 chown messaging:priv_message_read %{TZ_SYS_GLOBALUSER_DATA}/msg-service/smildata
223 chown messaging:priv_message_read %{TZ_SYS_GLOBALUSER_DATA}/msg-service/ipcdata
224 chown messaging:priv_message_read %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata/thumbnails
226 chmod g+s %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata
227 chmod g+s %{TZ_SYS_GLOBALUSER_DATA}/msg-service/smildata
228 chmod g+s %{TZ_SYS_GLOBALUSER_DATA}/msg-service/ipcdata
229 chmod g+s %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata/thumbnails
231 chsmack -a "*" %{TZ_SYS_GLOBALUSER_DB}/.msg_service.db
232 chsmack -a "*" %{TZ_SYS_GLOBALUSER_DB}/.msg_service.db-journal
233 chsmack -a "System::Shared" %{TZ_SYS_GLOBALUSER_DATA}/msg-service/
234 chsmack -a "System::Shared" %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata -t
235 chsmack -a "System::Shared" %{TZ_SYS_GLOBALUSER_DATA}/msg-service/smildata -t
236 chsmack -a "System::Run" %{TZ_SYS_GLOBALUSER_DATA}/msg-service/ipcdata -t
237 chsmack -a "System::Shared" %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata/thumbnails -t
239 #Multi group to ipcdata directory
240 chmod o= %{TZ_SYS_GLOBALUSER_DATA}/msg-service/ipcdata
241 setfacl -m group:priv_message_write:rw %{TZ_SYS_GLOBALUSER_DATA}/msg-service/ipcdata
243 %post -n sms-plugin -p /sbin/ldconfig
244 %post -n mms-plugin -p /sbin/ldconfig
249 %postun -p /sbin/ldconfig
251 %postun tools -p /sbin/ldconfig
252 %postun -n sms-plugin -p /sbin/ldconfig
253 %postun -n mms-plugin -p /sbin/ldconfig
256 %manifest msg-service.manifest
257 %license LICENSE.APLv2
258 %{_bindir}/msg-server
259 %{_libdir}/libmsg_plugin_manager.so
260 %{_libdir}/libmsg_mapi.so.*
261 %{_libdir}/libmsg_framework_handler.so
262 %{_libdir}/libmsg_transaction_manager.so
263 %{_libdir}/libmsg_utils.so
264 %{_libdir}/libmsg_externals.so
265 %{_libdir}/libmsg_transaction_proxy.so
266 %{_libdir}/libmsg_vobject.so
267 /usr/share/upgrade/scripts/500.msg-service.patch.sh
270 %license LICENSE.APLv2
271 %{_libdir}/libmsg_mapi.so
272 %{_libdir}/pkgconfig/msg-service.pc
273 %{_includedir}/msg-service/*
276 %manifest msg-service-tools.manifest
277 %license LICENSE.APLv2
278 %config(noreplace) %{TZ_SYS_GLOBALUSER_DB}/.msg_service.db*
279 %{_unitdir}/msg-server.service
280 %{_unitdir}/multi-user.target.wants/msg-server.service
281 %{_unitdir}/msg-server.socket
282 %{_unitdir}/sockets.target.wants/msg-server.socket
285 %manifest sms-plugin.manifest
286 %license LICENSE.APLv2
287 %{_libdir}/libmsg_sms_plugin.so
290 %manifest mms-plugin.manifest
291 %license LICENSE.APLv2
292 %{_libdir}/libmsg_mms_plugin.so
294 %if "%{?profile}" == "mobile"
295 %files -n msg-manager
296 %manifest msg-manager.manifest
297 %license LICENSE.APLv2
298 %{APP_BINDIR}/msg-manager
299 %{APP_MANIFESTDIR}/*.xml
300 %{APP_PREFIX}/author-signature.xml
301 %{APP_PREFIX}/signature1.xml