Replacing make with xbuild
authorJyothi Kumar Sambolu <s.jyothi@samsung.com>
Mon, 4 Jul 2016 13:08:40 +0000 (18:38 +0530)
committerJyothi Kumar Sambolu <s.jyothi@samsung.com>
Mon, 4 Jul 2016 13:08:40 +0000 (18:38 +0530)
Change-Id: I568161e82850ad470d5353dce73a089e6c6c9ce5
Signed-off-by: Jyothi Kumar Sambolu <s.jyothi@samsung.com>
Tizen.System.Sensor/Tizen.System.Sensor.csproj
Tizen.System.Sensor/Tizen.System.Sensor/Sensor.cs
packaging/csapi-system.sensor.spec

index 4d15d61..cd3eb31 100644 (file)
@@ -3,7 +3,7 @@
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
-    <ProductVersion>10.0.0</ProductVersion>\r
+    <ProductVersion>8.0.30703</ProductVersion>\r
     <SchemaVersion>2.0</SchemaVersion>\r
     <ProjectGuid>{CB655C6A-F73B-448E-913C-CA4DCBC5E401}</ProjectGuid>\r
     <OutputType>Library</OutputType>\r
   </PropertyGroup>\r
   <ItemGroup>\r
     <Reference Include="System" />\r
+    <Reference Include="Tizen.Internals">\r
+      <HintPath>..\..\tizen\Tizen.Internals\bin\Debug\Tizen.Internals.dll</HintPath>\r
+    </Reference>\r
+    <Reference Include="Tizen">\r
+      <HintPath>..\..\tizen\Tizen\bin\Debug\Tizen.dll</HintPath>\r
+    </Reference>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <Compile Include="Properties\AssemblyInfo.cs" />\r
   </ItemGroup>\r
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />\r
   <ItemGroup>\r
-    <ProjectReference Include="..\..\tizen\Tizen.Internals\Tizen.Internals.csproj">\r
-      <Project>{B9AA1CB2-F72D-4A30-A33B-A20C850A38A0}</Project>\r
-      <Name>Tizen.Internals</Name>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\tizen\Tizen\Tizen.csproj">\r
-      <Project>{7659ca59-410d-41a1-9841-586e88bc78c9}</Project>\r
-      <Name>Tizen</Name>\r
-    </ProjectReference>\r
-  </ItemGroup>\r
-  <ItemGroup>\r
     <None Include="Tizen.System.Sensor.snk" />\r
   </ItemGroup>\r
   <ProjectExtensions>\r
       </Properties>\r
     </MonoDevelop>\r
   </ProjectExtensions>\r
-</Project>
\ No newline at end of file
+</Project>\r
index 33bc4a3..4b64eb2 100644 (file)
@@ -233,7 +233,7 @@ namespace Tizen.System.Sensor
             }
         }
 
-        protected IntPtr ListenerHandle
+        internal IntPtr ListenerHandle
         {
             get
             {
index 99e334d..0bf68ac 100644 (file)
@@ -1,3 +1,5 @@
+%define BUILDCONF Debug
+
 %define dllpath %{_libdir}/mono/tizen
 %define dllname Tizen.System.dll
 
@@ -52,12 +54,8 @@ cp %{SOURCE1} .
 
 %build
 # build dll
-mcs -target:library -out:%{dllname} -keyfile:Tizen.System.Sensor/Tizen.System.Sensor.snk -pkg:'csapi-tizen'\
-  Tizen.System.Sensor/Properties/AssemblyInfo.cs \
-  Tizen.System.Sensor/Tizen.System.Sensor/Plugins/*.cs \
-  Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/*.cs \
-  Tizen.System.Sensor/Tizen.System.Sensor/*.cs \
-  Tizen.System.Sensor/Interop/*.cs
+xbuild Tizen.System.Sensor/Tizen.System.Sensor.csproj /p:Configuration=%{BUILDCONF}
+
 # check p/invoke
 if [ -x %{dllname} ]; then
   RET=`mono-shlib-cop %{dllname}`; \
@@ -67,20 +65,19 @@ fi
 
 %install
 # copy dll
-mkdir -p %{buildroot}%{dllpath}
-install -p -m 644 %{dllname} %{buildroot}%{dllpath}
+gacutil -i Tizen.System.Sensor/bin/%{BUILDCONF}/*.dll -root "%{buildroot}%{_libdir}" -package tizen
 
 # generate pkgconfig
+%define pc_libs %{_libdir}/mono/tizen/Tizen.System.Sensor.dll
 mkdir -p %{buildroot}%{_libdir}/pkgconfig
-sed -e "s#@version@#%{version}#g" \
-    -e "s#@dllpath@#%{dllpath}#g" \
-    -e "s#@dllname@#%{dllname}#g" \
+sed -e "s#@name@#%{name}#g" \
+    -e "s#@version@#%{version}#g" \
+    -e "s#@libs@#%{pc_libs}#g" \
     %{SOURCE2} > %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
-%post
-gacutil -i %{dllpath}/%{dllname}
 
 %files
-%{dllpath}/%{dllname}
+%manifest %{name}.manifest
+%{_libdir}/mono/
 
 %files devel
 %{_libdir}/pkgconfig/%{name}.pc