From 8d426f0be535fd1d6c4e16de416cd5d5a215e171 Mon Sep 17 00:00:00 2001 From: WonYoung Choi Date: Fri, 7 Apr 2017 07:18:52 +0900 Subject: [PATCH] Use dotnet build macros Change-Id: I96126964f9064e52dbf90c27dedb2911f6b29713 Signed-off-by: WonYoung Choi --- packaging/csapi-geofence.spec | 51 ++++------------------ .../Tizen.Location.Geofence.nuspec | 4 +- .../Tizen.Location.Geofence.project.json | 10 +---- 3 files changed, 12 insertions(+), 53 deletions(-) diff --git a/packaging/csapi-geofence.spec b/packaging/csapi-geofence.spec index e11797e..2f999b9 100755 --- a/packaging/csapi-geofence.spec +++ b/packaging/csapi-geofence.spec @@ -1,14 +1,6 @@ -%{!?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-geofence Summary: Tizen location geofence API for C# -Version: 1.0.2 +Version: 1.0.3 Release: 1 Group: Development/Libraries License: Apache-2.0 @@ -19,59 +11,34 @@ Source1: %{name}.manifest AutoReqProv: no ExcludeArch: aarch64 -BuildRequires: mono-compiler -BuildRequires: mono-devel - BuildRequires: dotnet-build-tools # NuGet for Dependencies BuildRequires: csapi-tizen-nuget +%define Assemblies Tizen.Location.Geofence %description -geofence C# API for Tizen +%{summary} + +%dotnet_import_sub_packages %prep %setup -q cp %{SOURCE1} . -%define Assemblies Tizen.Location.Geofence - %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} diff --git a/src/Tizen.Location.Geofence/Tizen.Location.Geofence.nuspec b/src/Tizen.Location.Geofence/Tizen.Location.Geofence.nuspec index 6fbf02b..364924f 100644 --- a/src/Tizen.Location.Geofence/Tizen.Location.Geofence.nuspec +++ b/src/Tizen.Location.Geofence/Tizen.Location.Geofence.nuspec @@ -11,10 +11,10 @@ © Samsung Electronics Co., Ltd All Rights Reserved Geofence management APIs for Tizen.Location - + - + diff --git a/src/Tizen.Location.Geofence/Tizen.Location.Geofence.project.json b/src/Tizen.Location.Geofence/Tizen.Location.Geofence.project.json index 27943bf..84d7a30 100644 --- a/src/Tizen.Location.Geofence/Tizen.Location.Geofence.project.json +++ b/src/Tizen.Location.Geofence/Tizen.Location.Geofence.project.json @@ -1,15 +1,7 @@ { - "buildOptions": { - "debugType": "portable", - "platform": "AnyCPU", - "preserveCompilationContext": true - }, "dependencies": { "NETStandard.Library": "1.6.0", - "Tizen": "1.0.0" - }, - "runtimes": { - "win": {} + "Tizen": "1.0.3" }, "frameworks": { "netstandard1.6": {} -- 2.7.4