Release 8.0.0.15627
[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.15627+nui21932
5 %define TIZEN_NET_NUGET_VERSION 8.0.0.15627
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:6.0.0
15 %define TIZEN_NET_TARGET_FRAMEWORK_MONIKERS tizen80:tizen70:tizen60:tizen50:tizen40:netstandard2.0
16
17 Name:       csapi-tizenfx
18 Summary:    Assemblies of Tizen .NET
19 Version:    %{TIZEN_NET_RPM_VERSION}
20 Release:    1
21 Group:      Development/Libraries
22 License:    Apache-2.0 and MIT
23 URL:        https://www.tizen.org
24 Source0:    %{name}-%{version}.tar.gz
25 Source1:    %{name}.manifest
26
27 BuildArch:   noarch
28 ExcludeArch: aarch64
29 AutoReqProv: no
30
31 BuildRequires: dotnet-build-tools
32 Requires(post): /usr/bin/vconftool
33
34 # BuildRequires for StructValidator
35 %if %{defined enable_struct_test}
36 BuildRequires: coregl
37 BuildRequires: pkgconfig(elementary)
38 BuildRequires: pkgconfig(efl-extension)
39 BuildRequires: pkgconfig(capi-media-camera)
40 BuildRequires: pkgconfig(rua)
41 BuildRequires: pkgconfig(component-based-core-base)
42 BuildRequires: pkgconfig(notification)
43 BuildRequires: pkgconfig(capi-appfw-service-application)
44 BuildRequires: pkgconfig(capi-appfw-application)
45 BuildRequires: pkgconfig(capi-appfw-widget-application)
46 BuildRequires: pkgconfig(data-control)
47 BuildRequires: pkgconfig(capi-location-manager)
48 BuildRequires: pkgconfig(capi-media-vision)
49 BuildRequires: pkgconfig(capi-network-bluetooth)
50 BuildRequires: pkgconfig(capi-network-wifi-direct)
51 BuildRequires: pkgconfig(key-manager)
52 BuildRequires: pkgconfig(capi-system-sensor)
53 BuildRequires: pkgconfig(capi-system-runtime-info)
54 BuildRequires: pkgconfig(capi-ui-inputmethod)
55 BuildRequires: pkgconfig(stt-engine)
56 BuildRequires: pkgconfig(tts-engine)
57 BuildRequires: pkgconfig(chromium-efl)
58 %if "%{profile}" == "tv"
59 BuildRequires: pkgconfig(trustzone-nwd)
60 %else
61 BuildRequires: pkgconfig(capi-appfw-watch-application)
62 BuildRequires: pkgconfig(capi-telephony)
63 BuildRequires: pkgconfig(tef-libteec)
64 %endif
65 %endif
66
67 %description
68 %{summary}
69
70 %package nuget
71 Summary:   NuGet package for %{name}
72 Group:     Development/Libraries
73 AutoReqProv: no
74
75 %description nuget
76 NuGet package for %{name}
77
78 %package tools
79 Summary:   Tools for TizenFX
80 Group:     Development/Libraries
81 AutoReqProv: no
82
83 %description tools
84 Tools for TizenFX
85
86 %package dummy
87 Summary:   not used package
88 Group:     Development/Libraries
89 AutoReqProv: no
90
91 %description dummy
92 not used package
93
94 %package full
95 Summary:   All Tizen .NET assemblies
96 Group:     Development/Libraries
97 Requires:  %{name} = %{version}-%{release}
98 AutoReqProv: no
99
100 %description full
101 All Tizen .NET assemblies
102
103 %package debug
104 Summary:   All .pdb files of Tizen .NET
105 Group:     Development/Libraries
106 AutoReqProv: no
107
108 %description debug
109 All .pdb files of Tizen .NET
110
111 %package mobile
112 Summary:   Tizen .NET assemblies for Mobile profile
113 Group:     Development/Libraries
114 Requires:  %{name} = %{version}-%{release}
115 AutoReqProv: no
116
117 %description mobile
118 Tizen .NET assemblies for Mobile profile
119
120 %package tv
121 Summary:   Tizen .NET assemblies for TV profile
122 Group:     Development/Libraries
123 Requires:  %{name} = %{version}-%{release}
124 AutoReqProv: no
125
126 %description tv
127 Tizen .NET assemblies for TV profile
128
129 %package wearable
130 Summary:   Tizen .NET assemblies for Wearable profile
131 Group:     Development/Libraries
132 Requires:  %{name} = %{version}-%{release}
133 AutoReqProv: no
134
135 %description wearable
136 Tizen .NET assemblies for Wearable profile
137
138 %prep
139 %setup -q
140 cp %{SOURCE1} .
141
142 %build
143
144 # configure for ASAN
145 %{?asan:export ASAN_OPTIONS=use_sigaltstack=false:allow_user_segv_handler=true:handle_sigfpe=false:`cat /ASAN_OPTIONS`}
146
147 # prepare for build
148 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
149 %define build_cmd ./tools/scripts/retry.sh ./tools/scripts/timeout.sh -t 600 ./build.sh
150
151 # build full assemblies
152 %if %{defined profile}
153 %{build_cmd} --full /p:BuildProfile=%{profile}
154 %else
155 %{build_cmd} --full
156 %endif
157
158 # pack nuget package
159 %{build_cmd} --pack %{TIZEN_NET_NUGET_VERSION}
160
161 # check validation of struct size
162 %if %{defined enable_struct_test}
163 dotnet validate-struct Artifacts/bin/public || echo "
164     #######################################################
165     ##################### W A R N I N G ###################
166     #######################################################
167     # The sturct size mismatches MUST BE FIXED.           #
168     # It will make building errors later                  #
169     #######################################################
170 "
171 %endif
172
173
174 %install
175 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_PATH}
176 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
177 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
178 mkdir -p %{buildroot}%{DOTNET_NUGET_SOURCE}
179 mkdir -p %{buildroot}%{DOTNET_TOOLS_PATH}
180 mkdir -p %{buildroot}%{DOTNET_PRELOAD_PATH}
181
182 # Install Runtime Assemblies
183 install -p -m 644 Artifacts/bin/public/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
184 install -p -m 644 Artifacts/bin/internal/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
185
186 # Install Debug Symbols
187 install -p -m 644 Artifacts/bin/public/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
188 install -p -m 644 Artifacts/bin/internal/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
189
190 # Install Resource files
191 [ -d Artifacts/bin/public/res ] \
192   && cp -fr Artifacts/bin/public/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
193 [ -d Artifacts/bin/internal/res ] \
194   && cp -fr Artifacts/bin/internal/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
195
196 # Install Dummy Assemblies
197 install -p -m 644 Artifacts/bin/dummy/*.dll %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
198
199 # Install Preload
200 install -p -m 644 Artifacts/preload/*.preload %{buildroot}%{DOTNET_PRELOAD_PATH}
201
202 # Install NuGet Packages
203 install -p -m 644 Artifacts/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}
204 install -p -m 644 packaging/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}
205
206 # Install Tools
207 install -p -m 644 tools/bin/* %{buildroot}%{DOTNET_TOOLS_PATH}
208
209
210 %post
211 /usr/bin/vconftool set -t int db/dotnet/tizen_api_version %{TIZEN_NET_API_VERSION} -f
212 /usr/bin/vconftool set -t string db/dotnet/tizen_api_path %{DOTNET_ASSEMBLY_PATH} -f
213 /usr/bin/vconftool set -t string db/dotnet/tizen_rid_version %{TIZEN_NET_RUNTIME_IDENTIFIERS} -f
214 /usr/bin/vconftool set -t string db/dotnet/tizen_tfm_support %{TIZEN_NET_TARGET_FRAMEWORK_MONIKERS} -f
215
216 %files
217 %license LICENSE
218 %license LICENSE.MIT
219
220 %files nuget
221 %{DOTNET_NUGET_SOURCE}/*.nupkg
222
223 %files tools
224 %manifest %{name}.manifest
225 %{DOTNET_TOOLS_PATH}/*
226
227 %files dummy
228
229 %files full
230 %manifest %{name}.manifest
231 %defattr(644,root,root,755)
232 %{DOTNET_ASSEMBLY_PATH}/*.dll
233 %{DOTNET_ASSEMBLY_DUMMY_PATH}/*.dll
234 %{DOTNET_ASSEMBLY_RES_PATH}/*
235 %{DOTNET_PRELOAD_PATH}/*
236
237 %files debug
238 %manifest %{name}.manifest
239 %attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.pdb
240
241 %files mobile -f Artifacts/mobile.filelist
242 %manifest %{name}.manifest
243
244 %files tv -f Artifacts/tv.filelist
245 %manifest %{name}.manifest
246
247 %files wearable -f Artifacts/wearable.filelist
248 %manifest %{name}.manifest