%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}
%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
%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}
%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
--- /dev/null
+#!/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()
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
"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"
+ ]
+ }
}
}