BuildRequires: pkgconfig(libsystemd-daemon)
BuildRequires: pkgconfig(aul)
+%define upgrade_script_path /usr/share/upgrade/scripts
+%define upgrade_data_path /usr/share/upgrade/data
+
%if "%{?profile}" == "wearable"
%define profile_wearable 1
%else
mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
install -m 0644 %SOURCE1005 %{buildroot}%{_sysconfdir}/dbus-1/system.d/org.tizen.aul.syspopup.conf
+mkdir -p %{buildroot}%{upgrade_script_path}
+mkdir -p %{buildroot}%{upgrade_data_path}
+cp -f scripts/102.syspopup_upgrade.sh %{buildroot}%{upgrade_script_path}
+cp -f %{buildroot}%{TZ_SYS_DB}/.syspopup.db %{buildroot}%{upgrade_data_path}
+
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%{_libdir}/libsyspopup.so.0.1.0
%TZ_SYS_RO_PACKAGES/org.tizen.syspopup-app.xml
%{_datadir}/popup_noti_term
-
%attr(644,root,%{TZ_SYS_USER_GROUP}) %{TZ_SYS_DB}/.syspopup.db
-
%TZ_SYS_RO_SHARE/license/%{name}
+%{upgrade_script_path}/102.syspopup_upgrade.sh
+%{upgrade_data_path}/.syspopup.db
%files devel
%manifest %{name}-devel.manifest
--- /dev/null
+#!/bin/sh
+
+#------------------------------------------#
+# syspopup upgrade (2.4 -> 3.0) #
+#------------------------------------------#
+
+# Macro
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+UPGRADE_DB_DIR=/usr/share/upgrade/data
+DB_DIR=/opt/dbspace
+
+UPGRADE_DB_SYSPOPUP=$UPGRADE_DB_DIR/.syspopup.db
+DB_SYSPOPUP=$DB_DIR/.syspopup.db
+
+# Copy DB
+cp -rf $UPGRADE_DB_SYSPOPUP $DB_SYSPOPUP
+
+chmod 644 $DB_SYSPOPUP
+chown :users $DB_SYSPOPUP
+chsmack -a System::Shared $DB_SYSPOPUP
+
+# Delete DB journal
+rm -rf $DB_SYSPOPUP-journal
+