tizen-unified_20211205.1
[scm/meta/build-config.git] / unified / emulator_build.conf
1 %define _project Tizen:Unified
2
3 ### from Tizen:Base
4 %define _repository standard
5
6 Macros:
7 %vendor obs://private/Tizen:Unified
8 %_project Tizen:Unified
9
10 ### from Tizen:Base
11
12 %_repository standard
13 :Macros
14
15 ################################################################################
16 # OBS Project config for Tizen:Base
17 #
18 # RE contacts:
19 #
20 #
21 # vim: set syntax=spec:
22 ################################################################################
23
24 Patterntype: rpm-md comps
25 Release: <CI_CNT>.<B_CNT>
26 Support: build
27 Support: build-compare build-mkbaselibs
28 # Support: rpmlint-mini rpmlint-tizen
29
30 ############################# conflicts resolution #############################
31
32 Prefer: util-linux
33 Prefer: mono-wcf
34 Prefer: monodoc
35 Prefer: mono-extras
36 Prefer: mono-web
37 Prefer: mono-data
38 Prefer: mono-mvc
39 Prefer: mono-winforms
40 Prefer: mono-data-sqlite
41
42 # Set a preference for ambiguous libs to use *-64bit libs
43 #     *-64bit libs on 32bit build environment are required for .Net build (e.g., coreclr, corefx)
44 #     But when building 64bit target, they could make 'have choice' error with original libs in 64bit repository.
45 #     e.g., libstdc++ and libstdc++-64bit provides same libs. It's ambiguous to choose appropriate one.
46 #     Owner : Jiyoung Yun (jy910.yun@samsung.com)
47 #     libopenssl11 : Dongsun Lee (ds73.lee@samsung.com)
48 Prefer: libgcc libstdc++ libunwind libuuid zlib libopenssl libopenssl11
49
50 ############################# base definition ###############################
51
52 # %release_name and %tizen_full_version are used in platform/upstream/tizen-release
53
54 Macros:
55 %release_name Tizen7/Unified
56
57 %tizen_version_major 7
58 %tizen_version_minor 0
59 %tizen_version_patch 0
60
61 %tizen_version %{tizen_version_major}.%{tizen_version_minor}
62 %tizen_full_version %{tizen_version}.%{tizen_version_patch}
63 %tizen %tizen_version
64 %vendor tizen
65 %_vendor tizen
66 %_with_tizen 1
67
68 #### %__spec_check_pre exit 0
69 #### %run_check_section 0
70
71 %opensuse_bs 1
72 %_default_patch_fuzz   2
73
74 %_binary_payload w5T.xzdio
75 :Macros
76
77
78 ############################# build config #####################################
79
80 ########## targets ##########
81
82 %ifarch i586
83 Target: i686-tizen-linux
84 %endif
85
86 %ifarch armv7hl
87 Target: armv7hl-tizen-linux
88 %endif
89
90 %ifarch armv7l
91 Target: armv7l-tizen-linux
92 %endif
93
94 %ifarch aarch64
95 Target: aarch64-tizen-linux
96 %endif
97
98 ########## cross build ##########
99
100 %define build_hostarch x86_64
101 Macros:
102 %build_hostarch x86_64
103 :Macros
104
105 %ifarch %arm armv7l armv7hl aarch64
106 Hostarch: x86_64
107 # cross build support for the build hosts
108 Preinstall: qemu-linux-user-%{build_hostarch}-cross
109 Runscripts: qemu-linux-user-%{build_hostarch}-cross
110 Keep: qemu-linux-user-%{build_hostarch}-cross
111 Macros:
112 %qemu_user_space_build 1
113 :Macros
114 %endif
115
116 %ifarch armv7l
117 Preinstall: qemu-accel-%{build_hostarch}-armv7l
118 Runscripts: qemu-accel-%{build_hostarch}-armv7l
119 Preinstall: libmount libblkid libuuid
120 %endif
121
122 %ifarch armv7hl
123 Preinstall: qemu-accel-%{build_hostarch}-armv7hl
124 Runscripts: qemu-accel-%{build_hostarch}-armv7hl
125 Preinstall: libmount libblkid libuuid
126 %endif
127
128 %ifarch aarch64
129 Preinstall: qemu-accel-%{build_hostarch}-aarch64
130 Runscripts: qemu-accel-%{build_hostarch}-aarch64
131 Preinstall: libmount libblkid libuuid
132 %endif # aarch64
133
134 Substitute: python-accel-armv7l-cross-arm python-accel-%{build_hostarch}-armv7l
135 Substitute: python-accel-armv7hl-cross-arm python-accel-%{build_hostarch}-armv7hl
136 Substitute: python-accel-aarch64-cross-aarch64 python-accel-%{build_hostarch}-aarch64
137
138 Substitute: clang-accel-armv7l-cross-arm clang-accel-%{build_hostarch}-armv7l
139 Substitute: clang-accel-armv7hl-cross-arm clang-accel-%{build_hostarch}-armv7hl
140 Substitute: clang-accel-aarch64-cross-aarch64 clang-accel-%{build_hostarch}-aarch64
141
142 ########## exports for different architectures ##########
143
144 ExportFilter: \.armv7l\.rpm$ armv7l
145 ExportFilter: \.armv7hl\.rpm$ armv7hl
146 ExportFilter: \.aarch64\.rpm$ aarch64
147 ExportFilter: \.i586\.rpm$ i586
148 ExportFilter: \.x86_64\.rpm$ x86_64
149
150 ########## buildroot config ##########
151
152 Preinstall: setup filesystem
153 RunScripts: setup
154
155 Preinstall: bash bzip2 coreutils diffutils grep rpm
156 Preinstall: glibc libacl libattr
157 Preinstall: libcap
158 Preinstall: libgcc
159 Preinstall: libpopt sed tar zlib
160 Preinstall: libncurses libreadline
161 Preinstall: libelf libbz2
162 Preinstall: liblzma
163 Preinstall: nss nspr libfreebl3 libsoftokn3
164 Preinstall: libmagic
165 Preinstall: liblua
166 Preinstall: smack libsmack libxml2 libmagic  libmagic-data
167 Preinstall: libsqlite
168 #Preinstall: rpm-security-plugin
169 Preinstall: util-linux util-linux-su
170 Preinstall: libzstd1
171
172 VMinstall: perl libmount libblkid libext2fs libuuid  grep libpcre util-linux libsmartcols procps-ng
173
174 Required: binutils gcc glibc rpm-build libtool
175 Required: gcc-c++
176
177 Support: glibc-locale
178 Support: perl
179 Support: hostname
180 Support: cpio findutils
181 Support: file findutils zlib bzip2
182 Support: gzip hostname net-tools
183 Support: make  patch sed  gawk tar grep coreutils pkg-config
184 Support: m4  tzdata
185 Support: util-linux
186 Support: less
187 Support: which  elfutils
188 Support: update-alternatives
189 Support: libstdc++-devel
190 Support: cpp
191 Support: libatomic
192 Support: libgomp
193 Support: libitm
194
195 Keep: libstdc++-devel
196 Keep: cpp gcc libstdc++
197 Keep: pam
198 Keep: binutils cpp  libmagic-data file findutils gawk gcc  gcc-c++
199 Keep: gdbm gzip libada libunwind  glibc-devel libpcre xz-lzma-compat
200 Keep: make  gmp libcap groff cpio
201 Keep: patch rpm-build  nss nspr elfutils python grep libgcc gcc-c++
202 Keep: kernel-headers  perl-libs perl
203 Keep: pkgconfig glib2 tizen-rpm-config
204 Keep: libmpc libmpfr libppl libgmp libppl_c
205 Keep: libcloog libppl libgmpxx
206 Keep: nss-softokn-freebl libmagic libmagic-data
207 Keep: setup
208 Keep: update-alternatives
209 Keep: cpp
210 Keep: gcc-c++
211 Keep: libatomic
212 Keep: libgomp
213 Keep: libitm
214
215 Substitute: gettext gettext-tools
216
217 %ifarch x86_64
218 Substitute: glibc-devel-32bit glibc-devel-32bit glibc-32bit
219 Substitute: libgcc_s1-32bit libgcc-32bit
220 %else
221 Substitute: glibc-devel-32bit
222 %endif
223
224 ########## compilation flags ##########
225 %define __global_cflags -O2 -g2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong -Wformat-security -fmessage-length=0 -frecord-gcc-switches -Wl,-z,relro,--as-needed
226
227 Optflags: armv7l %{__global_cflags} --param=ssp-buffer-size=4 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -mthumb -Wp,-D__SOFTFP__ -Wl,-O1 -Wl,--hash-style=gnu -Wa,-mimplicit-it=thumb
228 Optflags: armv7hl %{__global_cflags} --param=ssp-buffer-size=4 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=hard -mthumb -Wl,-O1 -Wl,--hash-style=gnu -Wa,-mimplicit-it=thumb
229 Optflags: aarch64 %{__global_cflags} -feliminate-unused-debug-types -Wformat -march=armv8-a+fp+simd+crc+crypto -mtune=cortex-a57.cortex-a53
230 Optflags: i686 %{__global_cflags} -feliminate-unused-debug-types --param=ssp-buffer-size=4 -fdiagnostics-color=never -m32 -march=i686 -mtune=i686 -msse4.2 -mfpmath=sse -fasynchronous-unwind-tables -fno-omit-frame-pointer -mstackrealign -Wl,-z,noseparate-code
231 Optflags: x86_64 %{__global_cflags} -feliminate-unused-debug-types --param=ssp-buffer-size=4 -fdiagnostics-color=never -m64 -march=nehalem -msse4.2 -mfpmath=sse -fasynchronous-unwind-tables -fno-omit-frame-pointer
232 ### from Tizen:Unified
233 %define _repository emulator
234
235 Macros:
236
237 %distribution Tizen:Unified / emulator
238 %_project Tizen:Unified
239
240 ### from Tizen:Unified
241
242 %_repository emulator
243 :Macros
244
245 ################################################################################
246 # OBS Project config for Tizen:Unified
247 #
248 # vim: set syntax=spec:
249 ################################################################################
250
251 ############################# conflicts resolution #############################
252
253 FileProvides: /usr/sbin/groupadd shadow-utils
254 Prefer: bluetooth-tools-no-firmware
255
256 ############################# profile definition ###############################
257
258 %define _with_tizen 1
259
260 # For classifying debug/release mode
261 Macros:
262 %tizen_build_devel_mode 1
263 :Macros
264
265 # %release_name and %tizen_full_version are used in platform/upstream/tizen-release
266
267 Macros:
268 %release_name Tizen7/Unified
269
270 %tizen_version_major 7
271 %tizen_version_minor 0
272 %tizen_version_patch 0
273
274 %tizen_version %{tizen_version_major}.%{tizen_version_minor}
275 %tizen_full_version %{tizen_version}.%{tizen_version_patch}
276 %tizen %tizen_version
277 %vendor tizen
278 %_vendor tizen
279 %_with_tizen 1
280
281 #### %__spec_check_pre exit 0
282 #### %run_check_section 0
283 %opensuse_bs 1
284 %_default_patch_fuzz   2
285 :Macros
286
287 ########## mesa activation / coregl ##########
288
289 %define _with_mesa 1
290 Macros:
291 %_with_mesa 1
292 :Macros
293
294 Substitute: mesa-devel pkgconfig(glesv2)
295 Substitute: pkgconfig(gles20)  pkgconfig(egl) pkgconfig(glesv2)
296 Substitute: pkgconfig(gles11)  pkgconfig(egl) pkgconfig(glesv1) pkgconfig(gl)
297
298 Prefer: coregl coregl-devel
299 Prefer: libwayland-egl libwayland-egl-devel
300 Prefer: vulkan-loader vulkan-loader-devel
301 #libelementary.so (upstream, tizen-only ) so add below Prefer. Requested by EFL team. 
302 Prefer: elementary
303
304 ########## WAYLAND #########
305
306 %define _with_wayland 1
307 Macros:
308 %_with_wayland 1
309 :Macros
310
311 ########## RDP flag ##########
312
313 # enable/disable RDP (remote desktop protocol) for wayland
314 # flag: _with_rdp, used in repositories
315 # Affects: weston, freerdp
316 # Owner: Manuel <manuel.bachmann@open.eurogiciel.org>
317
318 ############################# target repositories #############################
319
320 %if "%_repository" == "standard"
321
322 Prefer: mesa libgbm
323 Substitute: mesa-libGLESv2 coregl
324 Substitute: mesa-libEGL coregl
325
326 %define _with_rdp 1
327 Macros:
328 %_with_rdp 1
329 :Macros
330
331 %endif
332
333 ############################# emulator repositories ############################
334
335 %if "%_repository" == "emulator"
336
337 Prefer: libgbm
338 Prefer: emulator-yagl emulator-yagl-devel
339
340 %define _with_emulator 1
341 Macros:
342 %_with_emulator 1
343 :Macros
344
345 %endif
346
347 ############################# misc config flags ################################
348 ########## USAGE ##########
349 #
350 # IMPORTANT: please follow the following rules when playing with flags
351 # ********************************************************************
352 #
353 # In spec file, call %bcond_with macro at the beginning and test with %with:
354 # -------------------------
355 # | %bcond_with myfeature
356 # | [...]
357 # | %if %{with myfeature}
358 # | [...]
359 # | %endif
360 # | [...]
361 # -------------------------
362 #
363 # To activate an option, use:
364 # -------------------------
365 # | %define _with_myfeature 1
366 # | Macros:
367 # | %_with_myfeature 1
368 # | :Macros
369 # -------------------------
370 #
371 # To disable an option, DON'T set the values to 0, as the option would still be defined
372 # but simply comment the lines: this will undefine the option.
373 # -------------------------
374 # | #%define _with_myfeature 1
375 # | #Macros:
376 # | #%_with_myfeature 1
377 # | #:Macros
378 # -------------------------
379 #
380 # More information here:
381 # https://en.opensuse.org/openSUSE:Build_Service_prjconf#.25bcond
382 #
383
384 ########## flags ##########
385
386 # Activate introspection
387 # This is needed on GuPNP to build Rygel correctly in IVI
388 # Impacts potentially packages that use gobject-introspection
389 # Owner: Mikko <mikko.ylinen@intel.com>
390
391 Macros:
392 %_with_introspection 1
393 :Macros
394
395 ############################# other config #####################################
396 # derived from Tizen:Base
397 ################################################################################