%description tool
Push service tool
+%define _upgrade_script_path /usr/share/upgrade/scripts/
+%define _upgrade_script sppc-upgrade.sh
+
%prep
%setup -q
install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/pushd.service
%install_service multi-user.target.wants pushd.service
-mkdir -p %{buildroot}/usr/share/license
-cp -f LICENSE %{buildroot}/usr/share/license/%{name}
+mkdir -p %{buildroot}/usr/share/licenses/%{name}
+cp -f LICENSE %{buildroot}/usr/share/licenses/%{name}
mkdir -p %{buildroot}%{_includedir}
cp -a include/push-service.h %{buildroot}%{_includedir}
mkdir -p %{buildroot}/usr/share/push/
mkdir -p %{buildroot}%{_bindir}
+mkdir -p %{buildroot}%{_upgrade_script_path}
+cp -f scripts/%{_upgrade_script} %{buildroot}%{_upgrade_script_path}
+
+
%ifarch %{arm}
#libpush
sqlite3 %{TZ_SYS_GLOBALUSER_DB}/.push.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
chown service_fw:service_fw %{TZ_SYS_GLOBALUSER_DB}/.push.db
chown service_fw:service_fw %{TZ_SYS_GLOBALUSER_DB}/.push.db-journal
-chmod 660 %{TZ_SYS_GLOBALUSER_DB}/.push.db
-chmod 660 %{TZ_SYS_GLOBALUSER_DB}/.push.db-journal
+chmod 644 %{TZ_SYS_GLOBALUSER_DB}/.push.db
+chmod 644 %{TZ_SYS_GLOBALUSER_DB}/.push.db-journal
chsmack -a "*" %{TZ_SYS_GLOBALUSER_DB}/.push.db
chsmack -a "*" %{TZ_SYS_GLOBALUSER_DB}/.push.db-journal
%files -n libpush
%manifest libpush.manifest
-%attr(644,service_fw,service_fw)%{_libdir}/libpush.so.*
+%attr(755,root,root) %{_libdir}/libpush.so.*
%files -n libpush-devel
%{_includedir}/*.h
%files bin
%manifest push-bin.manifest
%{_bindir}/pushd
-%attr(644,service_fw,service_fw)/usr/share/push/*.cer
-%attr(644,service_fw,service_fw)/usr/share/license/%{name}
+%attr(600,service_fw,service_fw) /usr/share/push/*.cer
+%attr(644,root,root) /usr/share/licenses/%{name}/LICENSE
+
+%{_upgrade_script_path}%{_upgrade_script}
+%attr(755,root,root) %{_upgrade_script_path}%{_upgrade_script}
%{_unitdir}/pushd.service
%{_unitdir}/multi-user.target.wants/pushd.service
* Mon Oct 22 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.25
- bundle null check added & protobuf null check added
* Wed Sep 19 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.24
-- when pkg is uninstlled, db process is added
+- when pkg is uninstalled, db process is added
* Fri Sep 7 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.23
- emul check logic is changed(using capi-system-info)
* Tue Sep 4 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.22
--- /dev/null
+#!/bin/sh
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+##########################
+# sppc patch for upgrade #
+##########################
+
+# 2.4
+SPPC_SOCKET_DIR_24=/tmp
+SPPC_USERD_DIR_24=/usr/lib/systemd/user
+
+# 3.0
+SPPC_DB_DIR=/opt/usr/dbspace
+SPPC_CERT_DIR=/usr/share/push
+
+#Socket
+rm -rf $SPPC_SOCKET_DIR_24/push_unread
+rm -rf $SPPC_SOCKET_DIR_24/push_cli
+
+#Service
+rm -rf $SPPC_USERD_DIR_24/tizen-middleware.target.wants/pushd.service
+rm -rf $SPPC_USERD_DIR_24/pushd.service
+
+#Certification
+chown service_fw:service_fw $SPPC_CERT_DIR/*
+
+chmod 600 $SPPC_CERT_DIR/*
+
+#DB
+chown service_fw:service_fw $SPPC_DB_DIR/.push.db
+chown service_fw:service_fw $SPPC_DB_DIR/.push.db-journal
+
+chmod 644 $SPPC_DB_DIR/.push.db
+chmod 644 $SPPC_DB_DIR/.push.db-journal
+