1 # Macro definitions for CSAPI Build
3 %_dotnet_build_conf %{lua:if tonumber(rpm.expand("0%{?tizen_build_devel_mode}")) == 1 then print "Debug" else print "Release" end}
5 %dotnet_assembly_path %{!?dotnet_assembly_path:/opt/usr/share/dotnet.tizen/framework}
6 %_mono_assembly_path /opt/usr/lib/assembly
8 %dotnet_assembly_files %{dotnet_assembly_path}/*.dll
12 Summary: NuGet package for %{name}\
13 Group: Development/Libraries\
15 NuGet package for %{name}\
22 Summary: %{name} for Mono Runtime\
23 Group: Development/Libraries\
25 %{name} for Mono Runtime\
27 %manifest %{name}.manifest\
29 %attr(644,root,root) %{_mono_assembly_path}/*.dll\
38 find %{1}/*.project.json -print0 | xargs -n1 -0 nuget restore \
39 find %{1}/*.csproj -print0 | xargs -n1 -0 xbuild /p:Configuration=%{_dotnet_build_conf} \
43 nuget pack %{1}/%{1}.nuspec -Version %{?2}%{!?2:%{version}} -Properties Configuration=%{_dotnet_build_conf} \
47 %if 0%{?_with_corefx} \
48 mkdir -p %{buildroot}%{dotnet_assembly_path} \
49 mkdir -p %{buildroot}%{_mono_assembly_path} \
50 mkdir -p %{buildroot}/nuget \
51 install -p -m 644 %{1}/bin/%{_dotnet_build_conf}/%{1}.dll %{buildroot}%{dotnet_assembly_path} \
53 install -p -m 644 %{1}/bin/%{_dotnet_build_conf}/Net45/%{1}.dll %{buildroot}%{dotnet_assembly_path} \
55 install -p -m 644 %{1}/bin/%{_dotnet_build_conf}/Net45/%{1}.dll %{buildroot}%{_mono_assembly_path} \
56 install -p -m 644 %{1}*.nupkg %{buildroot}/nuget \