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