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