update spec file 07/113507/1 accepted/tizen/mobile/20170208.103446 submit/tizen/20170208.035914
authorKyeonghun Lee <kh9090.lee@samsung.com>
Wed, 8 Feb 2017 03:50:45 +0000 (12:50 +0900)
committerKyeonghun Lee <kh9090.lee@samsung.com>
Wed, 8 Feb 2017 03:50:45 +0000 (12:50 +0900)
Change-Id: I837e4a5a555efdb456598a52fc321f5cea48b3de
Signed-off-by: Kyeonghun Lee <kh9090.lee@samsung.com>
packaging/csapi-messaging.spec

index 965d2de..175376b 100644 (file)
@@ -1,12 +1,3 @@
-%{!?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
-%else
-%define BUILDCONF Release
-%endif
-
 Name:       csapi-messaging
 Summary:    Tizen Messaging API for C#
 Version:    1.0.0
@@ -18,61 +9,36 @@ Source0:    %{name}-%{version}.tar.gz
 Source1:    %{name}.manifest
 
 AutoReqProv: no
-
-BuildRequires: mono-compiler
-BuildRequires: mono-devel
+ExcludeArch: aarch64 %ix86
 
 BuildRequires: dotnet-build-tools
 
 # C# API Requires
 BuildRequires: csapi-tizen-nuget
 
+%define Assemblies Tizen.Messaging
+
 %description
-Tizen Messaging API for C#
+%{summary}
+
+%dotnet_import_sub_packages
 
 %prep
 %setup -q
 cp %{SOURCE1} .
 
-%define Assemblies Tizen.Messaging
-
 %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}