fix macros.dotnet-build-tools 96/105596/1
authorWonYoung Choi <wy80.choi@samsung.com>
Mon, 19 Dec 2016 05:36:01 +0000 (14:36 +0900)
committerWonYoung Choi <wy80.choi@samsung.com>
Mon, 19 Dec 2016 05:36:01 +0000 (14:36 +0900)
Change-Id: I712be288b57409a5c8dedbdf79ae3e37b05a331c

packaging/dotnet-build-tools.spec
packaging/macros.dotnet-build-tools

index 54646430e9054fce67780899fa0dcb763eb0911a..c9eae0baa95290ad644416483a50090320322cfa 100644 (file)
@@ -28,7 +28,6 @@ C# Deivce API with xbuild in GBS environment.
 %install
 %define NuGetDir %{_datadir}/NuGet
 %define XBuildDir /usr/lib/mono/xbuild
-%define PCLRefDir /usr/lib/mono/xbuild-frameworks/.NETPortable
 
 # Tizen.GBS.BuildTasks
 mkdir -p %{buildroot}%{XBuildDir}/14.0/Microsoft.Common.targets/ImportAfter
index 4db10615ecea5b8f09c97b344712ac040491eb76..1712f9e1e80fce350b136383c97286c376ac9373 100644 (file)
@@ -1,14 +1,24 @@
-# Macro definitions for CSAPI Build
+#########################################
+## Macro definitions for CSAPI Build   ##
+#########################################
 
-%_dotnet_build_conf %{lua:if tonumber(rpm.expand("0%{?tizen_build_devel_mode}")) == 1 then print "Debug" else print "Release" end}
+## Configuration ###############################################################
+
+%_with_corefx 1
 
 %_dotnet_assembly_path  /opt/usr/share/dotnet.tizen/framework
-%_mono_assembly_path    /opt/usr/lib/assembly
+%_mono_assembly_path    /usr/lib/assembly
+
+%_dotnet_exclude_arch   aarch64 %ix86
+
+%_mono_subrpm 0
+
+################################################################################
 
 %dotnet_assembly_path   %{_dotnet_assembly_path}
 %dotnet_assembly_files  %{_dotnet_assembly_path}/*.dll
 
-%_with_corefx 1
+%_dotnet_build_conf %{lua:if tonumber(rpm.expand("0%{?tizen_build_devel_mode}")) == 1 then print "Debug" else print "Release" end}
 
 %_nuget_package \
 %package nuget\
@@ -32,9 +42,16 @@ Group:     Development/Libraries\
 %attr(644,root,root) %{_mono_assembly_path}/*.dll\
 %{nil}
 
-%dotnet_subpackages \
+%dotnet_import_common \
+AutoReqProv: no \
+ExcludeArch: %{_dotnet_exclude_arch} \
+%{nil}
+
+%dotnet_import_sub_packages \
 %_nuget_package \
+%if 0%{?_mono_subrpm} \
 %_mono_package \
+%endif \
 %{nil}
 
 %dotnet_build() \
@@ -43,19 +60,16 @@ find %{1}/*.csproj -print0 | xargs -n1 -0 xbuild /p:Configuration=%{_dotnet_buil
 %{nil}
 
 %dotnet_pack() \
-nuget pack %{1}/%{1}.nuspec -Version %{?2}%{!?2:%{version}} -Properties Configuration=%{_dotnet_build_conf} \
+nuget pack %{1} -Version %{?2}%{!?2:%{version}} -Properties Configuration=%{_dotnet_build_conf} \
 %{nil}
 
 %dotnet_install() \
-%if 0%{?_with_corefx} \
 mkdir -p %{buildroot}%{_dotnet_assembly_path} \
 mkdir -p %{buildroot}%{_mono_assembly_path} \
 mkdir -p %{buildroot}/nuget \
-install -p -m 644 %{1}/bin/%{_dotnet_build_conf}/%{1}.dll %{buildroot}%{_dotnet_assembly_path} \
-%else \
-  install -p -m 644 %{1}/bin/%{_dotnet_build_conf}/Net45/%{1}.dll %{buildroot}%{_dotnet_assembly_path} \
+install -p -m 644 "%{1}/bin/%{_dotnet_build_conf}/%{1}.dll" %{buildroot}%{_dotnet_assembly_path} \
+%if 0%{?_mono_subrpm} \
+[ -f "%{1}/bin/%{_dotnet_build_conf}/Net45/%{1}.dll" ] && install -p -m 644 "%{1}/bin/%{_dotnet_build_conf}/Net45/%{1}.dll" %{buildroot}%{_mono_assembly_path} \
 %endif \
-install -p -m 644 %{1}/bin/%{_dotnet_build_conf}/Net45/%{1}.dll %{buildroot}%{_mono_assembly_path} \
 install -p -m 644 %{1}*.nupkg %{buildroot}/nuget \
 %{nil}
-