[Build] Specify dali version for rpm packaging
[platform/core/csapi/tizenfx.git] / packaging / csapi-tizenfx.spec.in
1
2 %define TIZEN_NET_API_VERSION @api_version@
3 %define TIZEN_NET_RPM_VERSION @rpm_version@
4 %define TIZEN_NET_NUGET_VERSION @nuget_version@
5 %define TIZEN_NET_INTERNAL_NUGET_VERSION @internal_nuget_version@
6 %define NATIVE_DALI_VERSION @dali_version@
7
8 %define DOTNET_ASSEMBLY_PATH /usr/share/dotnet.tizen/framework
9 %define DOTNET_ASSEMBLY_DUMMY_PATH %{DOTNET_ASSEMBLY_PATH}/ref
10 %define DOTNET_ASSEMBLY_RES_PATH %{DOTNET_ASSEMBLY_PATH}/res
11 %define DOTNET_NUGET_SOURCE /nuget
12
13 Name:       csapi-tizenfx
14 Summary:    Assemblies of Tizen .NET
15 Version:    %{TIZEN_NET_RPM_VERSION}
16 Release:    1
17 Group:      Development/Libraries
18 License:    Apache-2.0
19 URL:        https://www.tizen.org
20 Source0:    %{name}-%{version}.tar.gz
21 Source1:    %{name}.manifest
22
23 BuildArch:   noarch
24 ExcludeArch: aarch64
25 AutoReqProv: no
26
27 BuildRequires: dotnet-build-tools
28 Requires(post): /usr/bin/vconftool
29
30 BuildRequires: dali = %{NATIVE_DALI_VERSION}
31
32 %description
33 %{summary}
34
35 %package nuget
36 Summary:   NuGet package for %{name}
37 Group:     Development/Libraries
38 AutoReqProv: no
39
40 %description nuget
41 NuGet package for %{name}
42
43 %package dummy
44 Summary:   Dummy assemblies of Tizen .NET
45 Group:     Development/Libraries
46 AutoReqProv: no
47
48 %description dummy
49 Dummy assemblies of Tizen .NET
50
51 %package full
52 Summary:   All Tizen .NET assemblies
53 Group:     Development/Libraries
54 Requires:  %{name} = %{version}-%{release}
55 AutoReqProv: no
56
57 %description full
58 All Tizen .NET assemblies
59
60 %package debug
61 Summary:   All .pdb files of Tizen .NET
62 Group:     Development/Libraries
63 AutoReqProv: no
64
65 %description debug
66 All .pdb files of Tizen .NET
67
68 %package common
69 Summary:   Tizen .NET assemblies for Common profile
70 Group:     Development/Libraries
71 Requires:  %{name} = %{version}-%{release}
72 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
73 AutoReqProv: no
74
75 %description common
76 Tizen .NET assemblies for Common profile
77
78 %package mobile
79 Summary:   Tizen .NET assemblies for Mobile profile
80 Group:     Development/Libraries
81 Requires:  %{name} = %{version}-%{release}
82 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
83 AutoReqProv: no
84
85 %description mobile
86 Tizen .NET assemblies for Mobile profile
87
88 %package mobile-emul
89 Summary:   Tizen .NET assemblies for Emulator of Mobile profile
90 Group:     Development/Libraries
91 Requires:  %{name} = %{version}-%{release}
92 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
93 AutoReqProv: no
94
95 %description mobile-emul
96 Tizen .NET assemblies for Emulator of Mobile profile
97
98 %package tv
99 Summary:   Tizen .NET assemblies for TV profile
100 Group:     Development/Libraries
101 Requires:  %{name} = %{version}-%{release}
102 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
103 AutoReqProv: no
104
105 %description tv
106 Tizen .NET assemblies for TV profile
107
108 %package ivi
109 Summary:   Tizen .NET assemblies for IVI profile
110 Group:     Development/Libraries
111 Requires:  %{name} = %{version}-%{release}
112 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
113 AutoReqProv: no
114
115 %description ivi
116 Tizen .NET assemblies for IVI profile
117
118 %package wearable
119 Summary:   Tizen .NET assemblies for Wearable profile
120 Group:     Development/Libraries
121 Requires:  %{name} = %{version}-%{release}
122 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
123 AutoReqProv: no
124
125 %description wearable
126 Tizen .NET assemblies for Wearable profile
127
128 %prep
129 %setup -q
130 cp %{SOURCE1} .
131
132 %build
133
134 %define _tizenfx_bin_path Artifacts
135
136 GetFileList() {
137   PROFILE=$1
138   cat pkg/PlatformFileList.txt | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1 | sed "s#^#%{DOTNET_ASSEMBLY_PATH}/#"
139 }
140
141 GetFileList common > common.filelist
142 GetFileList mobile > mobile.filelist
143 GetFileList mobile-emul > mobile-emul.filelist
144 GetFileList tv > tv.filelist
145 GetFileList ivi > ivi.filelist
146 GetFileList wearable > wearable.filelist
147
148 rm -fr %{_tizenfx_bin_path}
149 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
150 ./build.sh --full
151 ./build.sh --dummy
152 ./build.sh --pack %{TIZEN_NET_NUGET_VERSION} %{TIZEN_NET_INTERNAL_NUGET_VERSION}
153
154 %install
155 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_PATH}
156 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
157 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
158 mkdir -p %{buildroot}%{DOTNET_NUGET_SOURCE}
159
160 # Install Runtime Assemblies
161 install -p -m 644 %{_tizenfx_bin_path}/bin/public/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
162 install -p -m 644 %{_tizenfx_bin_path}/bin/internal/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
163
164 # Install Debug Symbols
165 install -p -m 644 %{_tizenfx_bin_path}/bin/public/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
166 install -p -m 644 %{_tizenfx_bin_path}/bin/internal/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
167
168 # Install Resource files
169 [ -d %{_tizenfx_bin_path}/bin/public/res ] \
170   && install -p -m 644 %{_tizenfx_bin_path}/bin/public/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
171 [ -d %{_tizenfx_bin_path}/bin/internal/res ] \
172   && install -p -m 644 %{_tizenfx_bin_path}/bin/internal/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
173
174 # Install Dummy Assemblies
175 install -p -m 644 %{_tizenfx_bin_path}/bin/dummy/*.dll %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
176
177 # Install NuGet Packages
178 install -p -m 644 %{_tizenfx_bin_path}/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}
179
180 %post
181 /usr/bin/vconftool set -t int db/dotnet/tizen_api_version %{TIZEN_NET_API_VERSION} -f
182
183
184 %files
185 %license LICENSE
186
187 %files nuget
188 %{DOTNET_NUGET_SOURCE}/*.nupkg
189
190 %files dummy
191 %attr(644,root,root) %{DOTNET_ASSEMBLY_DUMMY_PATH}/*.dll
192
193 %files full
194 %manifest %{name}.manifest
195 %attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.dll
196 %attr(644,root,root) %{DOTNET_ASSEMBLY_RES_PATH}/*
197
198 %files debug
199 %attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.pdb
200
201 %files common -f common.filelist
202 %manifest %{name}.manifest
203
204 %files mobile -f mobile.filelist
205 %manifest %{name}.manifest
206
207 %files mobile-emul -f mobile-emul.filelist
208 %manifest %{name}.manifest
209
210 %files tv -f tv.filelist
211 %manifest %{name}.manifest
212
213 %files ivi -f ivi.filelist
214 %manifest %{name}.manifest
215
216 %files wearable -f wearable.filelist
217 %manifest %{name}.manifest