1 %{!?dotnet_assembly_path: %define dotnet_assembly_path /opt/usr/share/dotnet.tizen/framework}
2 %{!?dotnet_core_path: %define dotnet_core_path %{_datadir}/tizen.net/ref}
4 %if 0%{?tizen_build_devel_mode}
5 %define BUILDCONF Debug
7 %define BUILDCONF Release
11 Summary: Tizen Push API for C#
14 Group: Development/Libraries
16 URL: https://www.tizen.org
17 Source0: %{name}-%{version}.tar.gz
18 Source1: %{name}.manifest
21 BuildRequires: mono-compiler
22 BuildRequires: mono-devel
27 BuildRequires: corefx-managed-32b-ref
30 BuildRequires: dotnet-build-tools
33 BuildRequires: csapi-tizen-devel
42 %define Assemblies Tizen.Messaging.Push
46 for ASM in %{Assemblies}; do
47 if [ -e $ASM/$ASM.Net45.csproj ]; then
48 xbuild $ASM/$ASM.Net45.csproj \
49 /p:Configuration=%{BUILDCONF} \
50 /p:DotnetAssemblyPath=%{dotnet_assembly_path}/devel/net45 \
51 /p:OutputPath=bin/net45
56 if [ -e $ASM/$ASM.csproj ]; then
57 xbuild $ASM/$ASM.csproj \
58 /p:Configuration=%{BUILDCONF} \
59 /p:DotnetAssemblyPath=%{dotnet_assembly_path}/devel/netstandard1.6 \
60 /p:CoreFxPath=%{dotnet_core_path} \
61 /p:OutputPath=bin/netstandard1.6
66 dotnet-gbs pack $ASM/$ASM.nuspec --PackageVersion=%{version} --PackageFiles=$ASM/bin
71 mkdir -p %{buildroot}%{dotnet_assembly_path}/devel
72 for ASM in %{Assemblies}; do
73 cp -fr $ASM/bin/* %{buildroot}%{dotnet_assembly_path}/devel
75 install -p -m 644 $ASM/bin/netstandard1.6/$ASM.dll %{buildroot}%{dotnet_assembly_path}
77 install -p -m 644 $ASM/bin/net45/$ASM.dll %{buildroot}%{dotnet_assembly_path}
81 mkdir -p %{buildroot}/nuget
82 install -p -m 644 *.nupkg %{buildroot}/nuget
85 %manifest %{name}.manifest
87 %attr(644,root,root) %{dotnet_assembly_path}/*.dll
90 Summary: Development package for %{name}
91 Group: Development/Libraries
92 Requires: %{name} = %{version}-%{release}
96 Development package for %{name}
99 %{dotnet_assembly_path}/devel/*
102 Summary: NuGet package for %{name}
103 Group: Development/Libraries
104 Requires: %{name} = %{version}-%{release}
107 NuGet package for %{name}