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