-# !! IMPORTANT !!
-# This packaging spec file is for developer testing only.
-# For Tizen release, the spec.in file should be used.
+# Auto-generated from csapi-tizenfx.spec.in by makespec.sh
+
+%define TIZEN_NET_API_VERSION 5
+%define TIZEN_NET_RPM_VERSION 5.0.0.999+nui61.3
+%define TIZEN_NET_NUGET_VERSION 5.0.0-preview1-99999
+%define TIZEN_NET_INTERNAL_NUGET_VERSION 5.0.0.999
%define DOTNET_ASSEMBLY_PATH /usr/share/dotnet.tizen/framework
%define DOTNET_ASSEMBLY_DUMMY_PATH %{DOTNET_ASSEMBLY_PATH}/ref
%define DOTNET_ASSEMBLY_RES_PATH %{DOTNET_ASSEMBLY_PATH}/res
%define DOTNET_NUGET_SOURCE /nuget
-%define _tizenfx_bin_path Artifacts
-
-%define TIZEN_NET_API_VERSION 5
-%define TIZEN_NET_NUGET_VERSION 5.0.0-preview1
-%define TIZEN_NET_INTERNAL_NUGET_VERSION 5.0.0.999
-
Name: csapi-tizenfx
Summary: Assemblies of Tizen .NET
-Version: 99.99.99
+Version: %{TIZEN_NET_RPM_VERSION}
Release: 1
Group: Development/Libraries
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
Source1: %{name}.manifest
-BuildRequires: dotnet-build-tools
-
-BuildArch: noarch
+BuildArch: noarch
ExcludeArch: aarch64
AutoReqProv: no
+BuildRequires: dotnet-build-tools
Requires(post): vconf
-
%description
%{summary}
%build
+%define _tizenfx_bin_path Artifacts
+
GetFileList() {
PROFILE=$1
cat pkg/PlatformFileList.txt | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1 | sed "s#^#%{DOTNET_ASSEMBLY_PATH}/#"
+
+%define TIZEN_NET_API_VERSION @api_version@
+%define TIZEN_NET_RPM_VERSION @rpm_version@
+%define TIZEN_NET_NUGET_VERSION @nuget_version@
+%define TIZEN_NET_INTERNAL_NUGET_VERSION @internal_nuget_version@
+
%define DOTNET_ASSEMBLY_PATH /usr/share/dotnet.tizen/framework
%define DOTNET_ASSEMBLY_DUMMY_PATH %{DOTNET_ASSEMBLY_PATH}/ref
%define DOTNET_ASSEMBLY_RES_PATH %{DOTNET_ASSEMBLY_PATH}/res
%define DOTNET_NUGET_SOURCE /nuget
-%define _tizenfx_bin_path Artifacts
-
-%define TIZEN_NET_API_VERSION 5
-%define TIZEN_NET_NUGET_VERSION @nuget_version@
-%define TIZEN_NET_INTERNAL_NUGET_VERSION @internal_nuget_version@
-
Name: csapi-tizenfx
Summary: Assemblies of Tizen .NET
-Version: @rpm_version@
+Version: %{TIZEN_NET_RPM_VERSION}
Release: 1
Group: Development/Libraries
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
Source1: %{name}.manifest
-BuildRequires: dotnet-build-tools
-
-BuildArch: noarch
+BuildArch: noarch
ExcludeArch: aarch64
AutoReqProv: no
+BuildRequires: dotnet-build-tools
Requires(post): vconf
-
%description
%{summary}
%build
+%define _tizenfx_bin_path Artifacts
+
GetFileList() {
PROFILE=$1
cat pkg/PlatformFileList.txt | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1 | sed "s#^#%{DOTNET_ASSEMBLY_PATH}/#"
--- /dev/null
+#!/bin/bash
+
+SCRIPT_FILE=$(readlink -f $0)
+SCRIPT_DIR=$(dirname $SCRIPT_FILE)
+
+VERSION_FILE=$SCRIPT_DIR/version.txt
+RPMSPEC=$SCRIPT_DIR/csapi-tizenfx.spec
+RPMSPEC_IN=$RPMSPEC.in
+
+source $VERSION_FILE
+
+while getopts ":r:n:i:" opt; do
+ case $opt in
+ r) RPM_VERSION=$OPTARG ;;
+ n) NUGET_VERSION=$OPTARG ;;
+ i) INTERNAL_NUGET_VERSION=$OPTARG ;;
+ :) echo "Option -$OPTARG requires an argument."; exit 1 ;;
+ esac
+done
+
+RPM_VERSION=$RPM_VERSION+$RPM_VERSION_SUFFIX
+
+# Update RPM Spec
+echo "# Auto-generated from $(basename $RPMSPEC_IN) by makespec.sh" | cat - $RPMSPEC_IN > $RPMSPEC
+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
+sed -i -e "s/@internal_nuget_version@/$INTERNAL_NUGET_VERSION/g" $RPMSPEC
--- /dev/null
+# Tizen .NET API Level
+API_VERSION=5
+
+# Default Versions (will be replaced by CI)
+RPM_VERSION=5.0.0.999
+NUGET_VERSION=5.0.0-preview1-99999
+INTERNAL_NUGET_VERSION=5.0.0.999
+
+# RPM Version Suffix
+RPM_VERSION_SUFFIX=nui61.3