1 %{!?dotnet_assembly_path: %define dotnet_assembly_path /opt/usr/share/dotnet.tizen/framework}
2 %{!?mono_assembly_path: %define mono_assembly_path /opt/usr/lib/assembly}
4 %if 0%{?tizen_build_devel_mode}
5 %define BUILDCONF Debug
7 %define BUILDCONF Release
10 Name: csapi-application
11 Summary: Tizen Application API for C#
14 Group: Development/Libraries
16 URL: https://www.tizen.org
17 Source0: %{name}-%{version}.tar.gz
18 Source1: %{name}.manifest
21 ExcludeArch: %{ix86} aarch64
23 BuildRequires: mono-compiler
24 BuildRequires: mono-devel
26 BuildRequires: dotnet-build-tools
28 # NuGet for Dependencies
29 BuildRequires: csapi-tizen-nuget
33 Tizen Application API for C#
39 %define Assemblies Tizen.Applications
42 for ASM in %{Assemblies}; do
44 find $ASM/*.project.json -exec nuget restore {} \;
46 find $ASM/*.csproj -exec xbuild {} /p:Configuration=%{BUILDCONF} \;
48 nuget pack $ASM/$ASM.nuspec -Version %{version} -Properties Configuration=%{BUILDCONF}
53 mkdir -p %{buildroot}%{dotnet_assembly_path}
54 mkdir -p %{buildroot}%{mono_assembly_path}
55 for ASM in %{Assemblies}; do
57 install -p -m 644 $ASM/bin/%{BUILDCONF}/$ASM.dll %{buildroot}%{dotnet_assembly_path}
59 install -p -m 644 $ASM/bin/%{BUILDCONF}/Net45/$ASM.dll %{buildroot}%{dotnet_assembly_path}
61 install -p -m 644 $ASM/bin/%{BUILDCONF}/Net45/$ASM.dll %{buildroot}%{mono_assembly_path}
64 mkdir -p %{buildroot}/nuget
65 install -p -m 644 *.nupkg %{buildroot}/nuget
68 %manifest %{name}.manifest
70 %attr(644,root,root) %{dotnet_assembly_path}/*.dll
73 Summary: NuGet package for %{name}
74 Group: Development/Libraries
77 NuGet package for %{name}
83 Summary: %{name} for Mono Runtime
84 Group: Development/Libraries
87 %{name} for Mono Runtime
90 %manifest %{name}.manifest
92 %attr(644,root,root) %{mono_assembly_path}/*.dll