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(cynara-client)
35 BuildRequires: pkgconfig(cynara-creds-commons)
36 BuildRequires: pkgconfig(cynara-creds-socket)
37 BuildRequires: pkgconfig(cynara-session)
38 BuildRequires: pkgconfig(deviced)
39 BuildRequires: pkgconfig(dlog)
40 BuildRequires: pkgconfig(eventsystem)
41 BuildRequires: pkgconfig(gio-2.0)
42 BuildRequires: pkgconfig(icu-uc)
43 BuildRequires: pkgconfig(json-glib-1.0)
44 BuildRequires: pkgconfig(lbs-dbus)
45 BuildRequires: pkgconfig(libcurl)
46 BuildRequires: pkgconfig(libsmack)
47 BuildRequires: pkgconfig(libsystemd-login)
48 BuildRequires: pkgconfig(libtzplatform-config)
49 BuildRequires: pkgconfig(libxml-2.0)
50 BuildRequires: pkgconfig(libwbxml2)
51 BuildRequires: pkgconfig(motion)
52 BuildRequires: pkgconfig(sqlite3)
53 BuildRequires: pkgconfig(tapi)
54 BuildRequires: pkgconfig(vconf)
55 %if "%{?profile}" != "wearable"
56 BuildRequires: pkgconfig(contacts-service2)
58 %if "%{?profile}" == "mobile"
59 BuildRequires: gettext-tools
60 BuildRequires: hash-signer
61 BuildRequires: pkgconfig(badge)
62 BuildRequires: pkgconfig(callmgr_client)
63 BuildRequires: pkgconfig(capi-appfw-application)
64 BuildRequires: pkgconfig(capi-appfw-package-manager)
65 BuildRequires: pkgconfig(capi-appfw-service-application)
66 BuildRequires: pkgconfig(capi-media-player)
67 BuildRequires: pkgconfig(capi-media-sound-manager)
68 BuildRequires: pkgconfig(feedback)
69 BuildRequires: pkgconfig(notification)
73 Description: Messaging Framework Library
78 Summary: Messaging Framework Library (development)
79 Requires: %{name} = %{version}-%{release}
80 Group: Development/Libraries
83 Description: Messaging Framework Library (development)
88 Summary: Messaging server application
89 Requires: %{name} = %{version}-%{release}
90 Group: TO_BU / FILL_IN
91 Requires(post): /usr/bin/sqlite3
92 Requires(post): /sbin/ldconfig
93 Requires(postun): /sbin/ldconfig
96 Description: Messaging server application
99 %package -n sms-plugin
101 Summary: SMS plugin library
102 Requires: %{name} = %{version}-%{release}
103 Group: System/Libraries
104 Requires(post): /sbin/ldconfig
105 Requires(postun): /sbin/ldconfig
107 %description -n sms-plugin
108 Description: SMS plugin library
110 %package -n mms-plugin
112 Summary: MMS plugin library
113 Requires: %{name} = %{version}-%{release}
114 Group: System/Libraries
115 Requires(post): /sbin/ldconfig
116 Requires(postun): /sbin/ldconfig
118 %description -n mms-plugin
119 Description: MMS plugin library
121 %package -n msg-manager
123 Summary: Message manager application
124 Requires: %{name} = %{version}-%{release}
127 %description -n msg-manager
128 Description: Message manager application
130 %if "%{?profile}" == "mobile"
131 %define APP_PKGNAME org.tizen.msg-manager
132 %define APP_PREFIX %{TZ_SYS_RO_APP}/%{APP_PKGNAME}
133 %define APP_BINDIR %{APP_PREFIX}/bin
134 %define APP_RESDIR %{APP_PREFIX}/res
135 %define APP_LOCALEDIR %{APP_RESDIR}/locale
136 %define APP_MANIFESTDIR %{TZ_SYS_RO_PACKAGES}
143 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
144 -DLIB_INSTALL_DIR=%{_libdir} \
145 %if "%{?profile}" == "mobile"
146 -DAPP_MANIFESTDIR=%{APP_MANIFESTDIR} \
147 -DAPP_BINDIR=%{APP_BINDIR} \
148 -DAPP_LOCALEDIR=%{APP_LOCALEDIR} \
150 -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
151 -DTZ_SYS_DATA=%TZ_SYS_DATA \
152 -DTZ_SYS_DB=%TZ_SYS_DB \
153 -DTZ_SYS_HOME=%TZ_SYS_HOME \
154 -DTZ_SYS_BIN=%TZ_SYS_BIN \
156 -D_TIZEN_I586_ENABLED:BOOL=ON \
158 -D_TIZEN_I586_ENABLED:BOOL=OFF \
160 %if "%{?profile}" == "wearable"
161 -D_MSG_WEARABLE_PROFILE:BOOL=ON \
163 -D_MSG_WEARABLE_PROFILE:BOOL=OFF \
165 %if "%{?profile}" == "mobile"
166 -D_MSG_MOBILE_PROFILE:BOOL=ON \
168 -D_MSG_MOBILE_PROFILE:BOOL=OFF \
171 make %{?jobs:-j%jobs}
175 mkdir -p %{buildroot}/usr/share/license
176 mkdir -p %{buildroot}/etc/config
180 %if "%{?profile}" == "mobile"
182 %define tizen_sign_base %{APP_PREFIX}
183 %define tizen_sign_level platform
184 %define tizen_author_sign 1
185 %define tizen_dist_sign 1
188 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
189 install -m 0644 %SOURCE1 %{buildroot}%{_unitdir}/msg-server.service
190 %install_service multi-user.target.wants msg-server.service
192 mkdir -p %{buildroot}%{_unitdir}/sockets.target.wants
193 install -m 0644 %SOURCE2 %{buildroot}%{_unitdir}/msg-server.socket
194 %install_service sockets.target.wants msg-server.socket
196 mkdir -p %{buildroot}%{TZ_SYS_DB}
197 sqlite3 %{buildroot}%{TZ_SYS_DB}/.msg_service.db "PRAGMA journal_mode = PERSIST;"
198 sqlite3 %{buildroot}%{TZ_SYS_DB}/.msg_service.db < %{buildroot}/usr/share/msg-service/msg-service-db.sql
200 rm %{buildroot}/usr/share/msg-service/msg-service-db.sql
205 chmod 640 %{TZ_SYS_DB}/.msg_service.db
206 chmod 660 %{TZ_SYS_DB}/.msg_service.db-journal
208 mkdir -p -m 770 %{TZ_SYS_DATA}/msg-service
209 mkdir -p -m 750 %{TZ_SYS_DATA}/msg-service/msgdata
210 mkdir -p -m 750 %{TZ_SYS_DATA}/msg-service/smildata
211 mkdir -p -m 770 %{TZ_SYS_DATA}/msg-service/ipcdata
212 mkdir -p -m 750 %{TZ_SYS_DATA}/msg-service/msgdata/thumbnails
214 chown messaging:priv_message_read %{TZ_SYS_DB}/.msg_service.db
215 chown messaging:priv_message_read %{TZ_SYS_DB}/.msg_service.db-journal
216 chown messaging:priv_message_read %{TZ_SYS_DATA}/msg-service
217 chown messaging:priv_message_read %{TZ_SYS_DATA}/msg-service/msgdata
218 chown messaging:priv_message_read %{TZ_SYS_DATA}/msg-service/smildata
219 chown messaging:priv_message_read %{TZ_SYS_DATA}/msg-service/ipcdata
220 chown messaging:priv_message_read %{TZ_SYS_DATA}/msg-service/msgdata/thumbnails
222 chmod g+s %{TZ_SYS_DATA}/msg-service/msgdata
223 chmod g+s %{TZ_SYS_DATA}/msg-service/smildata
224 chmod g+s %{TZ_SYS_DATA}/msg-service/ipcdata
225 chmod g+s %{TZ_SYS_DATA}/msg-service/msgdata/thumbnails
227 chsmack -a "*" %{TZ_SYS_DB}/.msg_service.db
228 chsmack -a "*" %{TZ_SYS_DB}/.msg_service.db-journal
229 chsmack -a "System::Shared" %{TZ_SYS_DATA}/msg-service/
230 chsmack -a "System::Shared" %{TZ_SYS_DATA}/msg-service/msgdata -t
231 chsmack -a "System::Shared" %{TZ_SYS_DATA}/msg-service/smildata -t
232 chsmack -a "System::Run" %{TZ_SYS_DATA}/msg-service/ipcdata -t
233 chsmack -a "System::Shared" %{TZ_SYS_DATA}/msg-service/msgdata/thumbnails -t
235 #Multi group to ipcdata directory
236 chmod o= %{TZ_SYS_DATA}/msg-service/ipcdata
237 setfacl -m group:priv_message_write:rw %{TZ_SYS_DATA}/msg-service/ipcdata
239 %post -n sms-plugin -p /sbin/ldconfig
240 %post -n mms-plugin -p /sbin/ldconfig
245 %postun -p /sbin/ldconfig
247 %postun tools -p /sbin/ldconfig
248 %postun -n sms-plugin -p /sbin/ldconfig
249 %postun -n mms-plugin -p /sbin/ldconfig
252 %manifest msg-service.manifest
253 %license LICENSE.APLv2
254 %{_libdir}/libmsg_plugin_manager.so
255 %{_libdir}/libmsg_mapi.so.*
256 %{_libdir}/libmsg_framework_handler.so
257 %{_libdir}/libmsg_transaction_manager.so
258 %{_libdir}/libmsg_utils.so
259 %{_libdir}/libmsg_externals.so
260 %{_libdir}/libmsg_transaction_proxy.so
261 %{_libdir}/libmsg_vobject.so
264 %license LICENSE.APLv2
265 %{_libdir}/libmsg_mapi.so
266 %{_libdir}/pkgconfig/msg-service.pc
267 %{_includedir}/msg-service/*
270 %manifest msg-service-tools.manifest
271 %license LICENSE.APLv2
272 %caps(cap_chown,cap_dac_override,cap_lease=eip) %{_bindir}/msg-server
273 %config(noreplace) %{TZ_SYS_DB}/.msg_service.db*
274 %{_unitdir}/msg-server.service
275 %{_unitdir}/multi-user.target.wants/msg-server.service
276 %{_unitdir}/msg-server.socket
277 %{_unitdir}/sockets.target.wants/msg-server.socket
280 %manifest sms-plugin.manifest
281 %license LICENSE.APLv2
282 %{_libdir}/libmsg_sms_plugin.so
285 %manifest mms-plugin.manifest
286 %license LICENSE.APLv2
287 %{_libdir}/libmsg_mms_plugin.so
289 %if "%{?profile}" == "mobile"
290 %files -n msg-manager
291 %manifest msg-manager.manifest
292 %license LICENSE.APLv2
293 %{APP_BINDIR}/msg-manager
294 %{APP_MANIFESTDIR}/*.xml
295 %{APP_PREFIX}/author-signature.xml
296 %{APP_PREFIX}/signature1.xml