From b9adeddcb52767e44e500329ad2edd31103f3176 Mon Sep 17 00:00:00 2001 From: WonYoung Choi Date: Tue, 4 Oct 2016 22:04:39 +0900 Subject: [PATCH] Use nuget restore to solve dependencies Change-Id: Id93bafc70c8c5c1a18fc1bd60b93d1c53da30fdd --- packaging/csapi-mime-type.spec | 63 +---- .../CoreFx.References.targets | 265 --------------------- .../Tizen.Content.MimeType.Net45.csproj | 13 +- .../Tizen.Content.MimeType.Net45.project.json | 2 +- .../Tizen.Content.MimeType.csproj | 26 +- .../Tizen.Content.MimeType.nuspec | 6 +- .../Tizen.Content.MimeType.project.json | 9 +- 7 files changed, 41 insertions(+), 343 deletions(-) delete mode 100644 src/Tizen.Content.MimeType/CoreFx.References.targets diff --git a/packaging/csapi-mime-type.spec b/packaging/csapi-mime-type.spec index 51797cb..591a3e8 100755 --- a/packaging/csapi-mime-type.spec +++ b/packaging/csapi-mime-type.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-mime-type Summary: Tizen MimeType 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 MimeType API for C# @@ -42,42 +34,26 @@ cp %{SOURCE1} . %define Assemblies Tizen.Content.MimeType %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.Content.MimeType/CoreFx.References.targets b/src/Tizen.Content.MimeType/CoreFx.References.targets deleted file mode 100644 index dab29ec..0000000 --- a/src/Tizen.Content.MimeType/CoreFx.References.targets +++ /dev/null @@ -1,265 +0,0 @@ - - - - - False - $(CoreFxPath)/Microsoft.Win32.Primitives.dll - - - False - $(CoreFxPath)/System.AppContext.dll - - - False - $(CoreFxPath)/System.Collections.Concurrent.dll - - - False - $(CoreFxPath)/System.Collections.dll - - - False - $(CoreFxPath)/System.ComponentModel.Annotations.dll - - - False - $(CoreFxPath)/System.ComponentModel.dll - - - False - $(CoreFxPath)/System.Console.dll - - - False - $(CoreFxPath)/System.Diagnostics.Debug.dll - - - False - $(CoreFxPath)/System.Diagnostics.Process.dll - - - False - $(CoreFxPath)/System.Diagnostics.Tools.dll - - - False - $(CoreFxPath)/System.Diagnostics.TraceSource.dll - - - False - $(CoreFxPath)/System.Diagnostics.Tracing.dll - - - False - $(CoreFxPath)/System.Dynamic.Runtime.dll - - - False - $(CoreFxPath)/System.Globalization.Calendars.dll - - - False - $(CoreFxPath)/System.Globalization.dll - - - False - $(CoreFxPath)/System.Globalization.Extensions.dll - - - False - $(CoreFxPath)/System.IO.Compression.dll - - - False - $(CoreFxPath)/System.IO.Compression.ZipFile.dll - - - False - $(CoreFxPath)/System.IO.dll - - - False - $(CoreFxPath)/System.IO.FileSystem.dll - - - False - $(CoreFxPath)/System.IO.FileSystem.Primitives.dll - - - False - $(CoreFxPath)/System.IO.FileSystem.Watcher.dll - - - False - $(CoreFxPath)/System.IO.MemoryMappedFiles.dll - - - False - $(CoreFxPath)/System.IO.UnmanagedMemoryStream.dll - - - False - $(CoreFxPath)/System.Linq.dll - - - False - $(CoreFxPath)/System.Linq.Expressions.dll - - - False - $(CoreFxPath)/System.Linq.Parallel.dll - - - False - $(CoreFxPath)/System.Linq.Queryable.dll - - - False - $(CoreFxPath)/System.Net.Http.dll - - - False - $(CoreFxPath)/System.Net.NameResolution.dll - - - False - $(CoreFxPath)/System.Net.Primitives.dll - - - False - $(CoreFxPath)/System.Net.Requests.dll - - - False - $(CoreFxPath)/System.Net.Security.dll - - - False - $(CoreFxPath)/System.Net.Sockets.dll - - - False - $(CoreFxPath)/System.Net.WebHeaderCollection.dll - - - False - $(CoreFxPath)/System.Numerics.Vectors.dll - - - False - $(CoreFxPath)/System.ObjectModel.dll - - - False - $(CoreFxPath)/System.Reflection.DispatchProxy.dll - - - False - $(CoreFxPath)/System.Reflection.dll - - - False - $(CoreFxPath)/System.Reflection.Extensions.dll - - - False - $(CoreFxPath)/System.Reflection.Primitives.dll - - - False - $(CoreFxPath)/System.Reflection.TypeExtensions.dll - - - False - $(CoreFxPath)/System.Resources.ResourceManager.dll - - - False - $(CoreFxPath)/System.Runtime.dll - - - False - $(CoreFxPath)/System.Runtime.Extensions.dll - - - False - $(CoreFxPath)/System.Runtime.Handles.dll - - - False - $(CoreFxPath)/System.Runtime.InteropServices.dll - - - False - $(CoreFxPath)/System.Runtime.InteropServices.RuntimeInformation.dll - - - False - $(CoreFxPath)/System.Runtime.Loader.dll - - - False - $(CoreFxPath)/System.Runtime.Numerics.dll - - - False - $(CoreFxPath)/System.Security.Cryptography.Algorithms.dll - - - False - $(CoreFxPath)/System.Security.Cryptography.Encoding.dll - - - False - $(CoreFxPath)/System.Security.Cryptography.Primitives.dll - - - False - $(CoreFxPath)/System.Security.Cryptography.X509Certificates.dll - - - False - $(CoreFxPath)/System.Text.Encoding.dll - - - False - $(CoreFxPath)/System.Text.Encoding.Extensions.dll - - - False - $(CoreFxPath)/System.Text.RegularExpressions.dll - - - False - $(CoreFxPath)/System.Threading.dll - - - False - $(CoreFxPath)/System.Threading.Tasks.dll - - - False - $(CoreFxPath)/System.Threading.Tasks.Parallel.dll - - - False - $(CoreFxPath)/System.Threading.Thread.dll - - - False - $(CoreFxPath)/System.Threading.ThreadPool.dll - - - False - $(CoreFxPath)/System.Threading.Timer.dll - - - False - $(CoreFxPath)/System.Xml.ReaderWriter.dll - - - False - $(CoreFxPath)/System.Xml.XDocument.dll - - - \ No newline at end of file diff --git a/src/Tizen.Content.MimeType/Tizen.Content.MimeType.Net45.csproj b/src/Tizen.Content.MimeType/Tizen.Content.MimeType.Net45.csproj index 354de56..d031fa6 100644 --- a/src/Tizen.Content.MimeType/Tizen.Content.MimeType.Net45.csproj +++ b/src/Tizen.Content.MimeType/Tizen.Content.MimeType.Net45.csproj @@ -60,13 +60,12 @@ - - \ No newline at end of file diff --git a/src/Tizen.Content.MimeType/Tizen.Content.MimeType.Net45.project.json b/src/Tizen.Content.MimeType/Tizen.Content.MimeType.Net45.project.json index d9af4f0..ab1a0ee 100644 --- a/src/Tizen.Content.MimeType/Tizen.Content.MimeType.Net45.project.json +++ b/src/Tizen.Content.MimeType/Tizen.Content.MimeType.Net45.project.json @@ -1,6 +1,6 @@ { "dependencies": { - "Tizen": "1.0.0" + "Tizen": "1.0.1" }, "frameworks": { "net45": {} diff --git a/src/Tizen.Content.MimeType/Tizen.Content.MimeType.csproj b/src/Tizen.Content.MimeType/Tizen.Content.MimeType.csproj index 06f62b6..32fb49a 100644 --- a/src/Tizen.Content.MimeType/Tizen.Content.MimeType.csproj +++ b/src/Tizen.Content.MimeType/Tizen.Content.MimeType.csproj @@ -12,8 +12,8 @@ .NETStandard - v1.6 - .NETStandard,Version=v1.6 + v1.3 + .NETStandard,Version=v1.3 false true $(NoWarn);1701;1702 @@ -59,20 +59,20 @@ - - - <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory) <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory) diff --git a/src/Tizen.Content.MimeType/Tizen.Content.MimeType.nuspec b/src/Tizen.Content.MimeType/Tizen.Content.MimeType.nuspec index 48511f4..f8ab4bc 100644 --- a/src/Tizen.Content.MimeType/Tizen.Content.MimeType.nuspec +++ b/src/Tizen.Content.MimeType/Tizen.Content.MimeType.nuspec @@ -6,7 +6,11 @@ Tizen Developers MimeType API for Tizen.Net - + + + + + diff --git a/src/Tizen.Content.MimeType/Tizen.Content.MimeType.project.json b/src/Tizen.Content.MimeType/Tizen.Content.MimeType.project.json index beb9e15..bcfee92 100644 --- a/src/Tizen.Content.MimeType/Tizen.Content.MimeType.project.json +++ b/src/Tizen.Content.MimeType/Tizen.Content.MimeType.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": {} } -} +} \ No newline at end of file -- 2.7.4