Change assembly installation path
[platform/core/csapi/push.git] / packaging / csapi-push.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-push
10 Summary:    Tizen Push 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(glib-2.0)
25 BuildRequires: pkgconfig(push)
26
27 # C# API Requires
28 BuildRequires: csapi-tizen
29
30 %description
31 Tizen Push API for C#
32
33 %prep
34 %setup -q
35 cp %{SOURCE1} .
36
37 %define Assemblies Tizen.Messaging.Push
38
39 %build
40 for ASM in %{Assemblies}; do
41 xbuild $ASM/$ASM.csproj \
42         /p:Configuration=%{BUILDCONF} \
43         /p:ReferencePath=%{dotnet_assembly_path}
44 done
45
46 %install
47 # Assemblies
48 mkdir -p %{buildroot}%{dotnet_assembly_path}
49 for ASM in %{Assemblies}; do
50 install -p -m 644 $ASM/bin/%{BUILDCONF}/$ASM.dll %{buildroot}%{dotnet_assembly_path}
51 done
52
53 # License
54 mkdir -p %{buildroot}%{_datadir}/license
55 cp LICENSE %{buildroot}%{_datadir}/license/%{name}
56
57 %files
58 %manifest %{name}.manifest
59 %attr(644,root,root) %{dotnet_assembly_path}/*.dll
60 %attr(644,root,root) %{_datadir}/license/%{name}