From: WonYoung Choi Date: Mon, 19 Dec 2016 05:36:01 +0000 (+0900) Subject: fix macros.dotnet-build-tools X-Git-Tag: submit/tizen_mobile/20161219.054251~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a9e3c72b351e6cfab2c2fd316cb6289a8fa272a;p=platform%2Fcore%2Fdotnet%2Fbuild-tools.git fix macros.dotnet-build-tools Change-Id: I712be288b57409a5c8dedbdf79ae3e37b05a331c --- diff --git a/packaging/dotnet-build-tools.spec b/packaging/dotnet-build-tools.spec index 54646430..c9eae0ba 100644 --- a/packaging/dotnet-build-tools.spec +++ b/packaging/dotnet-build-tools.spec @@ -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 diff --git a/packaging/macros.dotnet-build-tools b/packaging/macros.dotnet-build-tools index 4db10615..1712f9e1 100644 --- a/packaging/macros.dotnet-build-tools +++ b/packaging/macros.dotnet-build-tools @@ -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} -