From: WonYoung Choi Date: Tue, 4 Oct 2016 14:31:29 +0000 (+0900) Subject: Use nuget restore to solve dependencies X-Git-Tag: submit/trunk/20170823.075128~99^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=53eb5441b37225ed49e2b92114c7d9c4d028992e;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Use nuget restore to solve dependencies Change-Id: If5f44d40ef021d5af34a4d0b9506297fecc9771d Signed-off-by: WonYoung Choi --- diff --git a/packaging/csapi-media-key.spec b/packaging/csapi-media-key.spec index 89dc25b..3913413 100755 --- a/packaging/csapi-media-key.spec +++ b/packaging/csapi-media-key.spec @@ -1,5 +1,4 @@ %{!?dotnet_assembly_path: %define dotnet_assembly_path /opt/usr/share/dotnet.tizen/framework} -%{!?dotnet_core_path: %define dotnet_core_path %{_datadir}/tizen.net/ref} %if 0%{?tizen_build_devel_mode} %define BUILDCONF Debug @@ -9,7 +8,7 @@ Name: csapi-media-key Summary: Tizen Media Key API for C# -Version: 1.0.0 +Version: 1.0.1 Release: 1 Group: Development/Libraries License: Apache-2.0 @@ -17,20 +16,13 @@ URL: https://www.tizen.org Source0: %{name}-%{version}.tar.gz Source1: %{name}.manifest -# Mono BuildRequires: mono-compiler BuildRequires: mono-devel -# .NETCore -%if 0%{?_with_corefx} -AutoReqProv: no -BuildRequires: corefx-managed-32b-ref -%endif - BuildRequires: dotnet-build-tools # C# API Requries -BuildRequires: csapi-tizen-devel +BuildRequires: csapi-tizen-nuget %description Tizen Media Key API for C# @@ -42,42 +34,26 @@ cp %{SOURCE1} . %define Assemblies Tizen.System.MediaKey %build -# Build for Net45 for ASM in %{Assemblies}; do -if [ -e $ASM/$ASM.Net45.csproj ]; then - xbuild $ASM/$ASM.Net45.csproj \ - /p:Configuration=%{BUILDCONF} \ - /p:DotnetAssemblyPath=%{dotnet_assembly_path}/devel/net45 \ - /p:OutputPath=bin/net45 -fi - -# Build for Dotnet -%if 0%{?_with_corefx} -if [ -e $ASM/$ASM.csproj ]; then - xbuild $ASM/$ASM.csproj \ - /p:Configuration=%{BUILDCONF} \ - /p:DotnetAssemblyPath=%{dotnet_assembly_path}/devel/netstandard1.6 \ - /p:CoreFxPath=%{dotnet_core_path} \ - /p:OutputPath=bin/netstandard1.6 -fi -%endif - -# Make NuGet package -dotnet-gbs pack $ASM/$ASM.nuspec --PackageVersion=%{version} --PackageFiles=$ASM/bin - +# NuGet Restore +find $ASM/*.project.json -exec nuget restore {} \; +# Build +find $ASM/*.csproj -exec xbuild {} /p:Configuration=%{BUILDCONF} \; +# NuGet Pack +nuget pack $ASM/$ASM.nuspec -Version %{version} -Properties Configuration=%{BUILDCONF} done %install -mkdir -p %{buildroot}%{dotnet_assembly_path}/devel +# Runtime Binary +mkdir -p %{buildroot}%{dotnet_assembly_path} for ASM in %{Assemblies}; do - cp -fr $ASM/bin/* %{buildroot}%{dotnet_assembly_path}/devel %if 0%{?_with_corefx} - install -p -m 644 $ASM/bin/netstandard1.6/$ASM.dll %{buildroot}%{dotnet_assembly_path} + install -p -m 644 $ASM/bin/%{BUILDCONF}/$ASM.dll %{buildroot}%{dotnet_assembly_path} %else - install -p -m 644 $ASM/bin/net45/$ASM.dll %{buildroot}%{dotnet_assembly_path} + install -p -m 644 $ASM/bin/%{BUILDCONF}/Net45/$ASM.dll %{buildroot}%{dotnet_assembly_path} %endif done - +# NuGet mkdir -p %{buildroot}/nuget install -p -m 644 *.nupkg %{buildroot}/nuget @@ -86,22 +62,9 @@ install -p -m 644 *.nupkg %{buildroot}/nuget %license LICENSE %attr(644,root,root) %{dotnet_assembly_path}/*.dll -%package devel -Summary: Development package for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -AutoReqProv: no - -%description devel -Development package for %{name} - -%files devel -%{dotnet_assembly_path}/devel/* - %package nuget Summary: NuGet package for %{name} Group: Development/Libraries -Requires: %{name} = %{version}-%{release} %description nuget NuGet package for %{name} diff --git a/src/Tizen.System.MediaKey/Tizen.System.MediaKey.Net45.csproj b/src/Tizen.System.MediaKey/Tizen.System.MediaKey.Net45.csproj index 3b6d6f2..62c6c59 100644 --- a/src/Tizen.System.MediaKey/Tizen.System.MediaKey.Net45.csproj +++ b/src/Tizen.System.MediaKey/Tizen.System.MediaKey.Net45.csproj @@ -3,7 +3,7 @@ Debug AnyCPU - {07A0D110-3092-4A09-BF85-95555C7E7DFF} + {DA0F2227-9343-443E-BF51-744ED9422C2E} Library Properties @@ -64,13 +64,12 @@ - - \ No newline at end of file diff --git a/src/Tizen.System.MediaKey/Tizen.System.MediaKey.Net45.project.json b/src/Tizen.System.MediaKey/Tizen.System.MediaKey.Net45.project.json index d9af4f0..ab1a0ee 100644 --- a/src/Tizen.System.MediaKey/Tizen.System.MediaKey.Net45.project.json +++ b/src/Tizen.System.MediaKey/Tizen.System.MediaKey.Net45.project.json @@ -1,6 +1,6 @@ { "dependencies": { - "Tizen": "1.0.0" + "Tizen": "1.0.1" }, "frameworks": { "net45": {} diff --git a/src/Tizen.System.MediaKey/Tizen.System.MediaKey.csproj b/src/Tizen.System.MediaKey/Tizen.System.MediaKey.csproj index 2a822fe..8905b20 100644 --- a/src/Tizen.System.MediaKey/Tizen.System.MediaKey.csproj +++ b/src/Tizen.System.MediaKey/Tizen.System.MediaKey.csproj @@ -3,7 +3,7 @@ Debug AnyCPU - {A667ADA4-E7DB-4E45-9D31-491024750EE1} + {C620873C-5722-4439-B570-45A83AF8A405} Library Properties @@ -13,8 +13,8 @@ .NETStandard - v1.6 - .NETStandard,Version=v1.6 + v1.3 + .NETStandard,Version=v1.3 false true $(NoWarn);1701;1702 @@ -63,22 +63,21 @@ - - - - <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory) <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory) diff --git a/src/Tizen.System.MediaKey/Tizen.System.MediaKey.nuspec b/src/Tizen.System.MediaKey/Tizen.System.MediaKey.nuspec index 8ae5f76..413ac11 100644 --- a/src/Tizen.System.MediaKey/Tizen.System.MediaKey.nuspec +++ b/src/Tizen.System.MediaKey/Tizen.System.MediaKey.nuspec @@ -6,7 +6,11 @@ Tizen Developers MediaKey API for Tizen.Net - + + + + + diff --git a/src/Tizen.System.MediaKey/Tizen.System.MediaKey.project.json b/src/Tizen.System.MediaKey/Tizen.System.MediaKey.project.json index beb9e15..db7436c 100644 --- a/src/Tizen.System.MediaKey/Tizen.System.MediaKey.project.json +++ b/src/Tizen.System.MediaKey/Tizen.System.MediaKey.project.json @@ -1,12 +1,9 @@ { "dependencies": { "NETStandard.Library": "1.6.0", - "Tizen": "1.0.0" + "Tizen": "1.0.1" }, "frameworks": { - "netstandard1.6": {} - }, - "runtimes": { - "win": {} + "netstandard1.3": {} } }