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