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