Add upgrade script 12/87612/3 submit/tizen/20160909.002354
authorsooyeon.kim <sooyeon.kim@samsung.com>
Fri, 9 Sep 2016 01:07:52 +0000 (10:07 +0900)
committersooyeon.kim <sooyeon.kim@samsung.com>
Fri, 9 Sep 2016 02:20:15 +0000 (11:20 +0900)
Change-Id: Ibcdb5ad530ee59621e431c12b463a00a3f9ba46e
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
501.tts_upgrade_24to30.sh [new file with mode: 0755]
CMakeLists.txt
packaging/tts.spec

diff --git a/501.tts_upgrade_24to30.sh b/501.tts_upgrade_24to30.sh
new file mode 100755 (executable)
index 0000000..e77b756
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+#------------------------------------------#
+# Resourced patch for upgrade (2.4 -> 3.0) #
+#------------------------------------------#
+
+# Macro
+VOICE_DIR_24=/opt/usr/data/voice
+TTS_CONF_DIR_24=/opt/home/app/.voice
+TTS_CONF_FILE_24=$TTS_CONF_DIR_24/tts-config.xml
+
+VOICE_DIR_30=/opt/usr/home/owner/share/.voice
+TTS_CONF_FILE_30=$VOICE_DIR_30/tts-config.xml
+
+# Make new directories
+mkdir -p $VOICE_DIR_30
+chown owner:users $VOICE_DIR_30
+chsmack -a User::App::Shared $VOICE_DIR_30
+
+
+# Move
+mv $VOICE_DIR_24/tts/ $VOICE_DIR_30/
+chown -R owner:users $VOICE_DIR_30/
+chsmack -ra User::App::Shared $VOICE_DIR_30/
+
+mv $TTS_CONF_FILE_24 $TTS_CONF_FILE_30
+chown owner:users $TTS_CONF_FILE_30
+chsmack -a User::App::Shared $TTS_CONF_FILE_30
+
+
+# Remove directories
+rm -rf $VOICE_DIR_24/tts
index e9bcd46..7243278 100644 (file)
@@ -59,6 +59,9 @@ INSTALL(FILES ${CMAKE_SOURCE_DIR}/tts-config.xml DESTINATION ${TZ_SYS_RO_SHARE}/
 
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/tts-server.conf DESTINATION /etc/dbus-1/system.d)
 
+## Upgrade script ##
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/tts_upgrade_24to30.sh DESTINATION ${TZ_SYS_RO_SHARE}/upgrade/scripts)
+
 ## Dbus service ##
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.voice.ttsserver.service DESTINATION ${TZ_SYS_RO_SHARE}/dbus-1/services)
 INSTALL(FILES ${CMAKE_SOURCE_DIR}/org.tizen.voice.ttsnotiserver.service DESTINATION ${TZ_SYS_RO_SHARE}/dbus-1/services)
index b29769e..1a2b33e 100644 (file)
@@ -94,6 +94,7 @@ mkdir -p %{TZ_SYS_RO_SHARE}/voice/test
 %manifest %{name}.manifest
 %defattr(-,root,root,-)
 %{_libdir}/lib*.so
+%{TZ_SYS_RO_SHARE}/upgrade/scripts/tts_upgrade_24to30.sh
 %{TZ_SYS_RO_SHARE}/voice/tts/1.0/tts-config.xml
 %{TZ_SYS_RO_SHARE}/dbus-1/services/org.tizen.voice*
 %{TZ_SYS_RO_SHARE}/voice/test/tts-test