From abb4f1833bc970e7aaf6902787398e048dede107 Mon Sep 17 00:00:00 2001 From: WonYoung Choi Date: Fri, 6 Jan 2017 10:09:00 +0900 Subject: [PATCH] Apply %dotnet rpm macros Change-Id: Ib9cf095ef710a65e6f5e219e83d0adab830edf8f --- packaging/xamarin-forms-tizen.spec | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/packaging/xamarin-forms-tizen.spec b/packaging/xamarin-forms-tizen.spec index 7c44bc1..ca3fca4 100644 --- a/packaging/xamarin-forms-tizen.spec +++ b/packaging/xamarin-forms-tizen.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 - %define XF_VERSION 2.3.3.175 ## %define XF_PRETAG pre3 @@ -45,29 +37,28 @@ BuildRequires: elm-sharp-nuget Allows one to use portable controls subsets that are mapped to native controls of Android, iOS, Windows Phone, and Tizen. +%dotnet_import_sub_packages + %prep %setup -q cp %{SOURCE1} . %build # Restore NuGet Dependencies -find . -name *.Tizen.project.json -print0 | xargs -n1 -0 nuget restore +%dotnet_restore Xamarin.Forms.Platform.Tizen +%dotnet_restore Xamarin.Forms.Maps.Tizen # Build -xbuild Xamarin.Forms.Tizen.sln \ - /p:Configuration=%{BUILDCONF} \ - /p:PackageSources=/nuget +%dotnet_build Xamarin.Forms.Tizen.sln /p:PackageSources=/nuget # Create NuGet Packages -nuget pack .nuspec/Xamarin.Forms.Platform.Tizen.nuspec \ - -BasePath ./.nuspec -Version %{NUPKG_VERSION} \ - -Properties "Configuration=%{BUILDCONF}" +%dotnet_pack .nuspec/Xamarin.Forms.Platform.Tizen.nuspec %{NUPKG_VERSION} "-BasePath ./.nuspec" %install function install_asm() { mkdir -p %{buildroot}%{dotnet_assembly_path} - install -p -m 644 $1/bin/%{BUILDCONF}/$1.dll %{buildroot}%{dotnet_assembly_path} + install -p -m 644 $1/bin/%{_dotnet_build_conf}/$1.dll %{buildroot}%{dotnet_assembly_path} } install_asm Xamarin.Forms.Core @@ -81,15 +72,5 @@ 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 -Requires: %{name} = %{version}-%{release} - -%description nuget -NuGet package for %{name} +%attr(644,root,root) %{dotnet_assembly_files} -%files nuget -/nuget/*.nupkg -- 2.7.4