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: I4bdc2aca30dfeed39028a6d70497f06a7fa48a76
+++ /dev/null
-Name: csapi-location
-Description: Tizen location API's for C#
-Version: @version@
-Libs: -r:@dllpath@/@dllname@
-Requires:
+%{!?dotnet_assembly_path: %define dotnet_assembly_path %{_datadir}/assembly}
+
+%if 0%{?tizen_build_devel_mode}
+%else
+%define BUILDCONF Release
+%endif
-Summary: Tizen Location API's for C#
+Summary: Tizen Location API for C#
Version: 1.0.0
Release: 1
Group: Development/Libraries
Version: 1.0.0
Release: 1
Group: Development/Libraries
URL: https://www.tizen.org
Source0: %{name}-%{version}.tar.gz
Source1: %{name}.manifest
URL: https://www.tizen.org
Source0: %{name}-%{version}.tar.gz
Source1: %{name}.manifest
BuildRequires: mono-compiler
BuildRequires: mono-devel
BuildRequires: mono-compiler
BuildRequires: mono-devel
-BuildRequires: pkgconfig(glib-2.0)
-BuildRequires: pkgconfig(csapi-tizen)
+# P/Invoke Build Requires
+BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(capi-location-manager)
BuildRequires: pkgconfig(capi-location-manager)
-%description
-Tizen API for C#
-
-%package devel
-Summary: Development package for %{name}
-Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
+# C# API Requires
+BuildRequires: csapi-tizen
-%description devel
-Development package for %{name}
+%description
+Tizen Location API for C#
+%define Assemblies Tizen.Location
+
-# build dll
-xbuild Tizen.Location/Tizen.Location.csproj /p:Configuration=%{BUILDCONF}
+for ASM in %{Assemblies}; do
+xbuild $ASM/$ASM.csproj \
+ /p:Configuration=%{BUILDCONF} \
+ /p:ReferencePath=%{dotnet_assembly_path}
+done
-gacutil -i Tizen.Location/bin/%{BUILDCONF}/Tizen.Location.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
-mkdir -p %{buildroot}%{_libdir}/pkgconfig
-sed -e "s#@version@#%{version}#g" \
- -e "s#@dllpath@#%{dllpath}#g" \
- -e "s#@dllname@#%{dllname}#g" \
- %{SOURCE2} > %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
-
-%post
-gacutil -i %{dllpath}/%{dllname}
+# License
+mkdir -p %{buildroot}%{_datadir}/license
+cp LICENSE %{buildroot}%{_datadir}/license/%{name}
%files
%manifest %{name}.manifest
%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}
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<ItemGroup />
<ItemGroup>
<Reference Include="Tizen">
<ItemGroup />
<ItemGroup>
<Reference Include="Tizen">
- <PkgConfig>csapi-tizen</PkgConfig>
<HintPath>..\..\tizen\Tizen\obj\Debug\Tizen.dll</HintPath>
</Reference>
<Reference Include="Tizen.Internals">
<HintPath>..\..\tizen\Tizen\obj\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>
<HintPath>..\..\tizen\Tizen.Internals\bin\Debug\Tizen.Internals.dll</HintPath>
</Reference>
</ItemGroup>
<Name>Tizen</Name>
<Private>True</Private>
</ProjectReference>
<Name>Tizen</Name>
<Private>True</Private>
</ProjectReference>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ <!-- 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="BeforeBuild">
</Target>
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>