add Arm64, i586 Exclude
[platform/core/csapi/tizenfx.git] / packaging / csapi-system-settings.spec
1 %{!?dotnet_assembly_path: %define dotnet_assembly_path /opt/usr/share/dotnet.tizen/framework}
2
3 %if 0%{?tizen_build_devel_mode}
4 %define BUILDCONF Debug
5 %else
6 %define BUILDCONF Release
7 %endif
8
9 ExcludeArch: %{ix86} aarch64
10
11 Name:       csapi-system-settings
12 Summary:    Tizen System Settings API for C#
13 Version:    1.0.1
14 Release:    1
15 Group:      Development/Libraries
16 License:    Apache-2.0
17 URL:        https://www.tizen.org
18 Source0:    %{name}-%{version}.tar.gz
19 Source1:    %{name}.manifest
20
21 AutoReqProv: no
22
23 BuildRequires: mono-compiler
24 BuildRequires: mono-devel
25
26 BuildRequires: dotnet-build-tools
27
28 # C# API Requires
29 BuildRequires: csapi-tizen-nuget
30
31 %description
32 Tizen System Settings API for C#
33
34 %prep
35 %setup -q
36 cp %{SOURCE1} .
37
38 %define Assemblies Tizen.System.SystemSettings
39
40 %build
41 for ASM in %{Assemblies}; do
42 # NuGet Restore
43 find $ASM/*.project.json -exec nuget restore {} \;
44 # Build
45 find $ASM/*.csproj -exec xbuild {} /p:Configuration=%{BUILDCONF} \;
46 # NuGet Pack
47 nuget pack $ASM/$ASM.nuspec -Version %{version} -Properties Configuration=%{BUILDCONF}
48 done
49
50 %install
51 # Runtime Binary
52 mkdir -p %{buildroot}%{dotnet_assembly_path}
53 for ASM in %{Assemblies}; do
54 %if 0%{?_with_corefx}
55   install -p -m 644 $ASM/bin/%{BUILDCONF}/$ASM.dll %{buildroot}%{dotnet_assembly_path}
56 %else
57   install -p -m 644 $ASM/bin/%{BUILDCONF}/Net45/$ASM.dll %{buildroot}%{dotnet_assembly_path}
58 %endif
59 done
60 # NuGet
61 mkdir -p %{buildroot}/nuget
62 install -p -m 644 *.nupkg %{buildroot}/nuget
63
64 %files
65 %manifest %{name}.manifest
66 %license LICENSE
67 %attr(644,root,root) %{dotnet_assembly_path}/*.dll
68
69 %package nuget
70 Summary:   NuGet package for %{name}
71 Group:     Development/Libraries
72
73 %description nuget
74 NuGet package for %{name}
75
76 %files nuget
77 /nuget/*.nupkg