Release 7.0.0.15169
[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 7
4 %define TIZEN_NET_RPM_VERSION 7.0.0.15169+nui550
5 %define TIZEN_NET_NUGET_VERSION 7.0.0.15169
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
15
16 %define UPGRADE_SCRIPT_PATH /usr/share/upgrade/scripts
17
18 Name:       csapi-tizenfx
19 Summary:    Assemblies of Tizen .NET
20 Version:    %{TIZEN_NET_RPM_VERSION}
21 Release:    1
22 Group:      Development/Libraries
23 License:    Apache-2.0 and MIT
24 URL:        https://www.tizen.org
25 Source0:    %{name}-%{version}.tar.gz
26 Source1:    %{name}.manifest
27
28 BuildArch:   noarch
29 ExcludeArch: aarch64
30 AutoReqProv: no
31
32 BuildRequires: dotnet-build-tools
33 Requires(post): /usr/bin/vconftool
34
35 %description
36 %{summary}
37
38 %package nuget
39 Summary:   NuGet package for %{name}
40 Group:     Development/Libraries
41 AutoReqProv: no
42
43 %description nuget
44 NuGet package for %{name}
45
46 %package tools
47 Summary:   Tools for TizenFX
48 Group:     Development/Libraries
49 AutoReqProv: no
50
51 %description tools
52 Tools for TizenFX
53
54 %package dummy
55 Summary:   not used package
56 Group:     Development/Libraries
57 AutoReqProv: no
58
59 %description dummy
60 not used package
61
62 %package full
63 Summary:   All Tizen .NET assemblies
64 Group:     Development/Libraries
65 Requires:  %{name} = %{version}-%{release}
66 AutoReqProv: no
67
68 %description full
69 All Tizen .NET assemblies
70
71 %package debug
72 Summary:   All .pdb files of Tizen .NET
73 Group:     Development/Libraries
74 AutoReqProv: no
75
76 %description debug
77 All .pdb files of Tizen .NET
78
79 %package common
80 Summary:   Tizen .NET assemblies for Common profile
81 Group:     Development/Libraries
82 Requires:  %{name} = %{version}-%{release}
83 AutoReqProv: no
84
85 %description common
86 Tizen .NET assemblies for Common profile
87
88 %package mobile
89 Summary:   Tizen .NET assemblies for Mobile profile
90 Group:     Development/Libraries
91 Requires:  %{name} = %{version}-%{release}
92 AutoReqProv: no
93
94 %description mobile
95 Tizen .NET assemblies for Mobile profile
96
97 %package mobile-emul
98 Summary:   Tizen .NET assemblies for Emulator of Mobile profile
99 Group:     Development/Libraries
100 Requires:  %{name} = %{version}-%{release}
101 AutoReqProv: no
102
103 %description mobile-emul
104 Tizen .NET assemblies for Emulator of Mobile profile
105
106 %package tv
107 Summary:   Tizen .NET assemblies for TV profile
108 Group:     Development/Libraries
109 Requires:  %{name} = %{version}-%{release}
110 AutoReqProv: no
111
112 %description tv
113 Tizen .NET assemblies for TV profile
114
115 %package wearable
116 Summary:   Tizen .NET assemblies for Wearable profile
117 Group:     Development/Libraries
118 Requires:  %{name} = %{version}-%{release}
119 AutoReqProv: no
120
121 %description wearable
122 Tizen .NET assemblies for Wearable profile
123
124 %prep
125 %setup -q
126 cp %{SOURCE1} .
127
128 %build
129 %{?asan:export ASAN_OPTIONS=use_sigaltstack=false:allow_user_segv_handler=true:handle_sigfpe=false:`cat /ASAN_OPTIONS`}
130
131 %define _tizenfx_bin_path Artifacts
132
133 rm -fr %{_tizenfx_bin_path}
134 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
135
136 %define build_cmd ./tools/scripts/retry.sh ./tools/scripts/timeout.sh -t 600 ./build.sh
137 %{build_cmd} --full
138 %{build_cmd} --pack %{TIZEN_NET_NUGET_VERSION}
139
140 GetFileList() {
141   PROFILE=$1
142   cat packaging/PlatformFileList.txt | grep -v "\.preload" | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1 | sed "s#^#%{DOTNET_ASSEMBLY_PATH}/#"
143   for f in $(cat packaging/PlatformFileList.txt | grep -v -E "#$PROFILE[[:space:]]|#$PROFILE$|\.preload" | cut -d# -f1); do
144     if [ -f %{_tizenfx_bin_path}/bin/dummy/$f ]; then
145       echo "%{DOTNET_ASSEMBLY_PATH}/ref/$f"
146     fi
147   done
148   for f in $(cat packaging/PlatformFileList.txt | grep "\.preload" | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1); do
149     if [ -f packaging/preload/$f ]; then
150       echo "%{DOTNET_PRELOAD_PATH}/$f"
151     fi
152   done
153 }
154
155 GetFileList common > common.filelist
156 GetFileList mobile > mobile.filelist
157 GetFileList mobile-emul > mobile-emul.filelist
158 GetFileList tv > tv.filelist
159 GetFileList wearable > wearable.filelist
160
161 %install
162 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_PATH}
163 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
164 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
165 mkdir -p %{buildroot}%{DOTNET_NUGET_SOURCE}
166 mkdir -p %{buildroot}%{DOTNET_TOOLS_PATH}
167 mkdir -p %{buildroot}%{DOTNET_PRELOAD_PATH}
168
169 # Install Runtime Assemblies
170 install -p -m 644 %{_tizenfx_bin_path}/bin/public/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
171 install -p -m 644 %{_tizenfx_bin_path}/bin/internal/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
172
173 # Install Debug Symbols
174 install -p -m 644 %{_tizenfx_bin_path}/bin/public/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
175 install -p -m 644 %{_tizenfx_bin_path}/bin/internal/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
176
177 # Install Resource files
178 [ -d %{_tizenfx_bin_path}/bin/public/res ] \
179   && install -p -m 644 %{_tizenfx_bin_path}/bin/public/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
180 [ -d %{_tizenfx_bin_path}/bin/internal/res ] \
181   && install -p -m 644 %{_tizenfx_bin_path}/bin/internal/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
182
183 # Install Dummy Assemblies
184 install -p -m 644 %{_tizenfx_bin_path}/bin/dummy/*.dll %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
185
186 # Install NuGet Packages
187 install -p -m 644 %{_tizenfx_bin_path}/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}
188 install -p -m 644 packaging/depends/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}
189
190 # Install Tools
191 install -p -m 644 tools/bin/* %{buildroot}%{DOTNET_TOOLS_PATH}
192
193 # Install Preload
194 install -p -m 644 packaging/preload/*.preload %{buildroot}%{DOTNET_PRELOAD_PATH}
195
196 # Install Upgrade Script
197 mkdir -p %{buildroot}%{UPGRADE_SCRIPT_PATH}
198 install -p -m 755 packaging/500.tizenfx_upgrade.sh %{buildroot}%{UPGRADE_SCRIPT_PATH}
199
200 %post
201 /usr/bin/vconftool set -t int db/dotnet/tizen_api_version %{TIZEN_NET_API_VERSION} -f
202 /usr/bin/vconftool set -t string db/dotnet/tizen_api_path %{DOTNET_ASSEMBLY_PATH} -f
203 /usr/bin/vconftool set -t string db/dotnet/tizen_rid_version %{TIZEN_NET_RUNTIME_IDENTIFIERS} -f
204
205 %files
206 %license LICENSE
207 %license LICENSE.MIT
208 %attr(0755,root,root) %{UPGRADE_SCRIPT_PATH}/500.tizenfx_upgrade.sh
209
210 %files nuget
211 %{DOTNET_NUGET_SOURCE}/*.nupkg
212
213 %files tools
214 %manifest %{name}.manifest
215 %{DOTNET_TOOLS_PATH}/*
216
217 %files dummy
218
219 %files full
220 %manifest %{name}.manifest
221 %attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.dll
222 %attr(644,root,root) %{DOTNET_ASSEMBLY_DUMMY_PATH}/*.dll
223 %attr(644,root,root) %{DOTNET_ASSEMBLY_RES_PATH}/*
224
225 %files debug
226 %manifest %{name}.manifest
227 %attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.pdb
228
229 %files common -f common.filelist
230 %manifest %{name}.manifest
231
232 %files mobile -f mobile.filelist
233 %manifest %{name}.manifest
234
235 %files mobile-emul -f mobile-emul.filelist
236 %manifest %{name}.manifest
237
238 %files tv -f tv.filelist
239 %manifest %{name}.manifest
240
241 %files wearable -f wearable.filelist
242 %manifest %{name}.manifest