Apply smack labeling for boot script file.
[platform/core/messaging/msg-service.git] / packaging / msg-service.spec
1 Name:           msg-service
2 Version:        0.9.2
3 Release:        1
4 License:        Samsung
5 Summary:        Messaging Framework Library
6 Group:          System/Libraries
7 Source0:        %{name}-%{version}.tar.gz
8 Source101:      msg-service.service
9
10 Requires(post): /usr/bin/sqlite3
11 Requires(post): /usr/bin/vconftool
12 Requires(post): /sbin/ldconfig
13 Requires(postun): /sbin/ldconfig
14 Requires(post): systemd
15 Requires(postun): systemd
16 BuildRequires: cmake
17 BuildRequires: pkgconfig(alarm-service)
18 BuildRequires: pkgconfig(aul)
19 BuildRequires: pkgconfig(capi-appfw-application)
20 BuildRequires: pkgconfig(contacts-service2)
21 BuildRequires: pkgconfig(db-util)
22 BuildRequires: pkgconfig(dlog)
23 BuildRequires: pkgconfig(drm-client)
24 BuildRequires: pkgconfig(glib-2.0)
25 BuildRequires: pkgconfig(libcurl)
26 BuildRequires: pkgconfig(libsystemd-daemon)
27 BuildRequires: pkgconfig(libxml-2.0)
28 BuildRequires: pkgconfig(libwbxml2)
29 BuildRequires: pkgconfig(media-thumbnail)
30 BuildRequires: pkgconfig(mm-fileinfo)
31 BuildRequires: pkgconfig(mm-player)
32 BuildRequires: pkgconfig(mm-session)
33 BuildRequires: pkgconfig(mm-sound)
34 BuildRequires: pkgconfig(network)
35 BuildRequires: pkgconfig(notification)
36 BuildRequires: pkgconfig(pmapi)
37 BuildRequires: pkgconfig(mmutil-imgp)
38 BuildRequires: pkgconfig(mmutil-jpeg)
39 BuildRequires: pkgconfig(security-server)
40 BuildRequires: pkgconfig(sensor)
41 BuildRequires: pkgconfig(svi)
42 BuildRequires: pkgconfig(tapi)
43 BuildRequires: pkgconfig(vconf)
44 BuildRequires: pkgconfig(feedback)
45
46 %description
47 Description: Messaging Framework Library
48
49
50 %package devel
51 License:        Flora License v1.0
52 Summary:        Messaging Framework Library (development)
53 Requires:       %{name} = %{version}-%{release}
54 Group:          Development/Libraries
55
56 %description devel
57 Description: Messaging Framework Library (development)
58
59
60 %package tools
61 License:        Flora License v1.0
62 Summary:        Messaging server application
63 Requires:       %{name} = %{version}-%{release}
64 Group:          TO_BU / FILL_IN
65 Requires(post): /usr/bin/sqlite3
66 Requires(post): /usr/bin/vconftool
67 Requires(post): /sbin/ldconfig
68 Requires(postun): /sbin/ldconfig
69
70 %description tools
71 Description:  Messaging server application
72
73
74 %package -n sms-plugin
75 License:        Flora License v1.0
76 Summary:        SMS plugin library
77 Requires:       %{name} = %{version}-%{release}
78 Group:          System/Libraries
79 Requires(post): /sbin/ldconfig
80 Requires(postun): /sbin/ldconfig
81
82 %description -n sms-plugin
83 Description: SMS plugin library
84
85 %package -n mms-plugin
86 License:        Flora License v1.0
87 Summary:        MMS plugin library
88 Requires:       %{name} = %{version}-%{release}
89 Group:          System/Libraries
90 Requires(post): /sbin/ldconfig
91 Requires(postun): /sbin/ldconfig
92
93 %description -n mms-plugin
94 Description: MMS plugin library
95
96 %prep
97 %setup -q
98
99
100 %build
101 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
102 make %{?jobs:-j%jobs}
103
104 %install
105 rm -rf %{buildroot}
106 mkdir -p %{buildroot}/usr/share/license
107
108 %make_install
109
110 mkdir -p %{buildroot}%{_libdir}/systemd/user/tizen-middleware.target.wants
111 install -m 0644 %SOURCE101 %{buildroot}%{_libdir}/systemd/user/
112 ln -s ../msg-service.service %{buildroot}%{_libdir}/systemd/user/tizen-middleware.target.wants/msg-service.service
113
114 mkdir -p  %{buildroot}%{_sysconfdir}/rc.d/rc3.d
115 ln -s %{_sysconfdir}/rc.d/init.d/msg-server  %{buildroot}%{_sysconfdir}/rc.d/rc3.d/S70msg-server
116 mkdir -p  %{buildroot}%{_sysconfdir}/rc.d/rc5.d
117 ln -s %{_sysconfdir}/rc.d/init.d/msg-server  %{buildroot}%{_sysconfdir}/rc.d/rc5.d/S70msg-server
118
119 mkdir -p %{buildroot}/opt/usr/data/msg-service
120
121 %post tools -p /sbin/ldconfig
122 %post -n sms-plugin -p /sbin/ldconfig
123 %post -n mms-plugin -p /sbin/ldconfig
124
125 %post
126 /sbin/ldconfig
127
128 if [ ! -f /opt/usr/dbspace/.msg_service.db ]
129 then
130     mkdir -p /opt/usr/dbspace/
131     sqlite3 /opt/usr/dbspace/.msg_service.db "PRAGMA journal_mode = PERSIST;
132
133     CREATE TABLE MSG_CONVERSATION_TABLE (
134         CONV_ID INTEGER PRIMARY KEY ,
135         UNREAD_CNT INTEGER DEFAULT 0 ,
136         SMS_CNT INTEGER DEFAULT 0 ,
137         MMS_CNT INTEGER DEFAULT 0 ,
138         MAIN_TYPE INTEGER DEFAULT 0 ,
139         SUB_TYPE INTEGER DEFAULT 0 ,
140         MSG_DIRECTION INTEGER DEFAULT 0 ,
141         DISPLAY_TIME DATETIME ,
142         DISPLAY_NAME TEXT ,
143         MSG_TEXT TEXT );
144
145     CREATE TABLE MSG_ADDRESS_TABLE (
146         ADDRESS_ID INTEGER PRIMARY KEY ,
147         CONV_ID INTEGER  NOT NULL ,
148         ADDRESS_TYPE INTEGER ,
149         RECIPIENT_TYPE INTEGER ,
150         ADDRESS_VAL TEXT ,
151         CONTACT_ID INTEGER ,
152         DISPLAY_NAME TEXT ,
153         FIRST_NAME TEXT ,
154         LAST_NAME TEXT ,
155         IMAGE_PATH TEXT ,
156         SYNC_TIME DATETIME ,
157         FOREIGN KEY (CONV_ID) REFERENCES MSG_CONVERSATION_TABLE (CONV_ID) );
158
159     CREATE TABLE MSG_FOLDER_TABLE (
160         FOLDER_ID INTEGER PRIMARY KEY ,
161         FOLDER_NAME TEXT NOT NULL ,
162         FOLDER_TYPE INTEGER DEFAULT 0 );
163
164     CREATE TABLE MSG_MESSAGE_TABLE (
165         MSG_ID INTEGER PRIMARY KEY ,
166         CONV_ID INTEGER NOT NULL ,
167         FOLDER_ID INTEGER NOT NULL ,
168         STORAGE_ID INTEGER NOT NULL ,
169         MAIN_TYPE INTEGER NOT NULL ,
170         SUB_TYPE INTEGER NOT NULL ,
171         DISPLAY_TIME DATETIME ,
172         DATA_SIZE INTEGER DEFAULT 0 ,
173         NETWORK_STATUS INTEGER DEFAULT 0 ,
174         READ_STATUS INTEGER DEFAULT 0 ,
175         PROTECTED INTEGER DEFAULT 0 ,
176         PRIORITY INTEGER DEFAULT 0 ,
177         MSG_DIRECTION INTEGER NOT NULL ,
178         SCHEDULED_TIME DATETIME ,
179         BACKUP INTEGER DEFAULT 0 ,
180         SUBJECT TEXT ,
181         MSG_DATA TEXT ,
182         THUMB_PATH TEXT ,
183         MSG_TEXT TEXT ,
184         ATTACHMENT_COUNT INTEGER DEFAULT 0 ,
185         FOREIGN KEY (CONV_ID) REFERENCES MSG_CONVERSATION_TABLE (CONV_ID) ,
186         FOREIGN KEY (FOLDER_ID) REFERENCES MSG_FOLDER_TABLE (FOLDER_ID) );
187
188     CREATE TABLE MSG_SIM_TABLE (
189         MSG_ID INTEGER PRIMARY KEY ,
190         SIM_ID INTEGER NOT NULL ,
191         FOREIGN KEY(MSG_ID) REFERENCES MSG_MESSAGE_TABLE(MSG_ID) );
192
193     CREATE TABLE MSG_PUSH_TABLE (
194         MSG_ID INTEGER PRIMARY KEY ,
195         ACTION INTEGER ,
196         CREATED INTEGER ,
197         EXPIRES INTEGER ,
198         ID TEXT ,
199         HREF TEXT ,
200         CONTENT TEXT ,
201         FOREIGN KEY(MSG_ID) REFERENCES MSG_MESSAGE_TABLE(MSG_ID) );
202
203     CREATE TABLE MSG_CBMSG_TABLE (
204         MSG_ID INTEGER PRIMARY KEY ,
205         CB_MSG_ID INTEGER NOT NULL ,
206         FOREIGN KEY(MSG_ID) REFERENCES MSG_MESSAGE_TABLE(MSG_ID) );
207
208     CREATE TABLE MSG_SYNCML_TABLE (
209         MSG_ID INTEGER PRIMARY KEY ,
210         EXT_ID INTEGER NOT NULL ,
211         PINCODE INTEGER NOT NULL ,
212         FOREIGN KEY(MSG_ID) REFERENCES MSG_MESSAGE_TABLE(MSG_ID) );
213
214     CREATE TABLE MSG_SCHEDULED_TABLE (
215         MSG_ID INTEGER PRIMARY KEY ,
216         ALARM_ID INTEGER NOT NULL ,
217         FOREIGN KEY(MSG_ID) REFERENCES MSG_MESSAGE_TABLE(MSG_ID) );
218
219     CREATE TABLE MSG_SMS_SENDOPT_TABLE (
220         MSG_ID INTEGER PRIMARY KEY ,
221         DELREP_REQ INTEGER NOT NULL ,
222         KEEP_COPY INTEGER NOT NULL ,
223         REPLY_PATH INTEGER NOT NULL ,
224         FOREIGN KEY(MSG_ID) REFERENCES MSG_MESSAGE_TABLE(MSG_ID) );
225
226     CREATE TABLE MSG_FILTER_TABLE (
227         FILTER_ID INTEGER PRIMARY KEY ,
228         FILTER_TYPE INTEGER NOT NULL ,
229         FILTER_VALUE TEXT NOT NULL ,
230         FILTER_ACTIVE INTEGER DEFAULT 0 );
231
232     CREATE TABLE MSG_MMS_MESSAGE_TABLE (
233         MSG_ID INTEGER PRIMARY KEY ,
234         TRANSACTION_ID TEXT ,
235         MESSAGE_ID TEXT ,
236         FWD_MESSAGE_ID TEXT ,
237         CONTENTS_LOCATION TEXT ,
238         FILE_PATH TEXT ,
239         VERSION INTEGER NOT NULL ,
240         DATA_TYPE INTEGER DEFAULT -1 ,
241         DATE DATETIME ,
242         HIDE_ADDRESS INTEGER DEFAULT 0 ,
243         ASK_DELIVERY_REPORT INTEGER DEFAULT 0 ,
244         REPORT_ALLOWED INTEGER DEFAULT 0 ,
245         READ_REPORT_ALLOWED_TYPE INTEGER DEFAULT 0 ,
246         ASK_READ_REPLY INTEGER DEFAULT 0 ,
247         READ INTEGER DEFAULT 0 ,
248         READ_REPORT_SEND_STATUS INTEGER DEFAULT 0 ,
249         READ_REPORT_SENT INTEGER DEFAULT 0 ,
250         PRIORITY INTEGER DEFAULT 0 ,
251         KEEP_COPY INTEGER DEFAULT 0 ,
252         MSG_SIZE INTEGER NOT NULL ,
253         MSG_CLASS INTEGER DEFAULT -1 ,
254         EXPIRY_TIME DATETIME ,
255         CUSTOM_DELIVERY_TIME INTEGER DEFAULT 0 ,
256         DELIVERY_TIME DATETIME ,
257         MSG_STATUS INTEGER DEFAULT -1 ,
258         FOREIGN KEY(MSG_ID) REFERENCES MSG_MESSAGE_TABLE(MSG_ID) );
259
260     CREATE TABLE MSG_MMS_PREVIEW_INFO_TABLE (
261         MSG_ID INTEGER NOT NULL ,
262         TYPE INTEGER,
263         VALUE TEXT,
264         COUNT INTEGER,
265         FOREIGN KEY(MSG_ID) REFERENCES MSG_MESSAGE_TABLE(MSG_ID) );
266
267     CREATE TABLE MSG_REPORT_TABLE (
268         MSG_ID INTEGER NOT NULL ,
269         ADDRESS_VAL TEXT ,
270         STATUS_TYPE INTEGER ,
271         STATUS INTEGER DEFAULT 0 ,
272         TIME DATETIME );
273
274     CREATE TABLE MSG_PUSHCFG_TABLE (
275         PUSH_ID INTEGER PRIMARY KEY ,
276         CONTENT_TYPE TEXT,
277         APP_ID TEXT,
278         PKG_NAME TEXT,
279         LAUNCH INTEGER,
280         APPCODE INTEGER,
281         SECURE INTEGER );
282
283     CREATE INDEX MSG_CONVERSATION_INDEX ON MSG_CONVERSATION_TABLE(CONV_ID);
284     CREATE INDEX MSG_FOLDER_INDEX ON MSG_FOLDER_TABLE(FOLDER_ID);
285     CREATE INDEX MSG_MESSAGE_INDEX ON MSG_MESSAGE_TABLE(MSG_ID, CONV_ID, FOLDER_ID);
286
287     INSERT INTO MSG_FOLDER_TABLE VALUES (1, 'INBOX', 1);
288     INSERT INTO MSG_FOLDER_TABLE VALUES (2, 'OUTBOX', 2);
289     INSERT INTO MSG_FOLDER_TABLE VALUES (3, 'SENTBOX', 2);
290     INSERT INTO MSG_FOLDER_TABLE VALUES (4, 'DRAFT', 3);
291     INSERT INTO MSG_FOLDER_TABLE VALUES (5, 'CBMSGBOX', 1);
292     INSERT INTO MSG_FOLDER_TABLE VALUES (6, 'SPAMBOX', 4);
293     INSERT INTO MSG_FOLDER_TABLE VALUES (7, 'SMS TEMPLATE', 5);
294     INSERT INTO MSG_FOLDER_TABLE VALUES (8, 'MMS TEMPLATE', 5);
295
296     INSERT INTO MSG_PUSHCFG_TABLE VALUES (1, 'text/vnd.wap.si', 'X-Wap-Application-Id: x-wap-application:wml.ua', '', 0, 1, 0);
297     INSERT INTO MSG_PUSHCFG_TABLE VALUES (2, 'application/vnd.wap.sic', 'X-Wap-Application-Id: x-wap-application:wml.ua', '', 0, 2, 0);
298     INSERT INTO MSG_PUSHCFG_TABLE VALUES (3, 'text/vnd.wap.sl', 'X-Wap-Application-Id: x-wap-application:wml.ua', '', 0, 3, 0);
299         INSERT INTO MSG_PUSHCFG_TABLE VALUES (4, 'application/vnd.wap.slc', 'X-Wap-Application-Id: x-wap-application:wml.ua', '', 0, 4, 0);
300     INSERT INTO MSG_PUSHCFG_TABLE VALUES (5, 'text/vnd.wap.co', 'X-Wap-Application-Id: x-wap-application:wml.ua', '', 0, 5, 0);
301
302     INSERT INTO MSG_PUSHCFG_TABLE VALUES (6, 'application/vnd.wap.coc', 'X-Wap-Application-Id: x-wap-application:wml.ua', '', 0, 6, 0);
303     INSERT INTO MSG_PUSHCFG_TABLE VALUES (7, 'application/vnd.wap.mms-message', 'X-Wap-Application-Id: x-wap-application:mms.ua', '', 0, 7, 0);
304     INSERT INTO MSG_PUSHCFG_TABLE VALUES (8, 'application/vnd.wap.sia', 'X-Wap-Application-Id: x-wap-application:push.sia', '', 0, 8, 0);
305     INSERT INTO MSG_PUSHCFG_TABLE VALUES (9, 'application/vnd.syncml.dm+wbxml', 'X-Wap-Application-Id: x-wap-application:push.syncml.dm', '', 0, 9, 0);
306     INSERT INTO MSG_PUSHCFG_TABLE VALUES (10, 'application/vnd.syncml.dm+xml', 'X-Wap-Application-Id: x-wap-application:push.syncml.dm', '', 0, 10, 0);
307
308     INSERT INTO MSG_PUSHCFG_TABLE VALUES (11, 'application/vnd.syncml.notification', 'X-Wap-Application-Id: x-wap-application:push.syncml.dm', '', 0, 11, 0);
309     INSERT INTO MSG_PUSHCFG_TABLE VALUES (12, 'application/vnd.syncml.ds.notification', 'X-Wap-Application-Id: x-wap-application:push.syncml.ds', '', 0, 12, 0);
310     INSERT INTO MSG_PUSHCFG_TABLE VALUES (13, 'application/vnd.syncml+wbxml', 'X-Wap-Application-Id:x-wap-application:push.syncml', '', 0, 13, 0);
311     INSERT INTO MSG_PUSHCFG_TABLE VALUES (14, 'application/vnd.wap.locc+wbxml', 'X-Wap-Application-Id: x-wap-application:loc.ua', '', 0, 14, 0);
312     INSERT INTO MSG_PUSHCFG_TABLE VALUES (15, 'application/vnd.wap.loc+xml', 'X-Wap-Application-Id: x-wap-application:loc.ua', '', 0, 15, 0);
313
314     INSERT INTO MSG_PUSHCFG_TABLE VALUES (16, 'application/vnd.oma.dd+xml', 'X-Wap-Application-Id: x-wap-application:loc.ua', '', 0, 16, 0);
315     INSERT INTO MSG_PUSHCFG_TABLE VALUES (17, 'application/vnd.oma.drm.message', 'X-Wap-Application-Id: x-wap-application:drm.ua', '', 0, 17, 0);
316     INSERT INTO MSG_PUSHCFG_TABLE VALUES (18, 'application/vnd.oma.drm.content', 'X-Wap-Application-Id: x-wap-application:drm.ua', '', 0, 18, 0);
317     INSERT INTO MSG_PUSHCFG_TABLE VALUES (19, 'application/vnd.oma.drm.rights+xml', 'X-Wap-Application-Id: x-wap-application:drm.ua', '', 0, 19, 0);
318     INSERT INTO MSG_PUSHCFG_TABLE VALUES (20, 'application/vnd.oma.drm.rights+wbxml', 'X-Wap-Application-Id: x-wap-application:drm.ua', '', 0, 20, 0);
319
320     INSERT INTO MSG_PUSHCFG_TABLE VALUES (21, 'application/vnd.oma.drm.ro+xml', 'X-Wap-Application-Id: x-wap-application:drm.ua', '', 0, 21, 0);
321     INSERT INTO MSG_PUSHCFG_TABLE VALUES (22, 'application/vnd.oma.drm.roap-pdu+xml', 'X-Wap-Application-Id: x-wap-application:drm.ua', '', 0, 22, 0);
322     INSERT INTO MSG_PUSHCFG_TABLE VALUES (23, 'application/vnd.oma.drm.roap-trigger+xml', 'X-Wap-Application-Id: x-wap-application:drm.ua', '', 0, 23, 0);
323     INSERT INTO MSG_PUSHCFG_TABLE VALUES (24, 'application/vnd.oma.drm.roap-trigger+wbxml', 'X-Wap-Application-Id: x-wap-application:drm.ua', '', 0, 24, 0);
324         INSERT INTO MSG_PUSHCFG_TABLE VALUES (25, 'text/vnd.wap.connectivity-xml', 'X-Wap-Application-Id: x-wap-application:drm.ua', '', 0, 26, 0);
325
326         INSERT INTO MSG_PUSHCFG_TABLE VALUES (26, 'application/vnd.wap.connectivity-wbxml', 'X-Wap-Application-Id: x-wap-samsung:provisioning.ua', '', 0, 27, 0);
327         INSERT INTO MSG_PUSHCFG_TABLE VALUES (27, 'application/x-wap-prov.browser-settings', 'X-Wap-Application-Id: x-wap-samsung:provisioning.ua', '', 0, 28, 0);
328         INSERT INTO MSG_PUSHCFG_TABLE VALUES (28, 'application/x-wap-prov.browser-bookmarks', 'X-Wap-Application-Id: x-wap-samsung:provisioning.ua', '', 0, 29, 0);
329         INSERT INTO MSG_PUSHCFG_TABLE VALUES (29, 'application/x-wap-prov.syncset+xml', 'X-Wap-Application-Id: x-wap-samsung:provisioning.ua', '', 0, 30, 0);
330         INSERT INTO MSG_PUSHCFG_TABLE VALUES (30, 'application/x-wap-prov.syncset+wbxml', 'X-Wap-Application-Id: x-wap-samsung:provisioning.ua', '', 0, 31, 0);
331
332         INSERT INTO MSG_PUSHCFG_TABLE VALUES (31, 'text/vnd.wap.emn+xml', 'X-Wap-Application-Id: x-wap-application:emn.ua', '', 0, 32, 0);
333         INSERT INTO MSG_PUSHCFG_TABLE VALUES (32, 'application/vnd.wap.emn+wbxml', 'X-Wap-Application-Id: x-wap-application:emn.ua', '', 0, 33, 0);
334         INSERT INTO MSG_PUSHCFG_TABLE VALUES (33, 'application/vnd.wv.csp.cir', 'X-Wap-Application-Id: x-wap-application:wv.ua', '', 0, 34, 0);
335         INSERT INTO MSG_PUSHCFG_TABLE VALUES (34, 'application/vnd.omaloc-supl-init', 'X-Wap-Application-Id: x-oma-application:ulp.ua', '', 0, 44, 0);
336         INSERT INTO MSG_PUSHCFG_TABLE VALUES (35, 'application/vnd.wap.emn+wbxml', 'X-oma-docomo:xmd.mail.ua', '', 0, 45, 1);"
337 fi
338
339 chown :6011 /opt/usr/dbspace/.msg_service.db
340 chown :6011 /opt/usr/dbspace/.msg_service.db-journal
341 chmod 660 /opt/usr/dbspace/.msg_service.db
342 chmod 660 /opt/usr/dbspace/.msg_service.db-journal
343 mkdir -p /opt/usr/data/msg-service
344 chgrp db_msg_service /opt/usr/data/msg-service
345
346 if [ -f /usr/lib/rpm-plugins/msm.so ]
347 then
348         chsmack -a 'msg-service::db' /opt/usr/dbspace/.msg_service.db*
349         chsmack -a "_" -e "_" /etc/rc.d/init.d/msg-server
350         chsmack -a "_" -e "_" /etc/rc.d/rc3.d/S70msg-server
351         chsmack -a "_" -e "_" /etc/rc.d/rc5.d/S70msg-server
352 fi
353
354 ########## Setting Config Value (Internal keys) ##########
355 vcuid=5000
356 # Message Server Status
357 vconftool set -t bool memory/msg/ready 0 -i -g 5000 -u $vcuid
358
359 # SMS Send Options
360 vconftool set -t int db/msg/network_mode 2 -u $vcuid
361
362 # New Message Count
363 vconftool set -t int db/msg/recv_sms 0 -u $vcuid
364 vconftool set -t int db/msg/recv_mms 0 -u $vcuid
365
366 ########## Setting Config Value (Private keys) ##########
367 # General Options
368 vconftool set -t bool db/private/msg-service/general/keep_copy 1 -u $vcuid
369 vconftool set -t bool db/private/msg-service/general/auto_erase 0 -u $vcuid
370 vconftool set -t bool db/private/msg-service/general/block_msg 0 -u $vcuid
371 vconftool set -t int db/private/msg-service/general/contact_sync_time 0 -u $vcuid
372
373 # SMS Send Options
374 vconftool set -t int db/private/msg-service/sms_send/dcs 3 -u $vcuid
375 vconftool set -t bool db/private/msg-service/sms_send/reply_path 0 -u $vcuid
376 vconftool set -t bool db/private/msg-service/sms_send/delivery_report 0 -u $vcuid
377 vconftool set -t int db/private/msg-service/sms_send/save_storage 1 -u $vcuid
378
379 # SMSC
380 vconftool set -t int db/private/msg-service/smsc/total_count 1 -u $vcuid
381 vconftool set -t int db/private/msg-service/smsc/selected 0 -u $vcuid
382
383 vconftool set -t int db/private/msg-service/smsc/pid/0 1 -u $vcuid
384 vconftool set -t int db/private/msg-service/smsc/val_period/0 255 -u $vcuid
385 vconftool set -t string db/private/msg-service/smsc/name/0 "" -u $vcuid
386 vconftool set -t int db/private/msg-service/smsc/ton/0 1 -u $vcuid
387 vconftool set -t int db/private/msg-service/smsc/npi/0 1 -u $vcuid
388 vconftool set -t string db/private/msg-service/smsc/address/0 "" -u $vcuid
389
390 vconftool set -t int db/private/msg-service/smsc/pid/1 0 -u $vcuid
391 vconftool set -t int db/private/msg-service/smsc/val_period/1 0 -u $vcuid
392 vconftool set -t string db/private/msg-service/smsc/name/1 "" -u $vcuid
393 vconftool set -t int db/private/msg-service/smsc/ton/1 0 -u $vcuid
394 vconftool set -t int db/private/msg-service/smsc/npi/1 0 -u $vcuid
395 vconftool set -t string db/private/msg-service/smsc/address/1 "" -u $vcuid
396
397 vconftool set -t int db/private/msg-service/smsc/pid/2 0 -u $vcuid
398 vconftool set -t int db/private/msg-service/smsc/val_period/2 0 -u $vcuid
399 vconftool set -t string db/private/msg-service/smsc/name/2 "" -u $vcuid
400 vconftool set -t int db/private/msg-service/smsc/ton/2 0 -u $vcuid
401 vconftool set -t int db/private/msg-service/smsc/npi/2 0 -u $vcuid
402 vconftool set -t string db/private/msg-service/smsc/address/2 "" -u $vcuid
403
404 # MMS Send Options
405 vconftool set -t int db/private/msg-service/mms_send/msg_class 0 -u $vcuid
406 vconftool set -t int db/private/msg-service/mms_send/priority 1 -u $vcuid
407 vconftool set -t int db/private/msg-service/mms_send/expiry_time 0 -u $vcuid
408 vconftool set -t int db/private/msg-service/mms_send/custom_delivery 0 -u $vcuid
409 vconftool set -t bool db/private/msg-service/mms_send/sender_visibility 0 -u $vcuid
410 vconftool set -t bool db/private/msg-service/mms_send/delivery_report 1 -u $vcuid
411 vconftool set -t bool db/private/msg-service/mms_send/read_reply 1 -u $vcuid
412 vconftool set -t bool db/private/msg-service/mms_send/keep_copy 0 -u $vcuid
413 vconftool set -t bool db/private/msg-service/mms_send/body_replying 0 -u $vcuid
414 vconftool set -t bool db/private/msg-service/mms_send/hide_recipients 0 -u $vcuid
415 vconftool set -t bool db/private/msg-service/mms_send/report_allowed 1 -u $vcuid
416 vconftool set -t int db/private/msg-service/mms_send/reply_charging 0 -u $vcuid
417 vconftool set -t int db/private/msg-service/mms_send/reply_charging_deadline 0 -u $vcuid
418 vconftool set -t int db/private/msg-service/mms_send/reply_charging_size 0 -u $vcuid
419 vconftool set -t int db/private/msg-service/mms_send/delivery_time 0 -u $vcuid
420 vconftool set -t int db/private/msg-service/mms_send/creation_mode 2 -u $vcuid
421
422 # MMS Receive Options
423 vconftool set -t int db/private/msg-service/mms_recv/home_network 0 -u $vcuid
424 vconftool set -t int db/private/msg-service/mms_recv/abroad_network 0 -u $vcuid
425 vconftool set -t bool db/private/msg-service/mms_recv/read_receipt 1 -u $vcuid
426 vconftool set -t bool db/private/msg-service/mms_recv/delivery_receipt 1 -u $vcuid
427 vconftool set -t bool db/private/msg-service/mms_recv/reject_unknown 0 -u $vcuid
428 vconftool set -t bool db/private/msg-service/mms_recv/reject_advertisement 0 -u $vcuid
429
430 # MMS Receive Options
431 vconftool set -t int db/private/msg-service/mms_style/font_size 30 -u $vcuid
432 vconftool set -t bool db/private/msg-service/mms_style/font_style/bold 0 -u $vcuid
433 vconftool set -t bool db/private/msg-service/mms_style/font_style/italic 0 -u $vcuid
434 vconftool set -t bool db/private/msg-service/mms_style/font_style/underline 0 -u $vcuid
435 vconftool set -t int db/private/msg-service/mms_style/font_color/red 255 -u $vcuid
436 vconftool set -t int db/private/msg-service/mms_style/font_color/green 255 -u $vcuid
437 vconftool set -t int db/private/msg-service/mms_style/font_color/blue 255 -u $vcuid
438 vconftool set -t int db/private/msg-service/mms_style/font_color/hue 255 -u $vcuid
439 vconftool set -t int db/private/msg-service/mms_style/bg_color/red 0 -u $vcuid
440 vconftool set -t int db/private/msg-service/mms_style/bg_color/green 0 -u $vcuid
441 vconftool set -t int db/private/msg-service/mms_style/bg_color/blue 0 -u $vcuid
442 vconftool set -t int db/private/msg-service/mms_style/bg_color/hue 255 -u $vcuid
443 vconftool set -t int db/private/msg-service/mms_style/page_dur 2 -u $vcuid
444 vconftool set -t int db/private/msg-service/mms_style/page_custom_dur 0 -u $vcuid
445 vconftool set -t int db/private/msg-service/mms_style/page_dur_manual 0 -u $vcuid
446
447 # Push Msg Options
448 vconftool set -t bool db/private/msg-service/push_msg/recv_option 1 -u $vcuid
449 vconftool set -t int db/private/msg-service/push_msg/service_load 1 -u $vcuid
450
451 # CB Msg Options
452 vconftool set -t bool db/private/msg-service/cb_msg/receive 1 -f -u $vcuid
453 vconftool set -t bool db/private/msg-service/cb_msg/save 1 -f -u $vcuid
454 vconftool set -t int db/private/msg-service/cb_msg/max_sim_count 0 -u $vcuid
455 vconftool set -t int db/private/msg-service/cb_msg/channel_count 0 -u $vcuid
456 vconftool set -t bool db/private/msg-service/cb_msg/language/0 1 -f -u $vcuid
457 vconftool set -t bool db/private/msg-service/cb_msg/language/1 0 -u $vcuid
458 vconftool set -t bool db/private/msg-service/cb_msg/language/2 0 -u $vcuid
459 vconftool set -t bool db/private/msg-service/cb_msg/language/3 0 -u $vcuid
460 vconftool set -t bool db/private/msg-service/cb_msg/language/4 0 -u $vcuid
461 vconftool set -t bool db/private/msg-service/cb_msg/language/5 0 -u $vcuid
462 vconftool set -t bool db/private/msg-service/cb_msg/language/6 0 -u $vcuid
463 vconftool set -t bool db/private/msg-service/cb_msg/language/7 0 -u $vcuid
464 vconftool set -t bool db/private/msg-service/cb_msg/language/8 0 -u $vcuid
465 vconftool set -t bool db/private/msg-service/cb_msg/language/9 0 -u $vcuid
466
467 # Voice Mail Options
468 vconftool set -t string db/private/msg-service/voice_mail/voice_mail_number "5500" -f -u $vcuid
469 vconftool set -t int db/private/msg-service/voice_mail/voice_mail_count 0 -u $vcuid
470
471 # MMS Size Options
472 vconftool set -t int db/private/msg-service/size_opt/msg_size 300 -u $vcuid
473
474 # SIM message count
475 vconftool set -t int db/private/msg-service/sim_count/used_cnt 0 -u $vcuid
476 vconftool set -t int db/private/msg-service/sim_count/total_cnt 0 -u $vcuid
477
478 # SIM information
479 vconftool set -t int memory/private/msg-service/sim_changed 0 -i -u $vcuid
480 vconftool set -t string memory/private/msg-service/sim_imsi "" -i -u $vcuid
481 vconftool set -t bool memory/private/msg-service/national_sim 0 -i -u $vcuid
482 vconftool set -t string memory/private/msg-service/msisdn "" -i -u $vcuid
483
484 vconftool set -t int db/private/msg-service/notification_priv_id 0 -u $vcuid
485
486 /sbin/ldconfig
487 /bin/systemctl daemon-reload
488 if [ "$1" = "1" ]; then
489     systemctl stop msg-service.service
490 fi
491
492 %postun -p /sbin/ldconfig
493
494 %postun tools -p /sbin/ldconfig
495 %postun -n sms-plugin -p /sbin/ldconfig
496 %postun -n mms-plugin -p /sbin/ldconfig
497
498 %files
499 %manifest msg-service.manifest
500 %defattr(-,root,root,-)
501 %dir %attr(775,root,db_msg_service) /opt/usr/data/msg-service
502 %{_libdir}/libmsg_plugin_manager.so
503 %{_libdir}/libmsg_mapi.so.*
504 %{_libdir}/libmsg_framework_handler.so
505 %{_libdir}/libmsg_transaction_manager.so
506 %{_libdir}/libmsg_utils.so
507 %{_libdir}/libmsg_transaction_proxy.so
508 %{_libdir}/libmsg_vobject.so
509 /usr/share/license/msg-service/LICENSE.Flora
510
511 %files devel
512 %defattr(-,root,root,-)
513 %{_libdir}/libmsg_mapi.so
514 %{_libdir}/pkgconfig/msg-service.pc
515 %{_includedir}/msg-service/*
516
517 %files tools
518 %manifest msg-service-tools.manifest
519 %defattr(-,root,root,-)
520 %{_bindir}/msg-helper
521 %{_bindir}/msg-server
522 %{_datadir}/media/Sherbet.wav
523 %attr(0644,root,root)/usr/share/msg-service/plugin.cfg
524 %{_sysconfdir}/rc.d/init.d/msg-server
525 %{_sysconfdir}/rc.d/rc3.d/S70msg-server
526 %{_sysconfdir}/rc.d/rc5.d/S70msg-server
527 %{_libdir}/systemd/user/msg-service.service
528 %{_libdir}/systemd/user/tizen-middleware.target.wants/msg-service.service
529 /usr/share/license/msg-service/LICENSE.Flora
530
531 %files -n sms-plugin
532 %manifest sms-plugin.manifest
533 %defattr(-,root,root,-)
534 %{_libdir}/libmsg_sms_plugin.so
535 /usr/share/license/msg-service/LICENSE.Flora
536
537 %files -n mms-plugin
538 %manifest mms-plugin.manifest
539 %defattr(-,root,root,-)
540 %{_libdir}/libmsg_mms_plugin.so
541 /usr/share/license/msg-service/LICENSE.Flora
542
543 %changelog
544 * Wed Oct 25 2012 Sangkoo Kim <sangkoo.kim@samsung.com>
545 - New release version
546
547 * Wed Aug 8 2012 KeeBum Kim <keebum.kim@samsung.com>
548 - Apply New TAPI.
549 - Modify transaction data size of sos recipient list.
550
551 * Tue Aug 7 2012 KeeBum Kim <keebum.kim@samsung.com>
552 - Fix contact sync defect.
553 - New MessageFW API.
554
555 * Fri Jul 27 2012 KeeBum Kim <keebum.kim@samsung.com>
556 - Change devman_haptic.h to devman_managed.h.
557 - Modify to set MSG_SERVER_READY before sim status check.
558 - Fix bug in sim message save related operations.
559 - Limit sim related APIs not to work on sim not available status.
560 - Modify indicator icon image path & related.
561
562 * Tue Jul 17 2012 KeeBum Kim <keebum.kim@samsung.com>
563 - Modify MAX_SEGMENT_NUM to 15.
564 - Modify MMplayer related to support interrupted event.
565 - Fix bug in storage change callback which could cause on submit request.
566
567 * Fri Jun 29 2012 Sangkoo Kim <sangkoo.kim@samsung.com>
568 - Modify vconf key path for sos sending option.
569
570 * Mon Jun 18 2012 Seunghwan Lee <sh.cat.lee@samsung.com>
571 - Storage change callback for scheduled message
572 - code chage to support glib2-2.32
573 - Apply Backup && Restore of Mms Type
574
575 * Fri Jun 15 2012 Sangkoo Kim <sangkoo.kim@samsung.com>
576 - Update display time for scheduled message when it is sent.
577
578 * Thu Jun 14 2012 Seunghwan Lee <sh.cat.lee@samsung.com>
579 - Comment the test app in CMakefile.
580 - Modify MMS BG color of vconf value.
581 - Bug fixed wrong query in MsgStoCheckReadReportIsSent
582 - Add '-i' option for vconf keys of memory type
583 - Add smsc vconf keys(default value).
584 - To avoid msg incoming sound and notification on SOS
585
586 * Fri Jun 8 2012 Sangkoo Kim <sangkoo.kim@samsung.com>
587 - Add '-i' option for vconf keys of memory type.
588 - Add smsc vconf keys(default value).
589 - To avoid msg incoming sound and notification on SOS state.
590 - Change BGcolor to black && font colore to white.
591
592 * Wed May 31 2012 Keebum Kim <keebum.kim@samsung.com>
593 - Apply Mdm policy.
594 - SOS message.
595 - Fix horizontality development problem.
596 - Remove vconf key for new message count. (db/badge/com.samsung.message)
597 - Change vconf key path of "mms_send/msg_class" to private.
598
599 * Thu May 24 2012 Keebum Kim <keebum.kim@samsung.com>
600 - Add new MAPI.
601
602 * Fri May 18 2012 Sangkoo Kim <sangkoo.kim@samsung.com>
603 - Modify to support new DRM service.
604 - Rename private vconf keys.
605 - Modify .postinst and .spec file to pre-install used vconf keys.
606 - Remove compile warnings.
607 - Fix bug in manual retrieve operation.
608
609 * Fri May 11 2012 Jaeyun Jeong <jyjeong@samsung.com>
610 - Fix DB conflict which cause db lock.
611 - Fix bug in Find My Mobile function.
612 - Add '*' and '#' symbol as valid number.
613
614 * Wed May 9 2012 Keebum Kim <keebum.kim@samsung.com>
615 - Change mobile tracker related vconf key define values.
616 - Apply MDM policy for allowing text messaging.
617 - Fix bug for getting thumbnail path.
618 - Enable functionality of scheduled message.
619 - Change alarm setting of scheduled message from volatile type to non-volatile.
620 - Fix error in search query.
621
622 * Thu May 3 2012 Keebum Kim <keebum.kim@samsung.com>
623 - Change some thread list related APIs to support DB change.
624 - DB change to support multiple recipient.
625
626 * Thu Apr 19 2012 Keebum Kim <keebum.kim@samsung.com>
627 - Modify to manage contact sync time by vconf.
628 - Use g_idle_add() routine for updating unread message count(vconf values).
629 - apply try{}catch{} code for handling unexpected exception to avoid thread terminating.
630 - Fix bug for allocated size of replacing string.
631 - Resolve search problem for special characters.
632 - add xmlFree.
633
634 * Tue Apr 10 2012 Keebum Kim <keebum.kim@samsung.com>
635 - Remove unused vconf keys.
636 - Initialize SMSC selected_index.
637 - Remove systemd related.
638
639 * Thu Apr 05 2012 Jaeyun Jeong <jyjeong@samsung.com>
640 - Add notification property(NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE)
641 - Fix S1-2397/2417/2418/2419.
642 - Remove sent status callback check during submit request.
643 - Modify offset and limit operation on search.
644 - Remove invalid folder and file.
645 - Change browser launching API from aul to service-capi.
646 - Remove unused file.
647 - Invalid type checking is fixed.
648
649 * Fri Mar 16 2012 Jaeyun Jeong <jyjeong@samsung.com>
650 - Add #include <sys/stat.h> to support chmod related defines.
651 - Fix DRM content issue(unregistered mo content)
652
653 * Wed Mar 14 2012 Jaeyun Jeong <jyjeong@samsung.com>
654 - Modify plugin configuration file location for FOTA.
655 - Remove the db query which create sample data.
656
657 * Wed Feb 29 2012 Jaeyun Jeong <jyjeong@samsung.com>
658 - Update msg-service.spec for OBS.
659 - Fix TC execute failure.
660 - Fix S1-1419(Removed mms raw file issue after rebooting)