[Tizen.Applications.PackageManager][TCSACR-272][Add] Add Dependency Info APIs (#996)
[platform/core/csapi/tizenfx.git] / packaging / csapi-tizenfx.spec.in
index bceb934..d2b47be 100644 (file)
@@ -1,32 +1,30 @@
+
+%define TIZEN_NET_API_VERSION @api_version@
+%define TIZEN_NET_RPM_VERSION @rpm_version@
+%define TIZEN_NET_NUGET_VERSION @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_TOOLS_PATH /usr/share/dotnet.tizen/tools
 %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
+License:    Apache-2.0 and MIT
 URL:        https://www.tizen.org
 Source0:    %{name}-%{version}.tar.gz
 Source1:    %{name}.manifest
 
-BuildRequires: dotnet-build-tools
-
-BuildArch: noarch
+BuildArch:   noarch
 ExcludeArch: aarch64
 AutoReqProv: no
 
-Requires(post): vconf
-
+BuildRequires: dotnet-build-tools
+Requires(post): /usr/bin/vconftool
 
 %description
 %{summary}
@@ -39,13 +37,21 @@ AutoReqProv: no
 %description nuget
 NuGet package for %{name}
 
+%package tools
+Summary:   Tools for TizenFX
+Group:     Development/Libraries
+AutoReqProv: no
+
+%description tools
+Tools for TizenFX
+
 %package dummy
-Summary:   Dummy assemblies of Tizen .NET
+Summary:   not used package
 Group:     Development/Libraries
 AutoReqProv: no
 
 %description dummy
-Dummy assemblies of Tizen .NET
+not used package
 
 %package full
 Summary:   All Tizen .NET assemblies
@@ -68,7 +74,6 @@ All .pdb files of Tizen .NET
 Summary:   Tizen .NET assemblies for Common profile
 Group:     Development/Libraries
 Requires:  %{name} = %{version}-%{release}
-Requires:  csapi-tizenfx-dummy = %{version}-%{release}
 AutoReqProv: no
 
 %description common
@@ -78,7 +83,6 @@ Tizen .NET assemblies for Common profile
 Summary:   Tizen .NET assemblies for Mobile profile
 Group:     Development/Libraries
 Requires:  %{name} = %{version}-%{release}
-Requires:  csapi-tizenfx-dummy = %{version}-%{release}
 AutoReqProv: no
 
 %description mobile
@@ -88,7 +92,6 @@ Tizen .NET assemblies for Mobile profile
 Summary:   Tizen .NET assemblies for Emulator of Mobile profile
 Group:     Development/Libraries
 Requires:  %{name} = %{version}-%{release}
-Requires:  csapi-tizenfx-dummy = %{version}-%{release}
 AutoReqProv: no
 
 %description mobile-emul
@@ -98,27 +101,15 @@ Tizen .NET assemblies for Emulator of Mobile profile
 Summary:   Tizen .NET assemblies for TV profile
 Group:     Development/Libraries
 Requires:  %{name} = %{version}-%{release}
-Requires:  csapi-tizenfx-dummy = %{version}-%{release}
 AutoReqProv: no
 
 %description tv
 Tizen .NET assemblies for TV profile
 
-%package ivi
-Summary:   Tizen .NET assemblies for IVI profile
-Group:     Development/Libraries
-Requires:  %{name} = %{version}-%{release}
-Requires:  csapi-tizenfx-dummy = %{version}-%{release}
-AutoReqProv: no
-
-%description ivi
-Tizen .NET assemblies for IVI profile
-
 %package wearable
 Summary:   Tizen .NET assemblies for Wearable profile
 Group:     Development/Libraries
 Requires:  %{name} = %{version}-%{release}
-Requires:  csapi-tizenfx-dummy = %{version}-%{release}
 AutoReqProv: no
 
 %description wearable
@@ -129,30 +120,39 @@ Tizen .NET assemblies for Wearable profile
 cp %{SOURCE1} .
 
 %build
+%{?asan:export ASAN_OPTIONS=use_sigaltstack=false:allow_user_segv_handler=true:handle_sigfpe=false:`cat /ASAN_OPTIONS`}
+
+%define _tizenfx_bin_path Artifacts
+
+rm -fr %{_tizenfx_bin_path}
+export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
+
+%define build_cmd ./tools/scripts/retry.sh ./tools/scripts/timeout.sh -t 600 ./build.sh
+%{build_cmd} --full
+%{build_cmd} --pack %{TIZEN_NET_NUGET_VERSION}
 
 GetFileList() {
   PROFILE=$1
-  cat pkg/PlatformFileList.txt | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1 | sed "s#^#%{DOTNET_ASSEMBLY_PATH}/#"
+  cat packaging/PlatformFileList.txt | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1 | sed "s#^#%{DOTNET_ASSEMBLY_PATH}/#"
+  for f in $(cat packaging/PlatformFileList.txt | grep -v -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1); do
+    if [ -f %{_tizenfx_bin_path}/bin/dummy/$f ]; then
+      echo "%{DOTNET_ASSEMBLY_PATH}/ref/$f"
+    fi
+  done
 }
 
 GetFileList common > common.filelist
 GetFileList mobile > mobile.filelist
 GetFileList mobile-emul > mobile-emul.filelist
 GetFileList tv > tv.filelist
-GetFileList ivi > ivi.filelist
 GetFileList wearable > wearable.filelist
 
-rm -fr %{_tizenfx_bin_path}
-export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
-./build.sh --full
-./build.sh --dummy
-./build.sh --pack %{TIZEN_NET_NUGET_VERSION} %{TIZEN_NET_INTERNAL_NUGET_VERSION}
-
 %install
 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_PATH}
 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
 mkdir -p %{buildroot}%{DOTNET_NUGET_SOURCE}
+mkdir -p %{buildroot}%{DOTNET_TOOLS_PATH}
 
 # Install Runtime Assemblies
 install -p -m 644 %{_tizenfx_bin_path}/bin/public/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
@@ -173,10 +173,14 @@ install -p -m 644 %{_tizenfx_bin_path}/bin/dummy/*.dll %{buildroot}%{DOTNET_ASSE
 
 # Install NuGet Packages
 install -p -m 644 %{_tizenfx_bin_path}/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}
+install -p -m 644 packaging/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}
 
-%post
-vconftool set -t int "db/dotnet/tizen_api_version" %{TIZEN_NET_API_VERSION} -f
+# Install Tools
+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
 
 %files
 %license LICENSE
@@ -184,12 +188,16 @@ vconftool set -t int "db/dotnet/tizen_api_version" %{TIZEN_NET_API_VERSION} -f
 %files nuget
 %{DOTNET_NUGET_SOURCE}/*.nupkg
 
+%files tools
+%manifest %{name}.manifest
+%{DOTNET_TOOLS_PATH}/*
+
 %files dummy
-%attr(644,root,root) %{DOTNET_ASSEMBLY_DUMMY_PATH}/*.dll
 
 %files full
 %manifest %{name}.manifest
 %attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.dll
+%attr(644,root,root) %{DOTNET_ASSEMBLY_DUMMY_PATH}/*.dll
 %attr(644,root,root) %{DOTNET_ASSEMBLY_RES_PATH}/*
 
 %files debug
@@ -207,8 +215,5 @@ vconftool set -t int "db/dotnet/tizen_api_version" %{TIZEN_NET_API_VERSION} -f
 %files tv -f tv.filelist
 %manifest %{name}.manifest
 
-%files ivi -f ivi.filelist
-%manifest %{name}.manifest
-
 %files wearable -f wearable.filelist
 %manifest %{name}.manifest