-%define dllpath %{_libdir}/mono/tizen
-%define dllname Tizen.Content.MimeType.dll
+%define BUILDCONF Debug
Name: csapi-mime-type
Summary: Tizen MimeType API for C#
Source1: %{name}.manifest
Source2: %{name}.pc.in
-# TODO: replace mono-compiler, mono-devel to mcs, mono-shlib-cop
BuildRequires: mono-compiler
BuildRequires: mono-devel
-# TODO: replace mono-core to gacutil.
-# mono-core should provide the symbol 'gacutil'
-Requires(post): mono-core
-Requires(postun): mono-core
-
-# P/Invoke Dependencies
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(capi-content-mime-type)
BuildRequires: pkgconfig(csapi-tizen)
%build
# build dll
-mcs -target:library -out:%{dllname} -keyfile:Tizen.Content.MimeType/Tizen.Content.MimeType.snk -pkg:'csapi-tizen'\
- Tizen.Content.MimeType/Properties/AssemblyInfo.cs \
- Tizen.Content.MimeType/Interop/*.cs \
- Tizen.Content.MimeType/Tizen.Content.MimeType/*.cs
-
-# check p/invoke
-if [ -x %{dllname} ]; then
- RET=`mono-shlib-cop %{dllname}`; \
- CNT=`echo $RET | grep -E "^error:" | wc -l`; \
- if [ $CNT -gt 0 ]; then exit 1; fi
-fi
+xbuild Tizen.Content.MimeType/Tizen.Content.MimeType.csproj /p:Configuration=%{BUILDCONF}
%install
-# copy dll
-mkdir -p %{buildroot}%{dllpath}
-install -p -m 644 %{dllname} %{buildroot}%{dllpath}
+gacutil -i Tizen.Content.MimeType/bin/%{BUILDCONF}/Tizen.Content.MimeType.dll -root "%{buildroot}%{_libdir}" -package tizen
# generate pkgconfig
mkdir -p %{buildroot}%{_libdir}/pkgconfig
-e "s#@dllname@#%{dllname}#g" \
%{SOURCE2} > %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
-%post
-gacutil -i %{dllpath}/%{dllname}
-
%files
-%{dllpath}/%{dllname}
+%manifest %{name}.manifest
+%{_libdir}/mono/
%files devel
%{_libdir}/pkgconfig/%{name}.pc
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Tizen.Content.MimeType</RootNamespace>
<AssemblyName>Tizen.Content.MimeType</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+ <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+ <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
- <Reference Include="Tizen">
- <HintPath>..\..\..\..\..\..\..\dll\usr\lib\mono\tizen\Tizen.dll</HintPath>
- </Reference>
- <Reference Include="Tizen.Internals">
- <HintPath>..\..\..\..\..\..\..\dll\usr\lib\mono\tizen\Tizen.Internals.dll</HintPath>
- </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Interop\Interop.Glib.cs" />
<None Include="Tizen.Content.MimeType.snk" />
</ItemGroup>
<ItemGroup />
+ <ItemGroup>
+ <Reference Include="Tizen">
+ <PkgConfig>csapi-tizen</PkgConfig>
+ <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>
+ <ItemGroup>
+ <ProjectReference Include="..\..\tizen\Tizen.Internals\Tizen.Internals.csproj">
+ <Project>{B9AA1CB2-F72D-4A30-A33B-A20C850A38A0}</Project>
+ <Name>Tizen.Internals</Name>
+ <Private>True</Private>
+ </ProjectReference>
+ <ProjectReference Include="..\..\tizen\Tizen\Tizen.csproj">
+ <Project>{7659CA59-410D-41A1-9841-586E88BC78C9}</Project>
+ <Name>Tizen</Name>
+ <Private>True</Private>
+ </ProjectReference>
+ </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.