Release 5.0.0.b362+nui61
[platform/core/csapi/tizenfx.git] / packaging / csapi-tizenfx.spec
index 7570c8a..8b659e2 100644 (file)
@@ -1,7 +1,3 @@
-# !! IMPORTANT !!
-# This packaging spec file is for developer testing only.
-# For Tizen release, the spec file in the tizen branch should be used.
-
 %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
@@ -9,9 +5,13 @@
 
 %define _tizenfx_bin_path Artifacts
 
+%define TIZEN_NET_API_VERSION 5
+%define TIZEN_NET_NUGET_VERSION 5.0.0-preview1-00362
+%define TIZEN_NET_INTERNAL_NUGET_VERSION 5.0.0.362
+
 Name:       csapi-tizenfx
 Summary:    Assemblies of Tizen .NET
-Version:    99.99.99
+Version:    5.0.0.b362+nui61
 Release:    1
 Group:      Development/Libraries
 License:    Apache-2.0
@@ -22,8 +22,12 @@ Source1:    %{name}.manifest
 BuildRequires: dotnet-build-tools
 
 BuildArch: noarch
+ExcludeArch: aarch64
 AutoReqProv: no
 
+Requires(post): vconf
+
+
 %description
 %{summary}
 
@@ -46,6 +50,7 @@ Dummy assemblies of Tizen .NET
 %package full
 Summary:   All Tizen .NET assemblies
 Group:     Development/Libraries
+Requires:  %{name} = %{version}-%{release}
 AutoReqProv: no
 
 %description full
@@ -62,7 +67,8 @@ All .pdb files of Tizen .NET
 %package common
 Summary:   Tizen .NET assemblies for Common profile
 Group:     Development/Libraries
-Requires:  csapi-tizenfx-dummy
+Requires:  %{name} = %{version}-%{release}
+Requires:  csapi-tizenfx-dummy = %{version}-%{release}
 AutoReqProv: no
 
 %description common
@@ -71,7 +77,8 @@ Tizen .NET assemblies for Common profile
 %package mobile
 Summary:   Tizen .NET assemblies for Mobile profile
 Group:     Development/Libraries
-Requires:  csapi-tizenfx-dummy
+Requires:  %{name} = %{version}-%{release}
+Requires:  csapi-tizenfx-dummy = %{version}-%{release}
 AutoReqProv: no
 
 %description mobile
@@ -80,7 +87,8 @@ Tizen .NET assemblies for Mobile profile
 %package mobile-emul
 Summary:   Tizen .NET assemblies for Emulator of Mobile profile
 Group:     Development/Libraries
-Requires:  csapi-tizenfx-dummy
+Requires:  %{name} = %{version}-%{release}
+Requires:  csapi-tizenfx-dummy = %{version}-%{release}
 AutoReqProv: no
 
 %description mobile-emul
@@ -89,7 +97,8 @@ Tizen .NET assemblies for Emulator of Mobile profile
 %package tv
 Summary:   Tizen .NET assemblies for TV profile
 Group:     Development/Libraries
-Requires:  csapi-tizenfx-dummy
+Requires:  %{name} = %{version}-%{release}
+Requires:  csapi-tizenfx-dummy = %{version}-%{release}
 AutoReqProv: no
 
 %description tv
@@ -98,7 +107,8 @@ Tizen .NET assemblies for TV profile
 %package ivi
 Summary:   Tizen .NET assemblies for IVI profile
 Group:     Development/Libraries
-Requires:  csapi-tizenfx-dummy
+Requires:  %{name} = %{version}-%{release}
+Requires:  csapi-tizenfx-dummy = %{version}-%{release}
 AutoReqProv: no
 
 %description ivi
@@ -107,7 +117,8 @@ Tizen .NET assemblies for IVI profile
 %package wearable
 Summary:   Tizen .NET assemblies for Wearable profile
 Group:     Development/Libraries
-Requires:  csapi-tizenfx-dummy
+Requires:  %{name} = %{version}-%{release}
+Requires:  csapi-tizenfx-dummy = %{version}-%{release}
 AutoReqProv: no
 
 %description wearable
@@ -131,12 +142,11 @@ GetFileList tv > tv.filelist
 GetFileList ivi > ivi.filelist
 GetFileList wearable > wearable.filelist
 
-rm -fr %{_tizenfx_bin_path}/bin
-rm -f %{_tizenfx_bin_path}/*.nupkg
+rm -fr %{_tizenfx_bin_path}
 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
 ./build.sh --full
 ./build.sh --dummy
-./build.sh --pack
+./build.sh --pack %{TIZEN_NET_NUGET_VERSION} %{TIZEN_NET_INTERNAL_NUGET_VERSION}
 
 %install
 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_PATH}
@@ -144,12 +154,33 @@ mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
 mkdir -p %{buildroot}%{DOTNET_NUGET_SOURCE}
 
-install -p -m 644 %{_tizenfx_bin_path}/bin/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
-install -p -m 644 %{_tizenfx_bin_path}/bin/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
-install -p -m 644 %{_tizenfx_bin_path}/bin/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
-install -p -m 644 %{_tizenfx_bin_path}/bin_dummy/*.dll %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
+# Install Runtime Assemblies
+install -p -m 644 %{_tizenfx_bin_path}/bin/public/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
+install -p -m 644 %{_tizenfx_bin_path}/bin/internal/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
+
+# Install Debug Symbols
+install -p -m 644 %{_tizenfx_bin_path}/bin/public/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
+install -p -m 644 %{_tizenfx_bin_path}/bin/internal/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
+
+# Install Resource files
+[ -d %{_tizenfx_bin_path}/bin/public/res ] \
+  && install -p -m 644 %{_tizenfx_bin_path}/bin/public/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
+[ -d %{_tizenfx_bin_path}/bin/internal/res ] \
+  && install -p -m 644 %{_tizenfx_bin_path}/bin/internal/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
+
+# Install Dummy Assemblies
+install -p -m 644 %{_tizenfx_bin_path}/bin/dummy/*.dll %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
+
+# Install NuGet Packages
 install -p -m 644 %{_tizenfx_bin_path}/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}
 
+%post
+vconftool set -t int "db/dotnet/tizen_api_version" %{TIZEN_NET_API_VERSION} -f
+
+
+%files
+%license LICENSE
+
 %files nuget
 %{DOTNET_NUGET_SOURCE}/*.nupkg
 
@@ -158,7 +189,6 @@ install -p -m 644 %{_tizenfx_bin_path}/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE
 
 %files full
 %manifest %{name}.manifest
-%license LICENSE
 %attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.dll
 %attr(644,root,root) %{DOTNET_ASSEMBLY_RES_PATH}/*
 
@@ -167,24 +197,18 @@ install -p -m 644 %{_tizenfx_bin_path}/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE
 
 %files common -f common.filelist
 %manifest %{name}.manifest
-%license LICENSE
 
 %files mobile -f mobile.filelist
 %manifest %{name}.manifest
-%license LICENSE
 
 %files mobile-emul -f mobile-emul.filelist
 %manifest %{name}.manifest
-%license LICENSE
 
 %files tv -f tv.filelist
 %manifest %{name}.manifest
-%license LICENSE
 
 %files ivi -f ivi.filelist
 %manifest %{name}.manifest
-%license LICENSE
 
 %files wearable -f wearable.filelist
 %manifest %{name}.manifest
-%license LICENSE