From: JongHeonChoi Date: Tue, 10 Mar 2020 23:17:08 +0000 (+0900) Subject: [Build] Add RIDs of Tizen.6.0.0 and Set RIDs to vconf automatically (#1420) X-Git-Tag: submit/tizen/20200312.005534~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3062bbe9834f2dfa2c963d3d4fc4b3044583d965;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [Build] Add RIDs of Tizen.6.0.0 and Set RIDs to vconf automatically (#1420) * [Build] Add RIDs of Tizen.6.0.0 and Set RIDs to vconf automatically * Added to update RIDs with makerid.py --- diff --git a/packaging/csapi-tizenfx.spec b/packaging/csapi-tizenfx.spec index 055f4426e..7ee6d8c5a 100644 --- a/packaging/csapi-tizenfx.spec +++ b/packaging/csapi-tizenfx.spec @@ -10,6 +10,8 @@ %define DOTNET_TOOLS_PATH /usr/share/dotnet.tizen/tools %define DOTNET_NUGET_SOURCE /nuget +%define TIZEN_NET_RUNTIME_IDENTIFIERS 4.0.0:5.0.0:5.5.0:6.0.0 + Name: csapi-tizenfx Summary: Assemblies of Tizen .NET Version: %{TIZEN_NET_RPM_VERSION} @@ -182,6 +184,7 @@ install -p -m 644 tools/bin/* %{buildroot}%{DOTNET_TOOLS_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 +/usr/bin/vconftool set -t string db/dotnet/tizen_rid_version %{TIZEN_NET_RUNTIME_IDENTIFIERS} -f %files %license LICENSE diff --git a/packaging/csapi-tizenfx.spec.in b/packaging/csapi-tizenfx.spec.in index 4a5761094..2ea5198ec 100644 --- a/packaging/csapi-tizenfx.spec.in +++ b/packaging/csapi-tizenfx.spec.in @@ -9,6 +9,8 @@ %define DOTNET_TOOLS_PATH /usr/share/dotnet.tizen/tools %define DOTNET_NUGET_SOURCE /nuget +%define TIZEN_NET_RUNTIME_IDENTIFIERS @rid_version@ + Name: csapi-tizenfx Summary: Assemblies of Tizen .NET Version: %{TIZEN_NET_RPM_VERSION} @@ -181,6 +183,7 @@ install -p -m 644 tools/bin/* %{buildroot}%{DOTNET_TOOLS_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 +/usr/bin/vconftool set -t string db/dotnet/tizen_rid_version %{TIZEN_NET_RUNTIME_IDENTIFIERS} -f %files %license LICENSE diff --git a/packaging/makerid.py b/packaging/makerid.py new file mode 100755 index 000000000..d6a5dca75 --- /dev/null +++ b/packaging/makerid.py @@ -0,0 +1,36 @@ +#!/usr/bin/python3 + +import json +import os + +scrpit_dir = os.path.dirname(os.path.abspath(__file__)) +runtime_dir = os.path.join(scrpit_dir, "../pkg/Tizen.NET/runtime.json") +spec_dir = os.path.join(scrpit_dir, "csapi-tizenfx.spec") + +with open(runtime_dir) as json_file: + json_data = json.load(json_file) + json_string = json_data["runtimes"] + + key_list = json_string.keys() + rid_list = [] + + for key in key_list: + key = key.replace("-armel", "") + key = key.replace("-x86", "") + key = key.replace("tizen.", "") + key = key.replace("tizen", "") + if key.strip(): + rid_list.append(key) + + rid_list = list(set(rid_list)) + rid_list.sort() + + f = open(spec_dir,'r') + origin_data = f.read() + f.close() + + new_data = origin_data.replace("@rid_version@", ':'.join(rid_list)) + + f = open(spec_dir, 'w') + f.write(new_data) + f.close() diff --git a/packaging/makespec.sh b/packaging/makespec.sh index 6a57f617f..7afcedac4 100755 --- a/packaging/makespec.sh +++ b/packaging/makespec.sh @@ -24,3 +24,6 @@ echo "# Auto-generated from $(basename $RPMSPEC_IN) by makespec.sh" | cat - $RPM sed -i -e "s/@api_version@/$API_VERSION/g" $RPMSPEC sed -i -e "s/@rpm_version@/$RPM_VERSION/g" $RPMSPEC sed -i -e "s/@nuget_version@/$NUGET_VERSION/g" $RPMSPEC + +# Update RID +$SCRIPT_DIR/makerid.py diff --git a/pkg/Tizen.NET/runtime.json b/pkg/Tizen.NET/runtime.json index 8d5d3a00a..149925b85 100644 --- a/pkg/Tizen.NET/runtime.json +++ b/pkg/Tizen.NET/runtime.json @@ -68,5 +68,22 @@ "tizen.5.0.0-x86" ] }, + "tizen.6.0.0": { + "#import": [ + "tizen.5.5.0" + ] + }, + "tizen.6.0.0-armel": { + "#import": [ + "tizen.6.0.0", + "tizen.5.5.0-armel" + ] + }, + "tizen.6.0.0-x86": { + "#import": [ + "tizen.6.0.0", + "tizen.5.5.0-x86" + ] + } } }