Release 8.0.0.15316
[platform/core/csapi/tizenfx.git] / packaging / csapi-tizenfx.spec
1 # Auto-generated from csapi-tizenfx.spec.in by makespec.sh
2
3 %define TIZEN_NET_API_VERSION 8
4 %define TIZEN_NET_RPM_VERSION 8.0.0.15316+nui550
5 %define TIZEN_NET_NUGET_VERSION 8.0.0.15316
6
7 %define DOTNET_ASSEMBLY_PATH /usr/share/dotnet.tizen/framework
8 %define DOTNET_ASSEMBLY_DUMMY_PATH %{DOTNET_ASSEMBLY_PATH}/ref
9 %define DOTNET_ASSEMBLY_RES_PATH %{DOTNET_ASSEMBLY_PATH}/res
10 %define DOTNET_TOOLS_PATH /usr/share/dotnet.tizen/tools
11 %define DOTNET_PRELOAD_PATH /usr/share/dotnet.tizen/preload
12 %define DOTNET_NUGET_SOURCE /nuget
13
14 %define TIZEN_NET_RUNTIME_IDENTIFIERS 4.0.0:5.0.0:5.5.0:6.0.0
15
16 Name:       csapi-tizenfx
17 Summary:    Assemblies of Tizen .NET
18 Version:    %{TIZEN_NET_RPM_VERSION}
19 Release:    1
20 Group:      Development/Libraries
21 License:    Apache-2.0 and MIT
22 URL:        https://www.tizen.org
23 Source0:    %{name}-%{version}.tar.gz
24 Source1:    %{name}.manifest
25
26 BuildArch:   noarch
27 ExcludeArch: aarch64
28 AutoReqProv: no
29
30 BuildRequires: dotnet-build-tools
31 Requires(post): /usr/bin/vconftool
32
33 # BuildRequires for StructValidator
34 BuildRequires: coregl
35 BuildRequires: pkgconfig(elementary)
36 BuildRequires: pkgconfig(efl-extension)
37 BuildRequires: pkgconfig(capi-media-camera)
38 BuildRequires: pkgconfig(rua)
39 BuildRequires: pkgconfig(component-based-core-base)
40 BuildRequires: pkgconfig(notification)
41 BuildRequires: pkgconfig(capi-appfw-service-application)
42 BuildRequires: pkgconfig(capi-appfw-application)
43 BuildRequires: pkgconfig(capi-appfw-widget-application)
44 %if "%{profile}" != "tv"
45 BuildRequires: pkgconfig(capi-appfw-watch-application)
46 %endif
47 BuildRequires: pkgconfig(data-control)
48 BuildRequires: pkgconfig(capi-location-manager)
49 BuildRequires: pkgconfig(capi-media-vision)
50 BuildRequires: pkgconfig(capi-network-bluetooth)
51 BuildRequires: pkgconfig(capi-network-wifi-direct)
52 BuildRequires: pkgconfig(key-manager)
53 %if "%{profile}" == "tv"
54 BuildRequires: pkgconfig(trustzone-nwd)
55 %else
56 BuildRequires: pkgconfig(tef-libteec)
57 %endif
58 BuildRequires: pkgconfig(capi-system-sensor)
59 BuildRequires: pkgconfig(capi-system-runtime-info)
60 BuildRequires: pkgconfig(capi-telephony)
61 BuildRequires: pkgconfig(capi-ui-inputmethod)
62 BuildRequires: pkgconfig(stt-engine)
63 BuildRequires: pkgconfig(tts-engine)
64 BuildRequires: pkgconfig(chromium-efl)
65
66
67 %description
68 %{summary}
69
70 %package nuget
71 Summary:   NuGet package for %{name}
72 Group:     Development/Libraries
73 AutoReqProv: no
74
75 %description nuget
76 NuGet package for %{name}
77
78 %package tools
79 Summary:   Tools for TizenFX
80 Group:     Development/Libraries
81 AutoReqProv: no
82
83 %description tools
84 Tools for TizenFX
85
86 %package dummy
87 Summary:   not used package
88 Group:     Development/Libraries
89 AutoReqProv: no
90
91 %description dummy
92 not used package
93
94 %package full
95 Summary:   All Tizen .NET assemblies
96 Group:     Development/Libraries
97 Requires:  %{name} = %{version}-%{release}
98 AutoReqProv: no
99
100 %description full
101 All Tizen .NET assemblies
102
103 %package debug
104 Summary:   All .pdb files of Tizen .NET
105 Group:     Development/Libraries
106 AutoReqProv: no
107
108 %description debug
109 All .pdb files of Tizen .NET
110
111 %package common
112 Summary:   Tizen .NET assemblies for Common profile
113 Group:     Development/Libraries
114 Requires:  %{name} = %{version}-%{release}
115 AutoReqProv: no
116
117 %description common
118 Tizen .NET assemblies for Common profile
119
120 %package mobile
121 Summary:   Tizen .NET assemblies for Mobile profile
122 Group:     Development/Libraries
123 Requires:  %{name} = %{version}-%{release}
124 AutoReqProv: no
125
126 %description mobile
127 Tizen .NET assemblies for Mobile profile
128
129 %package mobile-emul
130 Summary:   Tizen .NET assemblies for Emulator of Mobile profile
131 Group:     Development/Libraries
132 Requires:  %{name} = %{version}-%{release}
133 AutoReqProv: no
134
135 %description mobile-emul
136 Tizen .NET assemblies for Emulator of Mobile profile
137
138 %package tv
139 Summary:   Tizen .NET assemblies for TV profile
140 Group:     Development/Libraries
141 Requires:  %{name} = %{version}-%{release}
142 AutoReqProv: no
143
144 %description tv
145 Tizen .NET assemblies for TV profile
146
147 %package wearable
148 Summary:   Tizen .NET assemblies for Wearable profile
149 Group:     Development/Libraries
150 Requires:  %{name} = %{version}-%{release}
151 AutoReqProv: no
152
153 %description wearable
154 Tizen .NET assemblies for Wearable profile
155
156 %prep
157 %setup -q
158 cp %{SOURCE1} .
159
160 %build
161 %{?asan:export ASAN_OPTIONS=use_sigaltstack=false:allow_user_segv_handler=true:handle_sigfpe=false:`cat /ASAN_OPTIONS`}
162
163 %define _tizenfx_bin_path Artifacts
164
165 rm -fr %{_tizenfx_bin_path}
166 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
167
168 %define build_cmd ./tools/scripts/retry.sh ./tools/scripts/timeout.sh -t 600 ./build.sh
169 %if %{defined profile}
170 %{build_cmd} --full /p:BuildProfile=%{profile}
171 %else
172 %{build_cmd} --full
173 %endif
174 %{build_cmd} --pack %{TIZEN_NET_NUGET_VERSION}
175
176 dotnet validate-struct %{_tizenfx_bin_path}/bin/public || echo "
177     #######################################################
178     ##################### W A R N I N G ###################
179     #######################################################
180     # The sturct size mismatches MUST BE FIXED.           #
181     # It will make building errors later                  #
182     #######################################################
183 "
184
185
186 # Generate filelist for rpm packaging
187 GetFileList() {
188   PROFILE=$1
189   cat packaging/PlatformFileList.txt | grep -v "\.preload" | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1 | sed "s#^#%{DOTNET_ASSEMBLY_PATH}/#"
190   for f in $(cat packaging/PlatformFileList.txt | grep -v -E "#$PROFILE[[:space:]]|#$PROFILE$|\.preload" | cut -d# -f1); do
191     if [ -f %{_tizenfx_bin_path}/bin/dummy/$f ]; then
192       echo "%{DOTNET_ASSEMBLY_PATH}/ref/$f"
193     fi
194   done
195   for f in $(cat packaging/PlatformFileList.txt | grep "\.preload" | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1); do
196     if [ -f packaging/preload/$f ]; then
197       echo "%{DOTNET_PRELOAD_PATH}/$f"
198     fi
199   done
200 }
201
202 GetFileList common > common.filelist
203 GetFileList mobile > mobile.filelist
204 GetFileList mobile-emul > mobile-emul.filelist
205 GetFileList tv > tv.filelist
206 GetFileList wearable > wearable.filelist
207
208 %install
209 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_PATH}
210 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
211 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
212 mkdir -p %{buildroot}%{DOTNET_NUGET_SOURCE}
213 mkdir -p %{buildroot}%{DOTNET_TOOLS_PATH}
214 mkdir -p %{buildroot}%{DOTNET_PRELOAD_PATH}
215
216 # Install Runtime Assemblies
217 install -p -m 644 %{_tizenfx_bin_path}/bin/public/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
218 install -p -m 644 %{_tizenfx_bin_path}/bin/internal/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
219
220 # Install Debug Symbols
221 install -p -m 644 %{_tizenfx_bin_path}/bin/public/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
222 install -p -m 644 %{_tizenfx_bin_path}/bin/internal/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
223
224 # Install Resource files
225 [ -d %{_tizenfx_bin_path}/bin/public/res ] \
226   && install -p -m 644 %{_tizenfx_bin_path}/bin/public/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
227 [ -d %{_tizenfx_bin_path}/bin/internal/res ] \
228   && install -p -m 644 %{_tizenfx_bin_path}/bin/internal/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
229
230 # Install Dummy Assemblies
231 install -p -m 644 %{_tizenfx_bin_path}/bin/dummy/*.dll %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
232
233 # Install NuGet Packages
234 install -p -m 644 %{_tizenfx_bin_path}/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}
235 install -p -m 644 packaging/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}
236
237 # Install Tools
238 install -p -m 644 tools/bin/* %{buildroot}%{DOTNET_TOOLS_PATH}
239
240 # Install Preload
241 install -p -m 644 packaging/preload/*.preload %{buildroot}%{DOTNET_PRELOAD_PATH}
242
243 %post
244 /usr/bin/vconftool set -t int db/dotnet/tizen_api_version %{TIZEN_NET_API_VERSION} -f
245 /usr/bin/vconftool set -t string db/dotnet/tizen_api_path %{DOTNET_ASSEMBLY_PATH} -f
246 /usr/bin/vconftool set -t string db/dotnet/tizen_rid_version %{TIZEN_NET_RUNTIME_IDENTIFIERS} -f
247
248 %files
249 %license LICENSE
250 %license LICENSE.MIT
251
252 %files nuget
253 %{DOTNET_NUGET_SOURCE}/*.nupkg
254
255 %files tools
256 %manifest %{name}.manifest
257 %{DOTNET_TOOLS_PATH}/*
258
259 %files dummy
260
261 %files full
262 %manifest %{name}.manifest
263 %attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.dll
264 %attr(644,root,root) %{DOTNET_ASSEMBLY_DUMMY_PATH}/*.dll
265 %attr(644,root,root) %{DOTNET_ASSEMBLY_RES_PATH}/*
266
267 %files debug
268 %manifest %{name}.manifest
269 %attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.pdb
270
271 %files common -f common.filelist
272 %manifest %{name}.manifest
273
274 %files mobile -f mobile.filelist
275 %manifest %{name}.manifest
276
277 %files mobile-emul -f mobile-emul.filelist
278 %manifest %{name}.manifest
279
280 %files tv -f tv.filelist
281 %manifest %{name}.manifest
282
283 %files wearable -f wearable.filelist
284 %manifest %{name}.manifest