Name: msg-service
-Version: 0.9.3
-Release: 1
-License: Flora-1.1
+Version: 1.0.9
+Release: 2
+License: Apache-2.0
Summary: Messaging Framework Library
Group: System/Libraries
Source0: %{name}-%{version}.tar.gz
-Source101: msg-service.service
-Source1001: %{name}.manifest
-Source1002: %{name}-devel.manifest
-Source1003: %{name}-tools.manifest
-Source1004: sms-plugin.manifest
-Source1005: mms-plugin.manifest
+Source1: msg-server.service
+Source2: msg-server.socket
Requires(post): /usr/bin/sqlite3
-Requires(post): /usr/bin/vconftool
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(appsvc)
BuildRequires: pkgconfig(aul)
-BuildRequires: pkgconfig(capi-appfw-application)
+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(contacts-service2)
-BuildRequires: pkgconfig(db-util)
+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(drm-client)
-BuildRequires: pkgconfig(glib-2.0)
+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(libsystemd-daemon)
+BuildRequires: pkgconfig(libsmack)
+BuildRequires: pkgconfig(libsystemd-login)
+BuildRequires: pkgconfig(libtzplatform-config)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(libwbxml2)
-BuildRequires: pkgconfig(media-thumbnail)
-BuildRequires: pkgconfig(mm-fileinfo)
-BuildRequires: pkgconfig(mm-player)
-BuildRequires: pkgconfig(mm-session)
-BuildRequires: pkgconfig(mm-sound)
-BuildRequires: pkgconfig(network)
-BuildRequires: pkgconfig(notification)
-BuildRequires: pkgconfig(pmapi)
-BuildRequires: pkgconfig(mmutil-imgp)
-BuildRequires: pkgconfig(mmutil-jpeg)
-BuildRequires: pkgconfig(security-server)
-BuildRequires: pkgconfig(sensor)
-BuildRequires: pkgconfig(svi)
+BuildRequires: pkgconfig(motion)
+BuildRequires: pkgconfig(phonenumber-utils)
+BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(tapi)
BuildRequires: pkgconfig(vconf)
+# 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(capi-network-connection)
-BuildRequires: pkgconfig(libtzplatform-config)
+BuildRequires: pkgconfig(notification)
%description
Description: Messaging Framework Library
-
%package devel
-License: Flora License v1.1
+License: Apache-2.0
Summary: Messaging Framework Library (development)
Requires: %{name} = %{version}-%{release}
Group: Development/Libraries
%description devel
Description: Messaging Framework Library (development)
-
-%package tools
-License: Flora License v1.1
-Summary: Messaging server application
-Requires: %{name} = %{version}-%{release}
-Group: TO_BU / FILL_IN
-Requires(post): /usr/bin/sqlite3
-Requires(post): /usr/bin/vconftool
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
-
-%description tools
-Description: Messaging server application
-
-
%package -n sms-plugin
-License: Flora License v1.1
+License: Apache-2.0
Summary: SMS plugin library
Requires: %{name} = %{version}-%{release}
Group: System/Libraries
Description: SMS plugin library
%package -n mms-plugin
-License: Flora License v1.1
+License: Apache-2.0
Summary: MMS plugin library
Requires: %{name} = %{version}-%{release}
Group: System/Libraries
%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
-cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} %{SOURCE1004} %{SOURCE1005} .
-
%build
-%cmake . \
- -DTZ_SYS_SHARE=%TZ_SYS_SHARE \
- -DUNITDIR_USER=%{_unitdir_user} \
- -DTZ_SYS_SMACK=%TZ_SYS_SMACK
+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}
rm -rf %{buildroot}
mkdir -p %{buildroot}/etc/config
-mkdir -p %{buildroot}/var/log/msgfw
-
%make_install
-mkdir -p %{buildroot}%{_unitdir_user}/tizen-middleware.target.wants
-#install -m 0644 %SOURCE101 %{buildroot}%{_unitdir_user}/
-ln -s ../msg-service.service %{buildroot}%{_unitdir_user}/tizen-middleware.target.wants/msg-service.service
-ln -s ../msg-service-log.service %{buildroot}%{_unitdir_user}/tizen-middleware.target.wants/msg-service-log.service
+%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}%{_sysconfdir}/rc.d/rc3.d
-ln -s %{_sysconfdir}/rc.d/init.d/msg-server %{buildroot}%{_sysconfdir}/rc.d/rc3.d/S70msg-server
-mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc5.d
-ln -s %{_sysconfdir}/rc.d/init.d/msg-server %{buildroot}%{_sysconfdir}/rc.d/rc5.d/S70msg-server
+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}/opt/usr/data/msg-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
-%if 0%{?simulator}
-rm %{buildroot}/etc/config/sysinfo-message.xml
-mv %{buildroot}/etc/config/sysinfo-message.emul.xml %{buildroot}/etc/config/sysinfo-message.xml
-%else
-rm %{buildroot}/etc/config/sysinfo-message.emul.xml
-%endif
+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 tools -p /sbin/ldconfig
%post -n sms-plugin -p /sbin/ldconfig
%post -n mms-plugin -p /sbin/ldconfig
%post
/sbin/ldconfig
-/bin/systemctl daemon-reload
-if [ "$1" = "1" ]; then
- systemctl stop msg-service.service
-fi
+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 tools -p /sbin/ldconfig
%postun -n sms-plugin -p /sbin/ldconfig
%postun -n mms-plugin -p /sbin/ldconfig
%files
-%manifest %{name}.manifest
-%license LICENSE.Flora
-%defattr(-,root,root,-)
+%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
-%TZ_SYS_SHARE/%{name}/msg_service-init-DB.sh
+%{_unitdir}/msg-server.service
+%{_unitdir}/multi-user.target.wants/msg-server.service
+%{_unitdir}/msg-server.socket
+%{_unitdir}/sockets.target.wants/msg-server.socket
%files devel
-%manifest %{name}-devel.manifest
-%defattr(-,root,root,-)
+%license LICENSE.APLv2
%{_libdir}/libmsg_mapi.so
%{_libdir}/pkgconfig/msg-service.pc
%{_includedir}/msg-service/*
-%files tools
-%manifest %{name}-tools.manifest
-%license LICENSE.Flora
-%defattr(-,root,root,-)
-%{_bindir}/msg-helper
-%{_bindir}/msg-server
-%{_datadir}/media/Sherbet.wav
-%attr(0644,root,root)%{_datadir}/msg-service/plugin.cfg
-%{_sysconfdir}/rc.d/init.d/msg-server
-%{_sysconfdir}/rc.d/rc3.d/S70msg-server
-%{_sysconfdir}/rc.d/rc5.d/S70msg-server
-%{_unitdir_user}/msg-service.service
-%{_unitdir_user}/msg-service-log.service
-%{_unitdir_user}/tizen-middleware.target.wants/msg-service.service
-%{_unitdir_user}/tizen-middleware.target.wants/msg-service-log.service
-%{_sysconfdir}/config/sysinfo-message.xml
-%attr(0755,root,%TZ_SYS_USER_GROUP) /var/log/msgfw
-
%files -n sms-plugin
%manifest sms-plugin.manifest
-%license LICENSE.Flora
-%defattr(-,root,root,-)
+%license LICENSE.APLv2
%{_libdir}/libmsg_sms_plugin.so
%files -n mms-plugin
%manifest mms-plugin.manifest
-%license LICENSE.Flora
-%defattr(-,root,root,-)
+%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
-* Wed Oct 25 2012 Sangkoo Kim <sangkoo.kim@samsung.com>
-- New release version
-
-* Wed Aug 8 2012 KeeBum Kim <keebum.kim@samsung.com>
-- Apply New TAPI.
-- Modify transaction data size of sos recipient list.
-
-* Tue Aug 7 2012 KeeBum Kim <keebum.kim@samsung.com>
-- Fix contact sync defect.
-- New MessageFW API.
-
-* Fri Jul 27 2012 KeeBum Kim <keebum.kim@samsung.com>
-- Change devman_haptic.h to devman_managed.h.
-- Modify to set MSG_SERVER_READY before sim status check.
-- Fix bug in sim message save related operations.
-- Limit sim related APIs not to work on sim not available status.
-- Modify indicator icon image path & related.
-
-* Tue Jul 17 2012 KeeBum Kim <keebum.kim@samsung.com>
-- Modify MAX_SEGMENT_NUM to 15.
-- Modify MMplayer related to support interrupted event.
-- Fix bug in storage change callback which could cause on submit request.
-
-* Fri Jun 29 2012 Sangkoo Kim <sangkoo.kim@samsung.com>
-- Modify vconf key path for sos sending option.
-
-* Mon Jun 18 2012 Seunghwan Lee <sh.cat.lee@samsung.com>
-- Storage change callback for scheduled message
-- code chage to support glib2-2.32
-- Apply Backup && Restore of Mms Type
-
-* Fri Jun 15 2012 Sangkoo Kim <sangkoo.kim@samsung.com>
-- Update display time for scheduled message when it is sent.
-
-* Thu Jun 14 2012 Seunghwan Lee <sh.cat.lee@samsung.com>
-- Comment the test app in CMakefile.
-- Modify MMS BG color of vconf value.
-- Bug fixed wrong query in MsgStoCheckReadReportIsSent
-- Add '-i' option for vconf keys of memory type
-- Add smsc vconf keys(default value).
-- To avoid msg incoming sound and notification on SOS
-
-* Fri Jun 8 2012 Sangkoo Kim <sangkoo.kim@samsung.com>
-- Add '-i' option for vconf keys of memory type.
-- Add smsc vconf keys(default value).
-- To avoid msg incoming sound and notification on SOS state.
-- Change BGcolor to black && font colore to white.
-
-* Wed May 31 2012 Keebum Kim <keebum.kim@samsung.com>
-- Apply Mdm policy.
-- SOS message.
-- Fix horizontality development problem.
-- Remove vconf key for new message count. (db/badge/com.samsung.message)
-- Change vconf key path of "mms_send/msg_class" to private.
-
-* Thu May 24 2012 Keebum Kim <keebum.kim@samsung.com>
-- Add new MAPI.
-
-* Fri May 18 2012 Sangkoo Kim <sangkoo.kim@samsung.com>
-- Modify to support new DRM service.
-- Rename private vconf keys.
-- Modify .postinst and .spec file to pre-install used vconf keys.
-- Remove compile warnings.
-- Fix bug in manual retrieve operation.
-
-* Fri May 11 2012 Jaeyun Jeong <jyjeong@samsung.com>
-- Fix DB conflict which cause db lock.
-- Fix bug in Find My Mobile function.
-- Add '*' and '#' symbol as valid number.
-
-* Wed May 9 2012 Keebum Kim <keebum.kim@samsung.com>
-- Change mobile tracker related vconf key define values.
-- Apply MDM policy for allowing text messaging.
-- Fix bug for getting thumbnail path.
-- Enable functionality of scheduled message.
-- Change alarm setting of scheduled message from volatile type to non-volatile.
-- Fix error in search query.
-
-* Thu May 3 2012 Keebum Kim <keebum.kim@samsung.com>
-- Change some thread list related APIs to support DB change.
-- DB change to support multiple recipient.
-
-* Thu Apr 19 2012 Keebum Kim <keebum.kim@samsung.com>
-- Modify to manage contact sync time by vconf.
-- Use g_idle_add() routine for updating unread message count(vconf values).
-- apply try{}catch{} code for handling unexpected exception to avoid thread terminating.
-- Fix bug for allocated size of replacing string.
-- Resolve search problem for special characters.
-- add xmlFree.
-
-* Tue Apr 10 2012 Keebum Kim <keebum.kim@samsung.com>
-- Remove unused vconf keys.
-- Initialize SMSC selected_index.
-- Remove systemd related.
-
-* Thu Apr 05 2012 Jaeyun Jeong <jyjeong@samsung.com>
-- Add notification property(NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE)
-- Fix S1-2397/2417/2418/2419.
-- Remove sent status callback check during submit request.
-- Modify offset and limit operation on search.
-- Remove invalid folder and file.
-- Change browser launching API from aul to service-capi.
-- Remove unused file.
-- Invalid type checking is fixed.
-
-* Fri Mar 16 2012 Jaeyun Jeong <jyjeong@samsung.com>
-- Add #include <sys/stat.h> to support chmod related defines.
-- Fix DRM content issue(unregistered mo content)
-
-* Wed Mar 14 2012 Jaeyun Jeong <jyjeong@samsung.com>
-- Modify plugin configuration file location for FOTA.
-- Remove the db query which create sample data.
-
-* Wed Feb 29 2012 Jaeyun Jeong <jyjeong@samsung.com>
-- Update msg-service.spec for OBS.
-- Fix TC execute failure.
-- Fix S1-1419(Removed mms raw file issue after rebooting)