From 9074d04c2984e1152c5c3f80c56326822d78d421 Mon Sep 17 00:00:00 2001 From: WonYoung Choi Date: Mon, 19 Dec 2016 19:10:49 +0900 Subject: [PATCH] Apply dotnet RPM macros Change-Id: I9e073078be4b10f58114e3494707d7f8a562de5a Signed-off-by: WonYoung Choi --- packaging/csapi-account-oauth2.spec | 56 +++++----------------- .../Tizen.Account.OAuth2.project.json | 5 +- 2 files changed, 12 insertions(+), 49 deletions(-) diff --git a/packaging/csapi-account-oauth2.spec b/packaging/csapi-account-oauth2.spec index f064227..b9244a4 100644 --- a/packaging/csapi-account-oauth2.spec +++ b/packaging/csapi-account-oauth2.spec @@ -1,11 +1,3 @@ -%{!?dotnet_assembly_path: %define dotnet_assembly_path /opt/usr/share/dotnet.tizen/framework} - -%if 0%{?tizen_build_devel_mode} -%define BUILDCONF Debug -%else -%define BUILDCONF Release -%endif - Name: csapi-account-oauth2 Summary: OAuth2.0 C# API for Tizen Version: 1.0.3 @@ -16,62 +8,36 @@ URL: https://www.tizen.org Source0: %{name}-%{version}.tar.gz Source1: %{name}.manifest -AutoReqProv: no -ExcludeArch: %{ix86} aarch64 - -BuildRequires: mono-compiler -BuildRequires: mono-devel - BuildRequires: dotnet-build-tools -# NuGet for Dependencies +# C# API Requires BuildRequires: csapi-tizen-nuget +%define Assemblies Tizen.Account.OAuth2 + +%dotnet_import_common %description -OAuth2.0 C# API for Tizen +%{summary} + +%dotnet_import_sub_packages %prep %setup -q cp %{SOURCE1} . -%define Assemblies Tizen.Account.OAuth2 - %build for ASM in %{Assemblies}; do -# 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} +%dotnet_build $ASM +%dotnet_pack $ASM/$ASM.nuspec %{version} done %install -# Runtime Binary -mkdir -p %{buildroot}%{dotnet_assembly_path} for ASM in %{Assemblies}; do -%if 0%{?_with_corefx} - install -p -m 644 $ASM/bin/%{BUILDCONF}/$ASM.dll %{buildroot}%{dotnet_assembly_path} -%else - install -p -m 644 $ASM/bin/%{BUILDCONF}/Net45/$ASM.dll %{buildroot}%{dotnet_assembly_path} -%endif +%dotnet_install $ASM done -# NuGet -mkdir -p %{buildroot}/nuget -install -p -m 644 *.nupkg %{buildroot}/nuget %files %manifest %{name}.manifest %license LICENSE -%attr(644,root,root) %{dotnet_assembly_path}/*.dll - -%package nuget -Summary: NuGet package for %{name} -Group: Development/Libraries - -%description nuget -NuGet package for %{name} - -%files nuget -/nuget/*.nupkg +%attr(644,root,root) %{dotnet_assembly_files} \ No newline at end of file diff --git a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2.project.json b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2.project.json index aef135d..1797ae7 100644 --- a/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2.project.json +++ b/src/Tizen.Account.OAuth2/Tizen.Account.OAuth2.project.json @@ -8,10 +8,7 @@ "NETStandard.Library": "1.6.0", "Tizen": "1.0.1" }, - "runtimes": { - "win": {} - }, "frameworks": { "netstandard1.6": {} } -} \ No newline at end of file +} -- 2.7.4