- use xbuild in spec file.
- add pkgconfig dependencies to .csproj file.
- remove Makefile
Change-Id: I132b0b8b507aac587e9cc963810757f49950a73d
+++ /dev/null
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.24720.0
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tizen.Applications", "Tizen.Applications\Tizen.Applications.csproj", "{663C5A3D-E631-4987-AEE7-F498C56A40FC}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tizen.Internals", "..\tizen\Tizen.Internals\Tizen.Internals.csproj", "{B9AA1CB2-F72D-4A30-A33B-A20C850A38A0}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tizen", "..\tizen\Tizen\Tizen.csproj", "{7659CA59-410D-41A1-9841-586E88BC78C9}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {663C5A3D-E631-4987-AEE7-F498C56A40FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {663C5A3D-E631-4987-AEE7-F498C56A40FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {663C5A3D-E631-4987-AEE7-F498C56A40FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {663C5A3D-E631-4987-AEE7-F498C56A40FC}.Release|Any CPU.Build.0 = Release|Any CPU
- {B9AA1CB2-F72D-4A30-A33B-A20C850A38A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B9AA1CB2-F72D-4A30-A33B-A20C850A38A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B9AA1CB2-F72D-4A30-A33B-A20C850A38A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B9AA1CB2-F72D-4A30-A33B-A20C850A38A0}.Release|Any CPU.Build.0 = Release|Any CPU
- {7659CA59-410D-41A1-9841-586E88BC78C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7659CA59-410D-41A1-9841-586E88BC78C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7659CA59-410D-41A1-9841-586E88BC78C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7659CA59-410D-41A1-9841-586E88BC78C9}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
}
}
}
-}
\ No newline at end of file
+}
<None Include="Tizen.Applications.snk" />
</ItemGroup>
<ItemGroup>
+ <CodeAnalysisDictionary Include="CustomDictionary.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Reference Include="Tizen">
+ <PkgConfig>csapi-tizen</PkgConfig>
+ <HintPath>..\..\tizen\Tizen\bin\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>
<Name>Tizen</Name>
</ProjectReference>
</ItemGroup>
- <ItemGroup>
- <CodeAnalysisDictionary Include="CustomDictionary.xml" />
- </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.
<Target Name="AfterBuild">
</Target>
-->
-</Project>
\ No newline at end of file
+</Project>
-Name: csapi-application
+Name: @name@
Description: Tizen Application API for C#
Version: @version@
-Libs: -r:@dllpath@/@dllname@
-Requires:
\ No newline at end of file
+Libs: -r:@libs@
+Requires:
-%define dllpath %{_libdir}/mono/tizen
-%define dllname Tizen.Applications.dll
+%define BUILDCONF Debug
Name: csapi-application
Summary: Tizen Application API for C#
Requires: capi-message-port
Requires: appcore-agent
-
-Requires(post): mono-core
-Requires(postun): mono-core
-
%description
Tizen API for C#
cp %{SOURCE1} .
%build
-make
+xbuild Tizen.Applications/Tizen.Applications.csproj /p:Configuration=%{BUILDCONF}
%install
-# copy dll
-mkdir -p %{buildroot}%{dllpath}
-install -p -m 644 %{dllname} %{buildroot}%{dllpath}
+gacutil -i Tizen.Applications/bin/%{BUILDCONF}/*.dll -root "%{buildroot}%{_libdir}" -package tizen
# generate pkgconfig
+%define pc_libs %{_libdir}/mono/tizen/Tizen.Applications.dll
mkdir -p %{buildroot}%{_libdir}/pkgconfig
-sed -e "s#@version@#%{version}#g" \
- -e "s#@dllpath@#%{dllpath}#g" \
- -e "s#@dllname@#%{dllname}#g" \
+sed -e "s#@name@#%{name}#g" \
+ -e "s#@version@#%{version}#g" \
+ -e "s#@libs@#%{pc_libs}#g" \
%{SOURCE2} > %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
-%post
-gacutil -i %{dllpath}/%{dllname}
-
-find %{_libdir}/mono/gac -name Tizen* -exec chsmack -a "_" {} \;
-
%files
%manifest %{name}.manifest
-%{dllpath}/%{dllname}
+%{_libdir}/mono/
%files devel
%{_libdir}/pkgconfig/%{name}.pc
+++ /dev/null
-ASM_DIRS := Tizen.Applications
-ASM_DLLS := $(addsuffix .dll,$(ASM_DIRS))
-
-FLAGS := /unsafe
-
-ALL: $(ASM_DLLS)
-
-define make-dll
-$(eval ASM = $(strip $1))
-$(eval SRC = $(shell find $(ASM) -path $(ASM)/obj -prune -o -name '*.cs' -print))
-$(eval PKG = $(shell echo $2 | tr ' ' ','))
-$(ASM).dll: $(SRC)
- @echo "[BUILD] $$@"
- @mcs /nologo /out:$$@ /t:library /keyfile:$(ASM)/$(ASM).snk $(addprefix /pkg:,$(PKG)) $(FLAGS) $(SRC)
- @echo "[CHECK] $$@"
- @RET=`mono-shlib-cop $$@`; \
- CNT=`echo $$$$RET | grep -e '^error:' | wc -l`; \
- if [ $$$$CNT -gt 0 ]; then echo $$$$RET; rm -f $$@ exit 1; fi
-endef
-
-$(eval $(call make-dll, Tizen.Applications, csapi-tizen))
-
-clean:
- @rm -f $(ASM_DLLS)