Apply dotnet RPM macros 00/105700/2 accepted/tizen/common/20170111.133630 accepted/tizen/common/20170111.171343 accepted/tizen/ivi/20170117.054811 accepted/tizen/mobile/20161222.020546 accepted/tizen/tv/20161229.113250 submit/tizen_common/20161229.045021 submit/tizen_common/20170111.164442 submit/tizen_ivi/20170116.045729 submit/tizen_mobile/20161221.081015 submit/tizen_tv/20161229.044941 submit/tizen_unified/20170308.100407
authorWonYoung Choi <wy80.choi@samsung.com>
Mon, 19 Dec 2016 09:43:06 +0000 (18:43 +0900)
committerWonYoung Choi <wy80.choi@samsung.com>
Mon, 19 Dec 2016 11:56:45 +0000 (20:56 +0900)
Change-Id: Ia611d95f49d22d6acb727a08ba98a2906e0870f3
Signed-off-by: WonYoung Choi <wy80.choi@samsung.com>
packaging/csapi-download.spec

index 49b428e..8b903dd 100755 (executable)
@@ -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-download
 Summary:    Tizen Download API for C#
 Version:    1.0.2
@@ -17,10 +9,7 @@ Source0:    %{name}-%{version}.tar.gz
 Source1:    %{name}.manifest
 
 AutoReqProv: no
-ExcludeArch: %{ix86} aarch64
-
-BuildRequires: mono-compiler
-BuildRequires: mono-devel
+ExcludeArch: aarch64 %ix86
 
 BuildRequires: dotnet-build-tools
 
@@ -28,50 +17,29 @@ BuildRequires: dotnet-build-tools
 BuildRequires: csapi-tizen-nuget
 BuildRequires: csapi-application-nuget
 
+%define Assemblies Tizen.Content.Download
+
 %description
-Tizen Download API for C#
+%{summary}
+
+%dotnet_import_sub_packages
 
 %prep
 %setup -q
 cp %{SOURCE1} .
 
-%define Assemblies Tizen.Content.Download
-
 %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