From a19626383a76d9dd62c07962fcb29f095a8b993a Mon Sep 17 00:00:00 2001 From: WonYoung Choi Date: Wed, 6 Jul 2016 15:19:37 +0900 Subject: [PATCH] Change assembly installation path 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 | 22 ------------- packaging/csapi-system.pc.in | 5 --- packaging/csapi-system.spec | 64 ++++++++++++++++-------------------- src/Tizen.System/Tizen.System.csproj | 3 -- 4 files changed, 29 insertions(+), 65 deletions(-) delete mode 100755 Tizen.System.sln delete mode 100755 packaging/csapi-system.pc.in diff --git a/Tizen.System.sln b/Tizen.System.sln deleted file mode 100755 index 521b44c..0000000 --- a/Tizen.System.sln +++ /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 diff --git a/packaging/csapi-system.pc.in b/packaging/csapi-system.pc.in deleted file mode 100755 index 5a82417..0000000 --- a/packaging/csapi-system.pc.in +++ /dev/null @@ -1,5 +0,0 @@ -Name: csapi-system -Description: Tizen System API for C# -Version: @version@ -Libs: -r:@dllpath@/@dllname@ -Requires: diff --git a/packaging/csapi-system.spec b/packaging/csapi-system.spec index c1b3aa6..238b52b 100755 --- a/packaging/csapi-system.spec +++ b/packaging/csapi-system.spec @@ -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} diff --git a/src/Tizen.System/Tizen.System.csproj b/src/Tizen.System/Tizen.System.csproj index 9a1f6bb..53a82d5 100755 --- a/src/Tizen.System/Tizen.System.csproj +++ b/src/Tizen.System/Tizen.System.csproj @@ -91,9 +91,6 @@ - - - -- 2.7.4