Use xbuild for building package.
authorWonYoung Choi <wy80.choi@samsung.com>
Mon, 25 Apr 2016 01:02:53 +0000 (10:02 +0900)
committerWonYoung Choi <wy80.choi@samsung.com>
Mon, 25 Apr 2016 07:25:44 +0000 (16:25 +0900)
- use xbuild in spec file.
- add pkgconfig dependencies to .csproj file.
- remove Makefile

Change-Id: I132b0b8b507aac587e9cc963810757f49950a73d

AppFW.sln [deleted file]
AppFW.v12.suo [deleted file]
Tizen.Applications/Tizen.Applications.Messages/MessagePortErrorFactory.cs
Tizen.Applications/Tizen.Applications.csproj
packaging/csapi-application.pc.in
packaging/csapi-application.spec
src/Makefile [deleted file]

diff --git a/AppFW.sln b/AppFW.sln
deleted file mode 100755 (executable)
index 0b38588..0000000
--- a/AppFW.sln
+++ /dev/null
@@ -1,33 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.24720.0
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tizen.Applications", "Tizen.Applications\Tizen.Applications.csproj", "{663C5A3D-E631-4987-AEE7-F498C56A40FC}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tizen.Internals", "..\tizen\Tizen.Internals\Tizen.Internals.csproj", "{B9AA1CB2-F72D-4A30-A33B-A20C850A38A0}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tizen", "..\tizen\Tizen\Tizen.csproj", "{7659CA59-410D-41A1-9841-586E88BC78C9}"
-EndProject
-Global
-       GlobalSection(SolutionConfigurationPlatforms) = preSolution
-               Debug|Any CPU = Debug|Any CPU
-               Release|Any CPU = Release|Any CPU
-       EndGlobalSection
-       GlobalSection(ProjectConfigurationPlatforms) = postSolution
-               {663C5A3D-E631-4987-AEE7-F498C56A40FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {663C5A3D-E631-4987-AEE7-F498C56A40FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {663C5A3D-E631-4987-AEE7-F498C56A40FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {663C5A3D-E631-4987-AEE7-F498C56A40FC}.Release|Any CPU.Build.0 = Release|Any CPU
-               {B9AA1CB2-F72D-4A30-A33B-A20C850A38A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {B9AA1CB2-F72D-4A30-A33B-A20C850A38A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {B9AA1CB2-F72D-4A30-A33B-A20C850A38A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {B9AA1CB2-F72D-4A30-A33B-A20C850A38A0}.Release|Any CPU.Build.0 = Release|Any CPU
-               {7659CA59-410D-41A1-9841-586E88BC78C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {7659CA59-410D-41A1-9841-586E88BC78C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {7659CA59-410D-41A1-9841-586E88BC78C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {7659CA59-410D-41A1-9841-586E88BC78C9}.Release|Any CPU.Build.0 = Release|Any CPU
-       EndGlobalSection
-       GlobalSection(SolutionProperties) = preSolution
-               HideSolutionNode = FALSE
-       EndGlobalSection
-EndGlobal
diff --git a/AppFW.v12.suo b/AppFW.v12.suo
deleted file mode 100755 (executable)
index 2ab72a5..0000000
Binary files a/AppFW.v12.suo and /dev/null differ
index 67b88b5..7a62d7d 100755 (executable)
     <None Include="Tizen.Applications.snk" />
   </ItemGroup>
   <ItemGroup>
+    <CodeAnalysisDictionary Include="CustomDictionary.xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Include="Tizen">
+      <PkgConfig>csapi-tizen</PkgConfig>
+      <HintPath>..\..\tizen\Tizen\bin\Debug\Tizen.dll</HintPath>
+    </Reference>
+    <Reference Include="Tizen.Internals">
+      <PkgConfig>csapi-tizen</PkgConfig>
+      <HintPath>..\..\tizen\Tizen.Internals\bin\Debug\Tizen.Internals.dll</HintPath>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
     <ProjectReference Include="..\..\tizen\Tizen.Internals\Tizen.Internals.csproj">
       <Project>{b9aa1cb2-f72d-4a30-a33b-a20c850a38a0}</Project>
       <Name>Tizen.Internals</Name>
       <Name>Tizen</Name>
     </ProjectReference>
   </ItemGroup>
-  <ItemGroup>
-    <CodeAnalysisDictionary Include="CustomDictionary.xml" />
-  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>
index c023e59..2d54a43 100755 (executable)
@@ -1,5 +1,5 @@
-Name: csapi-application
+Name: @name@
 Description: Tizen Application API for C#
 Version: @version@
-Libs: -r:@dllpath@/@dllname@
-Requires:
\ No newline at end of file
+Libs: -r:@libs@
+Requires:
index 7f44f29..ba33abb 100755 (executable)
@@ -1,5 +1,4 @@
-%define dllpath %{_libdir}/mono/tizen
-%define dllname Tizen.Applications.dll
+%define BUILDCONF Debug
 
 Name:       csapi-application
 Summary:    Tizen Application API for C#
@@ -25,10 +24,6 @@ Requires: capi-appfw-application
 Requires: capi-message-port
 Requires: appcore-agent
 
-
-Requires(post): mono-core
-Requires(postun): mono-core
-
 %description
 Tizen API for C#
 
@@ -46,28 +41,22 @@ Development package for %{name}
 cp %{SOURCE1} .
 
 %build
-make
+xbuild Tizen.Applications/Tizen.Applications.csproj /p:Configuration=%{BUILDCONF}
 
 %install
-# copy dll
-mkdir -p %{buildroot}%{dllpath}
-install -p -m 644 %{dllname} %{buildroot}%{dllpath}
+gacutil -i Tizen.Applications/bin/%{BUILDCONF}/*.dll -root "%{buildroot}%{_libdir}" -package tizen
 
 # generate pkgconfig
+%define pc_libs %{_libdir}/mono/tizen/Tizen.Applications.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}
-
-find %{_libdir}/mono/gac -name Tizen*  -exec chsmack -a "_" {} \;
-
 %files
 %manifest %{name}.manifest
-%{dllpath}/%{dllname}
+%{_libdir}/mono/
 
 %files devel
 %{_libdir}/pkgconfig/%{name}.pc
diff --git a/src/Makefile b/src/Makefile
deleted file mode 100644 (file)
index 534bc68..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-ASM_DIRS := Tizen.Applications
-ASM_DLLS := $(addsuffix .dll,$(ASM_DIRS))
-
-FLAGS := /unsafe
-
-ALL: $(ASM_DLLS)
-
-define make-dll
-$(eval ASM = $(strip $1))
-$(eval SRC = $(shell find $(ASM) -path $(ASM)/obj -prune -o -name '*.cs' -print))
-$(eval PKG = $(shell echo $2 | tr ' ' ','))
-$(ASM).dll: $(SRC)
-       @echo "[BUILD] $$@"
-       @mcs /nologo /out:$$@ /t:library /keyfile:$(ASM)/$(ASM).snk $(addprefix /pkg:,$(PKG)) $(FLAGS) $(SRC)
-       @echo "[CHECK] $$@"
-       @RET=`mono-shlib-cop $$@`; \
-  CNT=`echo $$$$RET | grep -e '^error:' | wc -l`; \
-  if [ $$$$CNT -gt 0 ]; then echo $$$$RET; rm -f $$@ exit 1; fi
-endef
-
-$(eval $(call make-dll, Tizen.Applications, csapi-tizen))
-
-clean:
-       @rm -f $(ASM_DLLS)