[Build] Add FOTA script for TizenFX
authorWonyoung Choi <wy80.choi@samsung.com>
Wed, 11 Nov 2020 09:58:30 +0000 (18:58 +0900)
committerWonyoung Choi <wy80.choi@samsung.com>
Wed, 11 Nov 2020 10:37:35 +0000 (19:37 +0900)
packaging/500.tizenfx_upgrade.sh [new file with mode: 0644]
packaging/csapi-tizenfx.spec
packaging/csapi-tizenfx.spec.in

diff --git a/packaging/500.tizenfx_upgrade.sh b/packaging/500.tizenfx_upgrade.sh
new file mode 100644 (file)
index 0000000..e4e5332
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/bash
+# RW Update Script for 4.0 -> 5.5
+
+/usr/bin/vconftool set -f -t int db/dotnet/tizen_api_version 7
+/usr/bin/vconftool set -f -t string db/dotnet/tizen_rid_version "4.0.0:5.0.0:5.5.0"
index 8ed5a60..aa1dfff 100644 (file)
@@ -13,6 +13,8 @@
 
 %define TIZEN_NET_RUNTIME_IDENTIFIERS 4.0.0:5.0.0:5.5.0
 
+%define UPGRADE_SCRIPT_PATH /usr/share/upgrade/scripts
+
 Name:       csapi-tizenfx
 Summary:    Assemblies of Tizen .NET
 Version:    %{TIZEN_NET_RPM_VERSION}
@@ -191,6 +193,10 @@ install -p -m 644 tools/bin/* %{buildroot}%{DOTNET_TOOLS_PATH}
 # Install Preload
 install -p -m 644 packaging/preload/*.preload %{buildroot}%{DOTNET_PRELOAD_PATH}
 
+# Install Upgrade Script
+mkdir -p %{buildroot}%{UPGRADE_SCRIPT_PATH}
+install -p -m 755 packaging/500.tizenfx_upgrade.sh %{buildroot}%{UPGRADE_SCRIPT_PATH}
+
 %post
 /usr/bin/vconftool set -t int db/dotnet/tizen_api_version %{TIZEN_NET_API_VERSION} -f
 /usr/bin/vconftool set -t string db/dotnet/tizen_api_path %{DOTNET_ASSEMBLY_PATH} -f
@@ -199,6 +205,7 @@ install -p -m 644 packaging/preload/*.preload %{buildroot}%{DOTNET_PRELOAD_PATH}
 %files
 %license LICENSE
 %license LICENSE.MIT
+%attr(0755,root,root) %{UPGRADE_SCRIPT_PATH}/500.tizenfx_upgrade.sh
 
 %files nuget
 %{DOTNET_NUGET_SOURCE}/*.nupkg
index 6dc295b..3516a7b 100644 (file)
@@ -12,6 +12,8 @@
 
 %define TIZEN_NET_RUNTIME_IDENTIFIERS @rid_version@
 
+%define UPGRADE_SCRIPT_PATH /usr/share/upgrade/scripts
+
 Name:       csapi-tizenfx
 Summary:    Assemblies of Tizen .NET
 Version:    %{TIZEN_NET_RPM_VERSION}
@@ -190,6 +192,10 @@ install -p -m 644 tools/bin/* %{buildroot}%{DOTNET_TOOLS_PATH}
 # Install Preload
 install -p -m 644 packaging/preload/*.preload %{buildroot}%{DOTNET_PRELOAD_PATH}
 
+# Install Upgrade Script
+mkdir -p %{buildroot}%{UPGRADE_SCRIPT_PATH}
+install -p -m 755 packaging/500.tizenfx_upgrade.sh %{buildroot}%{UPGRADE_SCRIPT_PATH}
+
 %post
 /usr/bin/vconftool set -t int db/dotnet/tizen_api_version %{TIZEN_NET_API_VERSION} -f
 /usr/bin/vconftool set -t string db/dotnet/tizen_api_path %{DOTNET_ASSEMBLY_PATH} -f
@@ -198,6 +204,7 @@ install -p -m 644 packaging/preload/*.preload %{buildroot}%{DOTNET_PRELOAD_PATH}
 %files
 %license LICENSE
 %license LICENSE.MIT
+%attr(0755,root,root) %{UPGRADE_SCRIPT_PATH}/500.tizenfx_upgrade.sh
 
 %files nuget
 %{DOTNET_NUGET_SOURCE}/*.nupkg