Change assembly installation path
authorWonYoung Choi <wy80.choi@samsung.com>
Wed, 6 Jul 2016 06:19:37 +0000 (15:19 +0900)
committerWonYoung Choi <wy80.choi@samsung.com>
Wed, 6 Jul 2016 08:16:52 +0000 (17:16 +0900)
The assembly installation path is changed to /usr/share/assembly/ as default.
This path can be overrided by the macro %dotnet_assembly_path also.

Change-Id: I326a382dba3bcd21b08c99359df20d4c51ffc760

Tizen.System.sln [deleted file]
Tizen.System/Tizen.System.csproj
packaging/csapi-system.pc.in [deleted file]
packaging/csapi-system.spec

diff --git a/Tizen.System.sln b/Tizen.System.sln
deleted file mode 100755 (executable)
index 521b44c..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Express 14 for Windows Desktop
-VisualStudioVersion = 14.0.24720.0
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tizen.System", "Tizen.System\Tizen.System.csproj", "{A5C7AB61-87F1-4707-BBF4-322D682E223E}"
-EndProject
-Global
-       GlobalSection(SolutionConfigurationPlatforms) = preSolution
-               Debug|Any CPU = Debug|Any CPU
-               Release|Any CPU = Release|Any CPU
-       EndGlobalSection
-       GlobalSection(ProjectConfigurationPlatforms) = postSolution
-               {A5C7AB61-87F1-4707-BBF4-322D682E223E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {A5C7AB61-87F1-4707-BBF4-322D682E223E}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {A5C7AB61-87F1-4707-BBF4-322D682E223E}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {A5C7AB61-87F1-4707-BBF4-322D682E223E}.Release|Any CPU.Build.0 = Release|Any CPU
-       EndGlobalSection
-       GlobalSection(SolutionProperties) = preSolution
-               HideSolutionNode = FALSE
-       EndGlobalSection
-EndGlobal
index 9a1f6bb..53a82d5 100755 (executable)
@@ -91,9 +91,6 @@
     <Compile Include="SystemSettings\SystemSettingsExceptionFactory.cs" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="packaging\csapi-tizen.system.manifest" />
-    <None Include="packaging\csapi-tizen.system.pc.in" />
-    <None Include="packaging\csapi-tizen.system.spec" />
     <None Include="Tizen.System.snk" />
   </ItemGroup>
   <ItemGroup />
diff --git a/packaging/csapi-system.pc.in b/packaging/csapi-system.pc.in
deleted file mode 100755 (executable)
index 5a82417..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-Name: csapi-system
-Description: Tizen System API for C#
-Version: @version@
-Libs: -r:@dllpath@/@dllname@
-Requires:
index c1b3aa6..238b52b 100755 (executable)
@@ -1,4 +1,10 @@
+%{!?dotnet_assembly_path: %define dotnet_assembly_path %{_datadir}/assembly}
+
+%if 0%{?tizen_build_devel_mode}
 %define BUILDCONF Debug
+%else
+%define BUILDCONF Release
+%endif
 
 Name:       csapi-system
 Summary:    Tizen System API for C#
@@ -9,61 +15,49 @@ License:    Apache-2.0
 URL:        https://www.tizen.org
 Source0:    %{name}-%{version}.tar.gz
 Source1:    %{name}.manifest
-Source2:    %{name}.pc.in
 
-# TODO: replace mono-compiler, mono-devel to mcs, mono-shlib-cop
+# Mono
 BuildRequires: mono-compiler
 BuildRequires: mono-devel
 
-# P/Invoke Dependencies
-BuildRequires: pkgconfig(csapi-tizen)
-BuildRequires: pkgconfig(csapi-uifw)
+# P/Invoke Build Requires
 BuildRequires: pkgconfig(capi-system-device)
 BuildRequires: pkgconfig(capi-system-runtime-info)
 BuildRequires: pkgconfig(capi-system-info)
 BuildRequires: pkgconfig(storage)
 
-# P/Invoke Runtime Dependencies
-# TODO: It should be removed after fix tizen-rpm-config
-# DLL Dependencies
-Requires: capi-system-device
-Requires: capi-system-runtime-info
-Requires: capi-system-info
-Requires: storage
-#BuildRequires: ...
+# C# API Requires
+BuildRequires: csapi-tizen
+BuildRequires: csapi-uifw
 
 %description
 Tizen System API for C#
 
-%package devel
-Summary:    Development package for %{name}
-Group:      Development/Libraries
-Requires:   %{name} = %{version}-%{release}
-
-%description devel
-Development package for %{name}
-
 %prep
 %setup -q
-
 cp %{SOURCE1} .
 
+%define Assemblies Tizen.System
+
 %build
-xbuild Tizen.System/Tizen.System.csproj /p:Configuration=%{BUILDCONF}
+for ASM in %{Assemblies}; do
+xbuild $ASM/$ASM.csproj \
+        /p:Configuration=%{BUILDCONF} \
+        /p:ReferencePath=%{dotnet_assembly_path}
+done
 
 %install
-gacutil -i Tizen.System/bin/%{BUILDCONF}/*.dll -root "%{buildroot}%{_libdir}" -package tizen
-
-# generate pkgconfig
-mkdir -p %{buildroot}%{_libdir}/pkgconfig
-sed -e "s#@name@#%{name}#g" \
-    -e "s#@version@#%{version}#g" \
-    -e "s#@libs@#%{pc_libs}#g" \
-    %{SOURCE2} > %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
+# Assemblies
+mkdir -p %{buildroot}%{dotnet_assembly_path}
+for ASM in %{Assemblies}; do
+install -p -m 644 $ASM/bin/%{BUILDCONF}/$ASM.dll %{buildroot}%{dotnet_assembly_path}
+done
 
+# License
+mkdir -p %{buildroot}%{_datadir}/license
+cp LICENSE %{buildroot}%{_datadir}/license/%{name}
 
 %files
-%{_libdir}/mono
-
-%files devel
-%{_libdir}/pkgconfig/%{name}.pc
+%manifest %{name}.manifest
+%attr(644,root,root) %{dotnet_assembly_path}/*.dll
+%attr(644,root,root) %{_datadir}/license/%{name}