From a4cd6cad6ab2a15f87d8a40629e5d815582e4128 Mon Sep 17 00:00:00 2001 From: Abhijit RD Date: Tue, 5 Jul 2016 10:26:57 +0530 Subject: [PATCH] Updating project to use xbuild Change-Id: Ib5a54b9f8aa97bbe3a79bd7bd9a964352175e41f Signed-off-by: Abhijit RD --- packaging/csapi-location.spec | 33 +----- src/Tizen.Location/Tizen.Location.csproj | 172 +++++++++++++++++-------------- 2 files changed, 99 insertions(+), 106 deletions(-) diff --git a/packaging/csapi-location.spec b/packaging/csapi-location.spec index a94a0c4..baae27a 100755 --- a/packaging/csapi-location.spec +++ b/packaging/csapi-location.spec @@ -1,5 +1,4 @@ -%define dllpath %{_libdir}/mono/tizen -%define dllname Tizen.Location.dll +%define BUILDCONF Debug Name: csapi-location Summary: Tizen Location API's for C# @@ -12,24 +11,13 @@ Source0: %{name}-%{version}.tar.gz Source1: %{name}.manifest Source2: %{name}.pc.in -# TODO: replace mono-compiler, mono-devel to mcs, mono-shlib-cop BuildRequires: mono-compiler BuildRequires: mono-devel -# TODO: replace mono-core to gacutil. -# mono-core should provide the symbol 'gacutil' -Requires(post): mono-core -Requires(postun): mono-core - -# P/Invoke Dependencies BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(csapi-tizen) -# P/Invoke Runtime Dependencies -# TODO: It should be removed after fix tizen-rpm-config Requires: glib-2.0 BuildRequires: pkgconfig(capi-location-manager) -# DLL Dependencies -#BuildRequires: ... %description Tizen API for C# @@ -49,22 +37,10 @@ cp %{SOURCE1} . %build # build dll -mcs -target:library -out:%{dllname} -keyfile:Tizen.Location/Tizen.Location.snk -pkg:'csapi-tizen'\ - Tizen.Location/Properties/AssemblyInfo.cs \ - Tizen.Location/Interop/*.cs \ - Tizen.Location/Tizen.Location/*.cs - -# check p/invoke -if [ -x %{dllname} ]; then - RET=`mono-shlib-cop %{dllname}`; \ - CNT=`echo $RET | grep -E "^error:" | wc -l`; \ - if [ $CNT -gt 0 ]; then exit 1; fi -fi +xbuild Tizen.Location/Tizen.Location.csproj /p:Configuration=%{BUILDCONF} %install -# copy dll -mkdir -p %{buildroot}%{dllpath} -install -p -m 644 %{dllname} %{buildroot}%{dllpath} +gacutil -i Tizen.Location/bin/%{BUILDCONF}/Tizen.Location.dll -root "%{buildroot}%{_libdir}" -package tizen # generate pkgconfig mkdir -p %{buildroot}%{_libdir}/pkgconfig @@ -77,7 +53,8 @@ sed -e "s#@version@#%{version}#g" \ gacutil -i %{dllpath}/%{dllname} %files -%{dllpath}/%{dllname} +%manifest %{name}.manifest +%{_libdir}/mono/ %files devel %{_libdir}/pkgconfig/%{name}.pc diff --git a/src/Tizen.Location/Tizen.Location.csproj b/src/Tizen.Location/Tizen.Location.csproj index db5f93f..d75d390 100644 --- a/src/Tizen.Location/Tizen.Location.csproj +++ b/src/Tizen.Location/Tizen.Location.csproj @@ -1,85 +1,101 @@ - - - - - Debug - AnyCPU - {EADC6F38-9C99-4294-8F65-63D0E73012E8} - Library - Properties - Tizen.Location - Tizen.Location - v4.5 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - true - - - Tizen.Location.snk - - - - - - - - - - - ..\..\..\..\uifw\tizen\Tizen\bin\Debug\Tizen.dll - - - ..\..\..\..\uifw\tizen\Tizen.Internals\bin\Debug\Tizen.Internals.dll - - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug + AnyCPU + {EADC6F38-9C99-4294-8F65-63D0E73012E8} + Library + Properties + Tizen.Location + Tizen.Location + v4.5 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + true + + + Tizen.Location.snk + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + csapi-tizen + ..\..\tizen\Tizen\obj\Debug\Tizen.dll + + + csapi-tizen + ..\..\tizen\Tizen.Internals\bin\Debug\Tizen.Internals.dll + + + + + {B9AA1CB2-F72D-4A30-A33B-A20C850A38A0} + Tizen.Internals + True + + + {7659CA59-410D-41A1-9841-586E88BC78C9} + Tizen + True + + + + --> \ No newline at end of file -- 2.7.4