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