From: WonYoung Choi Date: Mon, 19 Dec 2016 10:19:21 +0000 (+0900) Subject: Apply dotnet RPM macros X-Git-Tag: submit/tizen_mobile/20161222.061105^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c8a538b19cbf4d9cc8707db6a490d575d94f1b02;p=platform%2Fcore%2Fcsapi%2Fsensor.git Apply dotnet RPM macros Change-Id: Ie16137d2490c01194ef5f0ccd18a658994636fde Signed-off-by: WonYoung Choi --- diff --git a/packaging/csapi-sensor.spec b/packaging/csapi-sensor.spec index 85ce397..1462b1a 100644 --- a/packaging/csapi-sensor.spec +++ b/packaging/csapi-sensor.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-sensor Summary: Tizen Sensor API for C# Version: 1.0.4 @@ -17,62 +9,37 @@ 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 -# C# API Requries +# C# API Requires BuildRequires: csapi-tizen-nuget BuildRequires: csapi-system-nuget +%define Assemblies Tizen.Sensor + %description -Tizen Sensor API for C# +%{summary} + +%dotnet_import_sub_packages %prep %setup -q cp %{SOURCE1} . -%define Assemblies Tizen.Sensor - %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