2f637b33b80031e2844279ca1aebfe645abfb983
[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 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 aarch64
123 Preinstall: qemu-accel-%{build_hostarch}-aarch64
124 Runscripts: qemu-accel-%{build_hostarch}-aarch64
125 Preinstall: libmount libblkid libuuid
126 %endif # aarch64
127
128 Substitute: python-accel-armv7l-cross-arm python-accel-%{build_hostarch}-armv7l
129 Substitute: python-accel-aarch64-cross-aarch64 python-accel-%{build_hostarch}-aarch64
130
131 Substitute: clang-accel-armv7l-cross-arm clang-accel-%{build_hostarch}-armv7l
132 Substitute: clang-accel-aarch64-cross-aarch64 clang-accel-%{build_hostarch}-aarch64
133
134 ########## exports for different architectures ##########
135
136 ExportFilter: \.armv7l\.rpm$ armv7l
137 ExportFilter: \.aarch64\.rpm$ aarch64
138 ExportFilter: \.i586\.rpm$ i586
139 ExportFilter: \.x86_64\.rpm$ x86_64
140
141 ########## buildroot config ##########
142
143 Preinstall: setup filesystem
144 RunScripts: setup
145
146 Preinstall: bash bzip2 coreutils diffutils grep rpm
147 Preinstall: glibc libacl libattr
148 Preinstall: libcap
149 Preinstall: libgcc
150 Preinstall: libpopt sed tar zlib
151 Preinstall: libncurses libreadline
152 Preinstall: libelf libbz2
153 Preinstall: liblzma
154 Preinstall: nss nspr libfreebl3 libsoftokn3
155 Preinstall: libmagic
156 Preinstall: liblua
157 Preinstall: smack libsmack libxml2 libmagic  libmagic-data
158 Preinstall: libsqlite
159 #Preinstall: rpm-security-plugin
160 Preinstall: util-linux util-linux-su
161 Preinstall: libzstd1
162
163 VMinstall: perl libmount libblkid libext2fs libuuid  grep libpcre util-linux libsmartcols procps-ng
164
165 Required: binutils gcc glibc rpm-build libtool
166 Required: gcc-c++
167
168 Support: glibc-locale
169 Support: perl
170 Support: hostname
171 Support: cpio findutils
172 Support: file findutils zlib bzip2
173 Support: gzip hostname net-tools
174 Support: make  patch sed  gawk tar grep coreutils pkg-config
175 Support: m4  tzdata
176 Support: util-linux
177 Support: less
178 Support: which  elfutils
179 Support: update-alternatives
180 Support: libstdc++-devel
181 Support: cpp
182 Support: libatomic
183 Support: libgomp
184 Support: libitm
185
186 Keep: libstdc++-devel
187 Keep: cpp gcc libstdc++
188 Keep: pam
189 Keep: binutils cpp  libmagic-data file findutils gawk gcc  gcc-c++
190 Keep: gdbm gzip libada libunwind  glibc-devel libpcre xz-lzma-compat
191 Keep: make  gmp libcap groff cpio
192 Keep: patch rpm-build  nss nspr elfutils python grep libgcc gcc-c++
193 Keep: kernel-headers  perl-libs perl
194 Keep: pkgconfig glib2 tizen-rpm-config
195 Keep: libmpc libmpfr libppl libgmp libppl_c
196 Keep: libcloog libppl libgmpxx
197 Keep: nss-softokn-freebl libmagic libmagic-data
198 Keep: setup
199 Keep: update-alternatives
200 Keep: cpp
201 Keep: gcc-c++
202 Keep: libatomic
203 Keep: libgomp
204 Keep: libitm
205
206 Substitute: gettext gettext-tools
207
208 %ifarch x86_64
209 Substitute: glibc-devel-32bit glibc-devel-32bit glibc-32bit
210 Substitute: libgcc_s1-32bit libgcc-32bit
211 %else
212 Substitute: glibc-devel-32bit
213 %endif
214
215 ########## compilation flags ##########
216 %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
217
218 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
219 Optflags: aarch64 %{__global_cflags} -feliminate-unused-debug-types -Wformat -march=armv8-a+fp+simd+crc+crypto -mtune=cortex-a57.cortex-a53
220 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
221 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
222 ### from Tizen:Unified
223 %define _repository emulator
224
225 Macros:
226
227 %distribution Tizen:Unified / emulator
228 %_project Tizen:Unified
229
230 ### from Tizen:Unified
231
232 %_repository emulator
233 :Macros
234
235 ################################################################################
236 # OBS Project config for Tizen:Unified
237 #
238 # vim: set syntax=spec:
239 ################################################################################
240
241 ############################# conflicts resolution #############################
242
243 FileProvides: /usr/sbin/groupadd shadow-utils
244 Prefer: bluetooth-tools-no-firmware
245
246 ############################# profile definition ###############################
247
248 %define _with_tizen 1
249
250 # For classifying debug/release mode
251 Macros:
252 %tizen_build_devel_mode 1
253 :Macros
254
255 # %release_name and %tizen_full_version are used in platform/upstream/tizen-release
256
257 Macros:
258 %release_name Tizen7/Unified
259
260 %tizen_version_major 7
261 %tizen_version_minor 0
262 %tizen_version_patch 0
263
264 %tizen_version %{tizen_version_major}.%{tizen_version_minor}
265 %tizen_full_version %{tizen_version}.%{tizen_version_patch}
266 %tizen %tizen_version
267 %vendor tizen
268 %_vendor tizen
269 %_with_tizen 1
270
271 #### %__spec_check_pre exit 0
272 #### %run_check_section 0
273 %opensuse_bs 1
274 %_default_patch_fuzz   2
275 :Macros
276
277 ########## mesa activation / coregl ##########
278
279 %define _with_mesa 1
280 Macros:
281 %_with_mesa 1
282 :Macros
283
284 Substitute: mesa-devel pkgconfig(glesv2)
285 Substitute: pkgconfig(gles20)  pkgconfig(egl) pkgconfig(glesv2)
286 Substitute: pkgconfig(gles11)  pkgconfig(egl) pkgconfig(glesv1) pkgconfig(gl)
287
288 Prefer: coregl coregl-devel
289 Prefer: libwayland-egl libwayland-egl-devel
290 Prefer: vulkan-loader vulkan-loader-devel
291 #libelementary.so (upstream, tizen-only ) so add below Prefer. Requested by EFL team. 
292 Prefer: elementary
293
294 ########## WAYLAND #########
295
296 %define _with_wayland 1
297 Macros:
298 %_with_wayland 1
299 :Macros
300
301 ########## RDP flag ##########
302
303 # enable/disable RDP (remote desktop protocol) for wayland
304 # flag: _with_rdp, used in repositories
305 # Affects: weston, freerdp
306 # Owner: Manuel <manuel.bachmann@open.eurogiciel.org>
307
308 ############################# target repositories #############################
309
310 %if "%_repository" == "standard"
311
312 Prefer: mesa libgbm
313 Substitute: mesa-libGLESv2 coregl
314 Substitute: mesa-libEGL coregl
315
316 %define _with_rdp 1
317 Macros:
318 %_with_rdp 1
319 :Macros
320
321 %endif
322
323 ############################# emulator repositories ############################
324
325 %if "%_repository" == "emulator"
326
327 Prefer: libgbm
328 Prefer: emulator-yagl emulator-yagl-devel
329
330 %define _with_emulator 1
331 Macros:
332 %_with_emulator 1
333 :Macros
334
335 %endif
336
337 ############################# misc config flags ################################
338 ########## USAGE ##########
339 #
340 # IMPORTANT: please follow the following rules when playing with flags
341 # ********************************************************************
342 #
343 # In spec file, call %bcond_with macro at the beginning and test with %with:
344 # -------------------------
345 # | %bcond_with myfeature
346 # | [...]
347 # | %if %{with myfeature}
348 # | [...]
349 # | %endif
350 # | [...]
351 # -------------------------
352 #
353 # To activate an option, use:
354 # -------------------------
355 # | %define _with_myfeature 1
356 # | Macros:
357 # | %_with_myfeature 1
358 # | :Macros
359 # -------------------------
360 #
361 # To disable an option, DON'T set the values to 0, as the option would still be defined
362 # but simply comment the lines: this will undefine the option.
363 # -------------------------
364 # | #%define _with_myfeature 1
365 # | #Macros:
366 # | #%_with_myfeature 1
367 # | #:Macros
368 # -------------------------
369 #
370 # More information here:
371 # https://en.opensuse.org/openSUSE:Build_Service_prjconf#.25bcond
372 #
373
374 ########## flags ##########
375
376 # Activate introspection
377 # This is needed on GuPNP to build Rygel correctly in IVI
378 # Impacts potentially packages that use gobject-introspection
379 # Owner: Mikko <mikko.ylinen@intel.com>
380
381 Macros:
382 %_with_introspection 1
383 :Macros
384
385 ############################# other config #####################################
386 # derived from Tizen:Base
387 ################################################################################