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