a664d277f9f78a8360c72287c72e9fe1a1904a43
[platform/core/csapi/system-settings.git] / packaging / csapi-systemsettings.spec
1 %{!?dotnet_assembly_path: %define dotnet_assembly_path %{_datadir}/assembly}
2
3 %if 0%{?tizen_build_devel_mode}
4 %define BUILDCONF Debug
5 %else
6 %define BUILDCONF Release
7 %endif
8
9 Name:       csapi-systemsettings
10 Summary:    Tizen System API for C#
11 Version:    1.0.0
12 Release:    1
13 Group:      Development/Libraries
14 License:    Apache-2.0
15 URL:        https://www.tizen.org
16 Source0:    %{name}-%{version}.tar.gz
17 Source1:    %{name}.manifest
18
19 # Mono
20 BuildRequires: mono-compiler
21 BuildRequires: mono-devel
22
23 # P/Invoke Build Requires
24 BuildRequires: pkgconfig(capi-system-system-settings)
25
26 # C# API Requires
27 BuildRequires: csapi-tizen
28
29 %description
30 Tizen System Device API for C#
31
32 %prep
33 %setup -q
34 cp %{SOURCE1} .
35
36 %define Assemblies Tizen.System.SystemSettings
37
38 %build
39 for ASM in %{Assemblies}; do
40 xbuild $ASM/$ASM.csproj \
41         /p:Configuration=%{BUILDCONF} \
42         /p:ReferencePath=%{dotnet_assembly_path}
43 done
44
45 %install
46 # Assemblies
47 mkdir -p %{buildroot}%{dotnet_assembly_path}
48 for ASM in %{Assemblies}; do
49 install -p -m 644 $ASM/bin/%{BUILDCONF}/$ASM.dll %{buildroot}%{dotnet_assembly_path}
50 done
51
52 # License
53 mkdir -p %{buildroot}%{_datadir}/license
54 cp LICENSE %{buildroot}%{_datadir}/license/%{name}
55
56 %files
57 %manifest %{name}.manifest
58 %attr(644,root,root) %{dotnet_assembly_path}/*.dll
59 %attr(644,root,root) %{_datadir}/license/%{name}