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
205 rm %{buildroot}%{TZ_SYS_GLOBALUSER_DB}/.msg_service.db-journal
206 touch %{buildroot}%{TZ_SYS_GLOBALUSER_DB}/.msg_service.db-journal
211 chmod 640 %{TZ_SYS_GLOBALUSER_DB}/.msg_service.db
212 chmod 660 %{TZ_SYS_GLOBALUSER_DB}/.msg_service.db-journal
214 mkdir -p -m 770 %{TZ_SYS_GLOBALUSER_DATA}/msg-service
215 mkdir -p -m 750 %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata
216 mkdir -p -m 750 %{TZ_SYS_GLOBALUSER_DATA}/msg-service/smildata
217 mkdir -p -m 770 %{TZ_SYS_GLOBALUSER_DATA}/msg-service/ipcdata
218 mkdir -p -m 750 %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata/thumbnails
220 chown messaging:priv_message_read %{TZ_SYS_GLOBALUSER_DB}/.msg_service.db
221 chown messaging:priv_message_read %{TZ_SYS_GLOBALUSER_DB}/.msg_service.db-journal
222 chown messaging:priv_message_read %{TZ_SYS_GLOBALUSER_DATA}/msg-service
223 chown messaging:priv_message_read %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata
224 chown messaging:priv_message_read %{TZ_SYS_GLOBALUSER_DATA}/msg-service/smildata
225 chown messaging:priv_message_read %{TZ_SYS_GLOBALUSER_DATA}/msg-service/ipcdata
226 chown messaging:priv_message_read %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata/thumbnails
228 chmod g+s %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata
229 chmod g+s %{TZ_SYS_GLOBALUSER_DATA}/msg-service/smildata
230 chmod g+s %{TZ_SYS_GLOBALUSER_DATA}/msg-service/ipcdata
231 chmod g+s %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata/thumbnails
233 chsmack -a "*" %{TZ_SYS_GLOBALUSER_DB}/.msg_service.db
234 chsmack -a "*" %{TZ_SYS_GLOBALUSER_DB}/.msg_service.db-journal
235 chsmack -a "System::Shared" %{TZ_SYS_GLOBALUSER_DATA}/msg-service/
236 chsmack -a "System::Shared" %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata -t
237 chsmack -a "System::Shared" %{TZ_SYS_GLOBALUSER_DATA}/msg-service/smildata -t
238 chsmack -a "System::Run" %{TZ_SYS_GLOBALUSER_DATA}/msg-service/ipcdata -t
239 chsmack -a "System::Shared" %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata/thumbnails -t
241 #Multi group to ipcdata directory
242 chmod o= %{TZ_SYS_GLOBALUSER_DATA}/msg-service/ipcdata
243 setfacl -m group:priv_message_write:rw %{TZ_SYS_GLOBALUSER_DATA}/msg-service/ipcdata
245 %post -n sms-plugin -p /sbin/ldconfig
246 %post -n mms-plugin -p /sbin/ldconfig
251 %postun -p /sbin/ldconfig
253 %postun tools -p /sbin/ldconfig
254 %postun -n sms-plugin -p /sbin/ldconfig
255 %postun -n mms-plugin -p /sbin/ldconfig
258 %manifest msg-service.manifest
259 %license LICENSE.APLv2
260 %{_bindir}/msg-server
261 %{_libdir}/libmsg_plugin_manager.so
262 %{_libdir}/libmsg_mapi.so.*
263 %{_libdir}/libmsg_framework_handler.so
264 %{_libdir}/libmsg_transaction_manager.so
265 %{_libdir}/libmsg_utils.so
266 %{_libdir}/libmsg_externals.so
267 %{_libdir}/libmsg_transaction_proxy.so
268 %{_libdir}/libmsg_vobject.so
269 /usr/share/upgrade/scripts/500.msg-service.patch.sh
272 %license LICENSE.APLv2
273 %{_libdir}/libmsg_mapi.so
274 %{_libdir}/pkgconfig/msg-service.pc
275 %{_includedir}/msg-service/*
278 %manifest msg-service-tools.manifest
279 %license LICENSE.APLv2
280 %config(noreplace) %{TZ_SYS_GLOBALUSER_DB}/.msg_service.db*
281 %{_unitdir}/msg-server.service
282 %{_unitdir}/multi-user.target.wants/msg-server.service
283 %{_unitdir}/msg-server.socket
284 %{_unitdir}/sockets.target.wants/msg-server.socket
287 %manifest sms-plugin.manifest
288 %license LICENSE.APLv2
289 %{_libdir}/libmsg_sms_plugin.so
292 %manifest mms-plugin.manifest
293 %license LICENSE.APLv2
294 %{_libdir}/libmsg_mms_plugin.so
296 %if "%{?profile}" == "mobile"
297 %files -n msg-manager
298 %manifest msg-manager.manifest
299 %license LICENSE.APLv2
300 %{APP_BINDIR}/msg-manager
301 %{APP_MANIFESTDIR}/*.xml
302 %{APP_PREFIX}/author-signature.xml
303 %{APP_PREFIX}/signature1.xml