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