%install
rm -rf %{buildroot}
+mkdir -p %{buildroot}%{_datadir}/upgrade/vd_scripts/additional_scripts
+install -p -m 500 script/migration/tts.sh %{buildroot}%{_datadir}/upgrade/vd_scripts/additional_scripts/tts.sh
+
%if "%{tizen_profile_name}" == "tv"
mv -f org.tizen.voice.ttsserver.tv.service org.tizen.voice.ttsserver.service
mv -f org.tizen.voice.ttsnotiserver.tv.service org.tizen.voice.ttsnotiserver.service
%{TZ_SYS_RO_ETC}/package-manager/parserlib/metadata/libtts-engine-parser.so*
#%{TZ_SYS_RO_ETC}/package-manager/parserlib/metadata/libtts-engine-language-pack-parser.so*
/etc/dbus-1/system.d/tts-server.conf
+%{_datadir}/upgrade/vd_scripts/additional_scripts/tts.sh
%files devel
%manifest %{name}-devel.manifest
--- /dev/null
+#!/bin/bash
+
+###BackupVconfKey: db/voice/tts/engine/default
+###BackupVconfKey: db/voice/tts/instant-reprepare-client
+
+source "$UPDATE_EXEC_PATH/common/util.inc"
+source "$UPDATE_EXEC_PATH/common/debug.inc"
+source "$UPDATE_EXEC_PATH/common/mig_ctl.inc"
+source "$UPDATE_EXEC_PATH/common/path_ctl.inc"
+source "$UPDATE_EXEC_PATH/common/error_handle.inc"
+
+function tts_migration() {
+ log I "TTS Migration config files"
+
+ local SRC_PATH=$(get_old_rw_path)/usr/data/.voice/
+ local DST_PATH=$(get_rw_path)/usr/data/.voice/
+ local SRC_CONF_PATH=$(get_old_rw_path)/usr/home/owner/share/.voice/tts-config.xml
+
+ if [ ! -e $DST_PATH ]; then
+ log I "TTS Migration set destination path"
+ mkdir -p -m 0775 $(get_rw_path)/usr/data/.voice
+ chsmack -t $(get_rw_path)/usr/data/.voice
+ chsmack -a "User::App::Shared" $(get_rw_path)/usr/data/.voice
+ mkdir -p $(get_rw_path)usr/data/.voice/tts/engine-info
+ chsmack -a "User::App::Shared" $(get_rw_path)/usr/data/.voice/tts
+ chsmack -t $(get_rw_path)/usr/data/.voice/tts/engine-info
+ chsmack -a "User::App::Shared" $(get_rw_path)/usr/data/.voice/tts/engine-info
+ chown -R ui_fw:users $(get_rw_path)/usr/data/.voice
+ fi
+
+ if [ -e $SRC_CONF_PATH ]; then
+ log I "TTS Migration 7.0 only START"
+ SRC_PREV_PATH=$(get_old_rw_path)/usr/home/owner/share/.voice/tts/1.0/engine-info
+ DST_ENGINE_PATH=$(get_rw_path)/usr/data/.voice/tts/engine-info
+
+ if [ ! -e $SRC_PREV_PATH ]; then
+ log E "TTS Migration ERROR : No orignal Data"
+ return
+ fi
+
+ mig_copy $SRC_PREV_PATH $DST_ENGINE_PATH || error_handle "default_data" $LINENO
+ mig_copy $SRC_CONF_PATH $DST_PATH || error_handle "default_data" $LINENO
+
+ chown -R ui_fw:users $(get_rw_path)/usr/data/.voice
+
+ log I "TTS Migration 7.0 only END"
+ else
+ log I "TTS Migration after 8.0 START"
+
+ if [ ! -e $SRC_PATH ]; then
+ log E "TTS Migration ERROR : No orignal Data"
+ return
+ fi
+
+ mig_copy $SRC_PATH $DST_PATH || error_handle "default_data" $LINENO
+ log I "TTS Migration after 8.0 END"
+ fi
+
+ log I "TTS Migration VconfKey"
+
+ VALUE_DEFAULT=$(vconftool get db/voice/tts/engine/default)
+ vconftool set -t string -f db/voice/tts/engine/default "$VALUE_DEFAULT"
+ log I "db/voice/tts/engine/default = $VALUE_DEFAULT"
+
+ VALUE_CLIENT=$(vconftool get db/voice/tts/instant-reprepare-client)
+ vconftool set -t int -f db/voice/tts/instant-reprepare-client "$VALUE_CLIENT"
+ log I "db/voice/tts/instant-reprepare-client = $VALUE_CLIENT"
+}
+
+# Trace flag check & enable
+if is_trace_enable; then
+ trace_enable
+fi
+
+mig_init
+tts_migration
+mig_finish
+
+exit 0