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 Requires(post): /usr/bin/sqlite3
12 Requires(post): /sbin/ldconfig
13 Requires(postun): /sbin/ldconfig
14 Requires(post): systemd
15 Requires(postun): systemd
17 Requires: security-config
18 BuildRequires: boost-devel
20 BuildRequires: pkgconfig(alarm-service)
21 BuildRequires: pkgconfig(aul)
22 BuildRequires: pkgconfig(bundle)
23 BuildRequires: pkgconfig(capi-media-image-util)
24 BuildRequires: pkgconfig(capi-media-metadata-extractor)
25 BuildRequires: pkgconfig(capi-media-thumbnail-util)
26 BuildRequires: pkgconfig(capi-network-connection)
27 BuildRequires: pkgconfig(capi-system-device)
28 BuildRequires: pkgconfig(capi-system-info)
29 BuildRequires: pkgconfig(capi-telephony)
30 BuildRequires: pkgconfig(contacts-service2)
31 BuildRequires: pkgconfig(csr)
32 BuildRequires: pkgconfig(cynara-client)
33 BuildRequires: pkgconfig(cynara-creds-commons)
34 BuildRequires: pkgconfig(cynara-creds-socket)
35 BuildRequires: pkgconfig(cynara-session)
36 BuildRequires: pkgconfig(deviced)
37 BuildRequires: pkgconfig(dlog)
38 BuildRequires: pkgconfig(dpm)
39 BuildRequires: pkgconfig(eventsystem)
40 BuildRequires: pkgconfig(gio-2.0)
41 BuildRequires: pkgconfig(icu-uc)
42 BuildRequires: pkgconfig(json-glib-1.0)
43 BuildRequires: pkgconfig(lbs-dbus)
44 BuildRequires: pkgconfig(libcurl)
45 BuildRequires: pkgconfig(libsmack)
46 BuildRequires: pkgconfig(libsystemd-login)
47 BuildRequires: pkgconfig(libtzplatform-config)
48 BuildRequires: pkgconfig(libxml-2.0)
49 BuildRequires: pkgconfig(libwbxml2)
50 BuildRequires: pkgconfig(motion)
51 BuildRequires: pkgconfig(phonenumber-utils)
52 BuildRequires: pkgconfig(sqlite3)
53 BuildRequires: pkgconfig(tapi)
54 BuildRequires: pkgconfig(vconf)
55 # Below BuildRequires-statements are only for msg-manager
56 BuildRequires: gettext-tools
57 BuildRequires: hash-signer
58 BuildRequires: pkgconfig(badge)
59 BuildRequires: pkgconfig(callmgr_client)
60 BuildRequires: pkgconfig(capi-appfw-event)
61 BuildRequires: pkgconfig(capi-appfw-package-manager)
62 BuildRequires: pkgconfig(capi-appfw-service-application)
63 BuildRequires: pkgconfig(capi-media-player)
64 BuildRequires: pkgconfig(capi-media-sound-manager)
65 BuildRequires: pkgconfig(capi-media-recorder)
66 BuildRequires: pkgconfig(feedback)
67 BuildRequires: pkgconfig(notification)
70 Description: Messaging Framework Library
74 Summary: Messaging Framework Library (development)
75 Requires: %{name} = %{version}-%{release}
76 Group: Development/Libraries
79 Description: Messaging Framework Library (development)
81 %package -n sms-plugin
83 Summary: SMS plugin library
84 Requires: %{name} = %{version}-%{release}
85 Group: System/Libraries
86 Requires(post): /sbin/ldconfig
87 Requires(postun): /sbin/ldconfig
89 %description -n sms-plugin
90 Description: SMS plugin library
92 %package -n mms-plugin
94 Summary: MMS plugin library
95 Requires: %{name} = %{version}-%{release}
96 Group: System/Libraries
97 Requires(post): /sbin/ldconfig
98 Requires(postun): /sbin/ldconfig
100 %description -n mms-plugin
101 Description: MMS plugin library
103 %package -n msg-manager
105 Summary: Message manager application
106 Requires: %{name} = %{version}-%{release}
107 Group: Applications/Messaging
109 %description -n msg-manager
110 Description: Message manager application
112 %define APP_PKGNAME org.tizen.msg-manager
113 %define APP_PREFIX %{TZ_SYS_RO_APP}/%{APP_PKGNAME}
114 %define APP_RESDIR %{APP_PREFIX}/res
115 %define APP_LOCALEDIR %{APP_RESDIR}/locale
118 %define i586_option "-D_TIZEN_I586_ENABLED:BOOL=ON"
120 %define i586_option "-D_TIZEN_I586_ENABLED:BOOL=OFF"
127 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
128 -DLIB_INSTALL_DIR=%{_libdir} \
129 -DAPP_MANIFESTDIR=%{TZ_SYS_RO_PACKAGES} \
130 -DAPP_BINDIR=%{APP_PREFIX}/bin \
131 -DAPP_LOCALEDIR=%{APP_RESDIR}/locale \
132 -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
133 -DTZ_SYS_GLOBALUSER_DATA=%TZ_SYS_GLOBALUSER_DATA \
134 -DTZ_SYS_GLOBALUSER_DB=%TZ_SYS_GLOBALUSER_DB \
135 -DTZ_SYS_HOME=%TZ_SYS_HOME \
136 -DTZ_SYS_BIN=%TZ_SYS_BIN \
139 make %{?jobs:-j%jobs}
143 mkdir -p %{buildroot}/etc/config
144 mkdir -p %{buildroot}/usr/share/upgrade/scripts
145 cp -f 500.msg-service.sh %{buildroot}/usr/share/upgrade/scripts
150 %define tizen_sign_base %{APP_PREFIX}
151 %define tizen_sign_level platform
152 %define tizen_author_sign 1
153 %define tizen_dist_sign 1
155 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
156 install -m 0644 %SOURCE1 %{buildroot}%{_unitdir}/msg-server.service
157 %install_service multi-user.target.wants msg-server.service
159 mkdir -p %{buildroot}%{_unitdir}/sockets.target.wants
160 install -m 0644 %SOURCE2 %{buildroot}%{_unitdir}/msg-server.socket
161 %install_service sockets.target.wants msg-server.socket
163 mkdir -p %{buildroot}%{TZ_SYS_GLOBALUSER_DB}
164 sqlite3 %{buildroot}%{TZ_SYS_GLOBALUSER_DB}/.msg_service.db "PRAGMA journal_mode = PERSIST;"
165 sqlite3 %{buildroot}%{TZ_SYS_GLOBALUSER_DB}/.msg_service.db < %{buildroot}/usr/share/msg-service/msg-service-db.sql
167 rm %{buildroot}/usr/share/msg-service/msg-service-db.sql
168 rm %{buildroot}%{TZ_SYS_GLOBALUSER_DB}/.msg_service.db-journal
169 touch %{buildroot}%{TZ_SYS_GLOBALUSER_DB}/.msg_service.db-journal
171 %post -n sms-plugin -p /sbin/ldconfig
172 %post -n mms-plugin -p /sbin/ldconfig
177 chmod 640 %{TZ_SYS_GLOBALUSER_DB}/.msg_service.db
178 chmod 640 %{TZ_SYS_GLOBALUSER_DB}/.msg_service.db-journal
180 mkdir -p -m 770 %{TZ_SYS_GLOBALUSER_DATA}/msg-service
181 mkdir -p -m 750 %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata
182 mkdir -p -m 750 %{TZ_SYS_GLOBALUSER_DATA}/msg-service/smildata
183 mkdir -p -m 770 %{TZ_SYS_GLOBALUSER_DATA}/msg-service/ipcdata
184 mkdir -p -m 750 %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata/thumbnails
186 chown messaging:priv_message_read %{TZ_SYS_GLOBALUSER_DB}/.msg_service.db
187 chown messaging:priv_message_read %{TZ_SYS_GLOBALUSER_DB}/.msg_service.db-journal
188 chown messaging:priv_message_read %{TZ_SYS_GLOBALUSER_DATA}/msg-service
189 chown messaging:priv_message_read %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata
190 chown messaging:priv_message_read %{TZ_SYS_GLOBALUSER_DATA}/msg-service/smildata
191 chown messaging:priv_message_read %{TZ_SYS_GLOBALUSER_DATA}/msg-service/ipcdata
192 chown messaging:priv_message_read %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata/thumbnails
194 chmod g+s %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata
195 chmod g+s %{TZ_SYS_GLOBALUSER_DATA}/msg-service/smildata
196 chmod g+s %{TZ_SYS_GLOBALUSER_DATA}/msg-service/ipcdata
197 chmod g+s %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata/thumbnails
199 chsmack -a "*" %{TZ_SYS_GLOBALUSER_DB}/.msg_service.db
200 chsmack -a "*" %{TZ_SYS_GLOBALUSER_DB}/.msg_service.db-journal
201 chsmack -a "System::Shared" %{TZ_SYS_GLOBALUSER_DATA}/msg-service/
202 chsmack -a "System::Shared" %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata -t
203 chsmack -a "System::Shared" %{TZ_SYS_GLOBALUSER_DATA}/msg-service/smildata -t
204 chsmack -a "System::Run" %{TZ_SYS_GLOBALUSER_DATA}/msg-service/ipcdata -t
205 chsmack -a "System::Shared" %{TZ_SYS_GLOBALUSER_DATA}/msg-service/msgdata/thumbnails -t
207 #Multi group to ipcdata directory
208 chmod o= %{TZ_SYS_GLOBALUSER_DATA}/msg-service/ipcdata
209 setfacl -m group:priv_message_write:rw %{TZ_SYS_GLOBALUSER_DATA}/msg-service/ipcdata
212 %postun -p /sbin/ldconfig
214 %postun -n sms-plugin -p /sbin/ldconfig
215 %postun -n mms-plugin -p /sbin/ldconfig
218 %manifest msg-service.manifest
219 %license LICENSE.APLv2
220 %config(noreplace) %{TZ_SYS_GLOBALUSER_DB}/.msg_service.db*
221 %{_bindir}/msg-server
222 %{_libdir}/libmsg_plugin_manager.so
223 %{_libdir}/libmsg_mapi.so.*
224 %{_libdir}/libmsg_framework_handler.so
225 %{_libdir}/libmsg_transaction_manager.so
226 %{_libdir}/libmsg_utils.so
227 %{_libdir}/libmsg_externals.so
228 %{_libdir}/libmsg_transaction_proxy.so
229 %{_libdir}/libmsg_vobject.so
230 %{_unitdir}/msg-server.service
231 %{_unitdir}/multi-user.target.wants/msg-server.service
232 %{_unitdir}/msg-server.socket
233 %{_unitdir}/sockets.target.wants/msg-server.socket
234 /usr/share/upgrade/scripts/500.msg-service.sh
237 %license LICENSE.APLv2
238 %{_libdir}/libmsg_mapi.so
239 %{_libdir}/pkgconfig/msg-service.pc
240 %{_includedir}/msg-service/*
243 %manifest sms-plugin.manifest
244 %license LICENSE.APLv2
245 %{_libdir}/libmsg_sms_plugin.so
248 %manifest mms-plugin.manifest
249 %license LICENSE.APLv2
250 %{_libdir}/libmsg_mms_plugin.so
252 %files -n msg-manager
253 %manifest msg-manager.manifest
254 %license LICENSE.APLv2
255 %{APP_PREFIX}/bin/msg-manager
256 %{TZ_SYS_RO_PACKAGES}/*.xml
257 %{APP_PREFIX}/author-signature.xml
258 %{APP_PREFIX}/signature1.xml