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