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-framework)
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(eventsystem)
42 BuildRequires: pkgconfig(gio-2.0)
43 BuildRequires: pkgconfig(icu-uc)
44 BuildRequires: pkgconfig(json-glib-1.0)
45 BuildRequires: pkgconfig(lbs-dbus)
46 BuildRequires: pkgconfig(libcurl)
47 BuildRequires: pkgconfig(libsmack)
48 BuildRequires: pkgconfig(libsystemd-login)
49 BuildRequires: pkgconfig(libtzplatform-config)
50 BuildRequires: pkgconfig(libxml-2.0)
51 BuildRequires: pkgconfig(libwbxml2)
52 BuildRequires: pkgconfig(motion)
53 BuildRequires: pkgconfig(sqlite3)
54 BuildRequires: pkgconfig(tapi)
55 BuildRequires: pkgconfig(vconf)
56 %if "%{?profile}" != "wearable"
57 BuildRequires: pkgconfig(contacts-service2)
59 %if "%{?profile}" == "mobile"
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_MANIFESTDIR %{TZ_SYS_RO_PACKAGES}
141 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
142 -DLIB_INSTALL_DIR=%{_libdir} \
143 %if "%{?profile}" == "mobile"
144 -DAPP_MANIFESTDIR=%{APP_MANIFESTDIR} \
145 -DAPP_BINDIR=%{APP_BINDIR} \
147 -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
148 -DTZ_SYS_DATA=%TZ_SYS_DATA \
149 -DTZ_SYS_DB=%TZ_SYS_DB \
150 -DTZ_SYS_HOME=%TZ_SYS_HOME \
152 -D_TIZEN_I586_ENABLED:BOOL=ON \
154 -D_TIZEN_I586_ENABLED:BOOL=OFF \
156 %if "%{?profile}" == "wearable"
157 -D_MSG_WEARABLE_PROFILE:BOOL=ON \
159 -D_MSG_WEARABLE_PROFILE:BOOL=OFF \
161 %if "%{?profile}" == "mobile"
162 -D_MSG_MOBILE_PROFILE:BOOL=ON \
164 -D_MSG_MOBILE_PROFILE:BOOL=OFF \
167 make %{?jobs:-j%jobs}
171 mkdir -p %{buildroot}/usr/share/license
172 mkdir -p %{buildroot}/etc/config
176 %if "%{?profile}" == "mobile"
178 %define tizen_sign_base %{APP_PREFIX}
179 %define tizen_sign_level platform
180 %define tizen_author_sign 1
181 %define tizen_dist_sign 1
184 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
185 install -m 0644 %SOURCE1 %{buildroot}%{_unitdir}/msg-server.service
186 %install_service multi-user.target.wants msg-server.service
188 mkdir -p %{buildroot}%{_unitdir}/sockets.target.wants
189 install -m 0644 %SOURCE2 %{buildroot}%{_unitdir}/msg-server.socket
190 %install_service sockets.target.wants msg-server.socket
192 mkdir -p %{buildroot}%{TZ_SYS_DB}
193 sqlite3 %{buildroot}%{TZ_SYS_DB}/.msg_service.db "PRAGMA journal_mode = PERSIST;"
194 sqlite3 %{buildroot}%{TZ_SYS_DB}/.msg_service.db < %{buildroot}/usr/share/msg-service/msg-service-db.sql
196 rm %{buildroot}/usr/share/msg-service/msg-service-db.sql
201 chmod 640 %{TZ_SYS_DB}/.msg_service.db
202 chmod 660 %{TZ_SYS_DB}/.msg_service.db-journal
204 mkdir -p -m 770 %{TZ_SYS_DATA}/msg-service
205 mkdir -p -m 750 %{TZ_SYS_DATA}/msg-service/msgdata
206 mkdir -p -m 750 %{TZ_SYS_DATA}/msg-service/smildata
207 mkdir -p -m 770 %{TZ_SYS_DATA}/msg-service/ipcdata
208 mkdir -p -m 750 %{TZ_SYS_DATA}/msg-service/msgdata/thumbnails
210 chown messaging:priv_message_read %{TZ_SYS_DB}/.msg_service.db
211 chown messaging:priv_message_read %{TZ_SYS_DB}/.msg_service.db-journal
212 chown messaging:priv_message_read %{TZ_SYS_DATA}/msg-service
213 chown messaging:priv_message_read %{TZ_SYS_DATA}/msg-service/msgdata
214 chown messaging:priv_message_read %{TZ_SYS_DATA}/msg-service/smildata
215 chown messaging:priv_message_read %{TZ_SYS_DATA}/msg-service/ipcdata
216 chown messaging:priv_message_read %{TZ_SYS_DATA}/msg-service/msgdata/thumbnails
218 chmod g+s %{TZ_SYS_DATA}/msg-service/msgdata
219 chmod g+s %{TZ_SYS_DATA}/msg-service/smildata
220 chmod g+s %{TZ_SYS_DATA}/msg-service/ipcdata
221 chmod g+s %{TZ_SYS_DATA}/msg-service/msgdata/thumbnails
223 chsmack -a "*" %{TZ_SYS_DB}/.msg_service.db
224 chsmack -a "*" %{TZ_SYS_DB}/.msg_service.db-journal
225 chsmack -a "System::Shared" %{TZ_SYS_DATA}/msg-service/
226 chsmack -a "System::Shared" %{TZ_SYS_DATA}/msg-service/msgdata -t
227 chsmack -a "System::Shared" %{TZ_SYS_DATA}/msg-service/smildata -t
228 chsmack -a "System::Run" %{TZ_SYS_DATA}/msg-service/ipcdata -t
229 chsmack -a "System::Shared" %{TZ_SYS_DATA}/msg-service/msgdata/thumbnails -t
231 #Multi group to ipcdata directory
232 chmod o= %{TZ_SYS_DATA}/msg-service/ipcdata
233 setfacl -m group:priv_message_write:rw %{TZ_SYS_DATA}/msg-service/ipcdata
235 %post -n sms-plugin -p /sbin/ldconfig
236 %post -n mms-plugin -p /sbin/ldconfig
241 %postun -p /sbin/ldconfig
243 %postun tools -p /sbin/ldconfig
244 %postun -n sms-plugin -p /sbin/ldconfig
245 %postun -n mms-plugin -p /sbin/ldconfig
248 %manifest msg-service.manifest
249 %license LICENSE.APLv2
250 %{_libdir}/libmsg_plugin_manager.so
251 %{_libdir}/libmsg_mapi.so.*
252 %{_libdir}/libmsg_framework_handler.so
253 %{_libdir}/libmsg_transaction_manager.so
254 %{_libdir}/libmsg_utils.so
255 %{_libdir}/libmsg_externals.so
256 %{_libdir}/libmsg_transaction_proxy.so
257 %{_libdir}/libmsg_vobject.so
260 %license LICENSE.APLv2
261 %{_libdir}/libmsg_mapi.so
262 %{_libdir}/pkgconfig/msg-service.pc
263 %{_includedir}/msg-service/*
266 %manifest msg-service-tools.manifest
267 %license LICENSE.APLv2
268 %caps(cap_chown,cap_dac_override,cap_lease=eip) %{_bindir}/msg-server
269 %config(noreplace) %{TZ_SYS_DB}/.msg_service.db*
270 %{_unitdir}/msg-server.service
271 %{_unitdir}/multi-user.target.wants/msg-server.service
272 %{_unitdir}/msg-server.socket
273 %{_unitdir}/sockets.target.wants/msg-server.socket
277 %manifest sms-plugin.manifest
278 %license LICENSE.APLv2
279 %{_libdir}/libmsg_sms_plugin.so
282 %manifest mms-plugin.manifest
283 %license LICENSE.APLv2
284 %{_libdir}/libmsg_mms_plugin.so
286 %if "%{?profile}" == "mobile"
287 %files -n msg-manager
288 %manifest msg-manager.manifest
289 %license LICENSE.APLv2
290 %{APP_BINDIR}/msg-manager
291 %{APP_MANIFESTDIR}/*.xml
292 %{APP_PREFIX}/author-signature.xml
293 %{APP_PREFIX}/signature1.xml