From a3c02d0c5cd3481e77565116c4fb1b69adf240ef Mon Sep 17 00:00:00 2001 From: WonYoung Choi Date: Wed, 6 Jul 2016 14:28:11 +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: I429544062d419788b1781e567725da73a1c7f454 --- Tizen.Applications/Tizen.Applications.csproj | 3 -- packaging/csapi-application.pc.in | 5 --- packaging/csapi-application.spec | 60 ++++++++++++++-------------- 3 files changed, 30 insertions(+), 38 deletions(-) delete mode 100755 packaging/csapi-application.pc.in diff --git a/Tizen.Applications/Tizen.Applications.csproj b/Tizen.Applications/Tizen.Applications.csproj index 8a2f12f..bacae5c 100644 --- a/Tizen.Applications/Tizen.Applications.csproj +++ b/Tizen.Applications/Tizen.Applications.csproj @@ -123,15 +123,12 @@ - csapi-tizen ..\..\tizen\Tizen\bin\Debug\Tizen.dll - csapi-tizen ..\..\tizen\Tizen.Internals\bin\Debug\Tizen.Internals.dll - csapi-uifw ..\..\uifw\Tizen.UI\bin\Debug\Tizen.UI.dll diff --git a/packaging/csapi-application.pc.in b/packaging/csapi-application.pc.in deleted file mode 100755 index 2d54a43..0000000 --- a/packaging/csapi-application.pc.in +++ /dev/null @@ -1,5 +0,0 @@ -Name: @name@ -Description: Tizen Application API for C# -Version: @version@ -Libs: -r:@libs@ -Requires: diff --git a/packaging/csapi-application.spec b/packaging/csapi-application.spec index 48db9bb..263a343 100755 --- a/packaging/csapi-application.spec +++ b/packaging/csapi-application.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-application Summary: Tizen Application API for C# @@ -9,12 +15,12 @@ License: Apache-2.0 URL: https://www.tizen.org Source0: %{name}-%{version}.tar.gz Source1: %{name}.manifest -Source2: %{name}.pc.in +# Mono BuildRequires: mono-compiler BuildRequires: mono-devel -BuildRequires: pkgconfig(csapi-tizen) -BuildRequires: pkgconfig(csapi-uifw) + +# P/Invoke Build Requries BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(capi-appfw-application) BuildRequires: pkgconfig(capi-appfw-app-manager) @@ -22,44 +28,38 @@ BuildRequires: pkgconfig(appcore-agent) BuildRequires: pkgconfig(message-port) BuildRequires: pkgconfig(notification) -Requires: capi-appfw-application -Requires: capi-message-port -Requires: appcore-agent -Requires: notification +# C# API Requries +BuildRequires: csapi-tizen +BuildRequires: csapi-uifw %description -Tizen API for C# - -%package devel -Summary: Development package for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -%description devel -Development package for %{name} +Tizen Application API for C# %prep %setup -q - cp %{SOURCE1} . +%define Assemblies Tizen.Applications + %build -xbuild Tizen.Applications/Tizen.Applications.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.Applications/bin/%{BUILDCONF}/*.dll -root "%{buildroot}%{_libdir}" -package tizen +# 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 -# generate pkgconfig -%define pc_libs %{_libdir}/mono/tizen/Tizen.Applications.dll -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 +# License +mkdir -p %{buildroot}%{_datadir}/license +cp LICENSE %{buildroot}%{_datadir}/license/%{name} %files %manifest %{name}.manifest -%{_libdir}/mono/ - -%files devel -%{_libdir}/pkgconfig/%{name}.pc +%attr(644,root,root) %{dotnet_assembly_path}/*.dll +%attr(644,root,root) %{_datadir}/license/%{name} -- 2.7.4