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