Merge "sync Tizen:Common config and meta"
[scm/meta/obs.git] / Tizen:Common / _config
1 ################################################################################
2 # OBS Project config for Tizen:Common
3 #
4 # RE contacts:
5 # Stephane Desneux <stephane.desneux@open.eurogiciel.org>
6 # Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
7 # Jose Bollo <jose.bollo@open.eurogiciel.org>
8 #
9 # Git mirror for OBS config: review.tizen.org:scm/meta/build-config / branch tizen_common
10 #
11 # vim: set syntax=spec:
12 ################################################################################
13
14 Patterntype: rpm-md comps
15 Release: <CI_CNT>.<B_CNT>
16 Support: build
17 Support: build-compare build-mkbaselibs
18 Support: rpmlint-mini rpmlint-tizen
19
20 %global aarch64  aarch64 arm64 armv8
21
22 %ifarch ${aarch64}
23 %define _arch aarch64
24 %endif
25
26 ############################# conflicts resolution #############################
27
28 FileProvides: /usr/sbin/groupadd pwdutils
29 Prefer: util-linux
30 Prefer: libtapi-devel
31 Prefer: libpci-devel
32
33 ############################# profile definition ###############################
34
35 %define profile common
36 %define _with_tizen 1
37
38 Macros:
39 %profile common
40 %tizen_version 3.0
41 %tizen 3.0
42 %vendor tizen
43 %_vendor tizen
44 %_with_tizen 1
45
46 %check exit 0
47 %run_check_section 0
48 %opensuse_bs 1
49 %_default_patch_fuzz   2
50 :Macros
51
52 ############################# display system ###################################
53
54 ########## display system selection ##########
55
56 # selection of the display system
57 # this selection is done for each repository
58 #
59 # flags combinations:
60 # |----------------------------------------------------
61 # | wayland |  x  | meaning
62 # |----------------------------------------------------
63 # |   0     |  1  | pure X11 platform(no wayland)
64 # |   1     |  0  | pure wayland platform (no X11)
65 # |   1     |  1  | wayland but X compatibility
66 # |   0     |  0  | no X and no wayland
67 # |----------------------------------------------------
68 #
69 # Owner: Stephane <stephane.desneux@open.eurogiciel.org>
70
71 ########## RDP flag ##########
72
73 # enable/disable RDP (remote desktop protocol) for wayland
74 # flag: _with_rdp, used in repositories
75 # Affects: weston, freerdp
76 # Owner: Manuel <manuel.bachmann@open.eurogiciel.org>
77
78 ########## mesa activation ##########
79
80 %define _with_mesa 1
81 Macros:
82 %_with_mesa 1
83 :Macros
84
85 %ifarch %arm armv7l %{aarch64}
86    Substitute: mesa-devel pkgconfig(glesv2)
87    #FIXME Substitute: pkgconfig(egl)
88 %endif
89
90 ############################# wayland repositories #############################
91
92 %if "%_repository" == "ia32-wayland" || "%_repository" == "x86_64-wayland" || "%_repository" == "arm-wayland"|| "%_repository" == "arm"|| "%_repository" == "arm64" || "%_repository" == "arm64-wayland" || "%_repository" == "wayland" || "%_repository" == "standard"
93
94 Substitute: pkgconfig(gles20)  pkgconfig(egl) pkgconfig(glesv2)
95 Substitute: pkgconfig(gles11)  pkgconfig(egl) pkgconfig(glesv1) pkgconfig(gl)
96
97 %define _with_wayland 1
98 %define _with_rdp 1
99
100 Macros:
101 %_with_wayland 1
102 %_with_rdp 1
103 :Macros
104
105 %endif
106
107 ############################# X11 repositories #################################
108
109 %if "%_repository" == "ia32-x11" || "%_repository" == "x86_64-x11" || "%_repository" == "arm-x11" || "%_repository" == "arm64-x11" || "%_repository" == "x11"
110
111 Substitute: pkgconfig(gles20) pkgconfig(egl) pkgconfig(glesv2) pkgconfig(gl)
112 Substitute: pkgconfig(gles11) pkgconfig(egl) pkgconfig(glesv1_cm) pkgconfig(gl)
113
114 %define _with_x 1
115
116 Macros:
117 %_with_x 1
118 :Macros
119
120 %endif
121
122 ############################# X+Wayland repositories ###########################
123
124 %if "%_repository" == "ia32-xwayland" || "%_repository" == "x86_64-xwayland" || "%_repository" == "arm-xwayland" || "%_repository" == "arm64-xwayland" || "%_repository" == "xwayland"
125
126 Substitute: pkgconfig(gles20) pkgconfig(egl) pkgconfig(glesv2) pkgconfig(gl)
127 Substitute: pkgconfig(gles11) pkgconfig(egl) pkgconfig(glesv1_cm) pkgconfig(gl)
128
129 %define _with_wayland 1
130 %define _with_x 1
131
132 Macros:
133 %_with_wayland 1
134 %_with_x 1
135 :Macros
136
137 %endif
138
139 ############################# emulator repositories ############################
140
141 %if "%_repository" == "emulator32-wayland"
142
143 Prefer: mesa-libGLESv2
144 Prefer: libwayland-egl
145 Prefer: libgbm
146 Prefer: mesa-libGL
147 Prefer: mesa-libEGL
148 Prefer: emulator-yagl
149
150 Substitute: pkgconfig(gles20)  pkgconfig(egl) pkgconfig(glesv2)
151 Substitute: pkgconfig(gles11)  pkgconfig(egl) pkgconfig(glesv1) pkgconfig(gl)
152
153 %define _with_wayland 1
154 %define _with_emulator 1
155
156 Macros:
157 %_with_wayland 1
158 %_with_emulator 1
159 :Macros
160
161 %endif
162
163 ############################# misc config flags ################################
164
165 # This build macro controls the libdlog output. If enabled,
166 # libdlog writes to Systemd Journal. If disabled, libdlog writes to kernel Android
167 # logger FIFO. Affects: dlog.
168 # Owner: Mikko <mikko.ylinen@intel.com>
169 Macros:
170 %_with_dlog_to_systemd_journal 1
171 :Macros
172
173 # Macro used to handle bluetooth popups without syspopup/bt-syspopup which needs OSP .
174 # In IVI, this macro permits to address bluetooth notifications (using C API) to notification-service daemon.
175 # Then homescreen is supposed to deal with those notifications and display relevant popups.
176 # Affects: bluetooth-frwk
177 # Owner: Corentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>
178 Macros:
179 %_with_bluetooth_frwk_libnotification 1
180 :Macros
181
182 # This build macro controls whether the OS uses
183 # legacy nfc-manager or neard enabled nfc-manager-neard. If enabled,
184 # nfc-manager-neard is used. Affects: nfc CAPI, emulator-plugin-nfc
185 # Owner: Arron Wang <arron.wang@intel.com>
186 Macros:
187 %_with_neard_nfc 1
188 :Macros
189
190 # Uses mobile-specific Samsung patches for PulseAudio. Tizen Mobile needs
191 # this -> Tizen Mobile is compiled with this option.
192 # Owner: Ismo Puustinen <ismo.puustinen@intel.com>
193 # FIXME: Why this extra define in the obs config ?
194 %define _with_pulseaudio_samsung_policy 1
195 Macros:
196 %_with_pulseaudio_samsung_policy 1
197 :Macros
198
199 ############################# build config #####################################
200
201 %define gcc_version 48
202
203 ########## targets ##########
204
205 %ifarch i586
206 Target: i686-tizen-linux
207 %endif
208
209 %ifarch armv7hl
210 Target: armv7hl-tizen-linux
211 %endif
212
213 %ifarch armv7l
214 Target: armv7l-tizen-linux
215 %endif
216
217 %ifarch aarch64
218 Target: aarch64-tizen-linux
219 %endif
220
221 ########## cross build ##########
222
223 %ifarch %arm armv7l
224 Hostarch: x86_64
225 # cross build support for the build hosts
226 Preinstall: qemu-linux-user-cross-arm
227 Keep: qemu-linux-user-cross-arm
228 %endif
229
230 %ifarch armv7hl
231 Preinstall: qemu-accel-armv7hl
232 Runscripts: qemu-accel-armv7hl
233 Preinstall: libmount libblkid libuuid
234 %endif
235
236 %ifarch armv7l
237 Preinstall: qemu-accel-armv7l-cross-arm
238 Runscripts: qemu-accel-armv7l-cross-arm
239 Preinstall: libmount libblkid libuuid
240 %endif
241
242 %ifarch aarch64
243 Substitute: cross-aarch64-binutils  binutils
244 Substitute: cross-aarch64-gcc48-icecream-backend gcc
245 Preinstall: setup filesystem
246 Preinstall: qemu-accel-aarch64-cross-arm
247 Runscripts: qemu-accel-aarch64-cross-arm setup filesystem
248
249 Preinstall: rpm rpm-build pam db4
250 Preinstall: libncurses libmpc libmpfr libgmp cloog-isl
251 Preinstall: python
252
253 #hack to start build without proper binfmt
254 Preinstall: !bbb-cross-arm
255 Ignore:     bbb-cross-arm
256 Preinstall: bash
257
258 #provides until we can build libs correctly
259 #FileProvides: libc.so.6 glibc
260 #FileProvides: libc.so.6(GLIBC_2.4) glibc
261 #FileProvides: libc.so.6(GLIBC_2.6) glibc
262 #FileProvides: libc.so.6(GLIBC_2.7) glibc
263 #FileProvides: libc.so.6(GLIBC_2.8) glibc
264 #FileProvides: libc.so.6(GLIBC_2.11) glibc
265 #FileProvides: libc.so.6(GLIBC_2.15) glibc
266 #FileProvides: libc.so.6(GLIBC_2.17) glibc
267 #FileProvides: ld-linux.so.3 glibc
268 #FileProvides: ld-linux.so.3(GLIBC_2.4) glibc
269 #FileProvides: ld-linux-aarch64.so.1(GLIBC_2.17)(64bit) glibc
270 #FileProvides: ld-linux-aarch64.so.1()(64bit) glibc
271 #FileProvides: libdl.so.2 glibc
272 #FileProvides: libdl.so.2(GLIBC_2.4) glibc
273 #FileProvides: libcrypt.so.1 glibc
274 #FileProvides: libcrypt.so.1(GLIBC_2.4) glibc
275 #FileProvides: libm.so.6 glibc
276 #FileProvides: libm.so.6(GLIBC_2.4) glibc
277 #FileProvides: libpthread.so.0 glibc
278 #FileProvides: libpthread.so.0(GLIBC_2.4) glibc
279 #FileProvides: libacl.so.1 acl
280 #FileProvides: liblua.so.5.1 liblua
281 #FileProvides: liblzma.so.5 xz
282 #FileProvides: libpopt.so.0 popt
283 #FileProvides: libelf.so.1(ELFUTILS_1.0) libelf
284 #FileProvides: libnsl.so.1 glibc
285 #FileProvides: libnsl.so.1(GLIBC_2.4) glibc
286 #FileProvides: libutil.so.1 glibc
287 #FileProvides: libutil.so.1(GLIBC_2.4) glibc
288 #FileProvides: libpopt.so.0(LIBPOPT_0) popt
289 #FileProvides: libacl.so.1(ACL_1.0) acl
290 #FileProvides: libz.so.1(ZLIB_1.2.3.3) zlib
291 #FileProvides: libmagic.so.1 libmagic
292 #FileProvides: libgmp.so.10 libgmp
293 #FileProvides: libmpc.so.3 libmpc
294 #FileProvides: libmpfr.so.4 libmpfr
295 #FileProvides: libnspr4.so nspr
296 #FileProvides: libplc4.so nspr
297 #FileProvides: libplds4.so nspr
298 #FileProvides: libsqlite3.so.0 sqlite
299 #FileProvides: libattr.so.1 attr
300 #FileProvides: libattr.so.1(ATTR_1.0) attr
301 #FileProvides: libsmack.so.1 smack
302 #FileProvides: libsmack.so.1(LIBSMACK_1.0) smack
303 #FileProvides: libxml2.so.2 libxml2
304 #FileProvides: libxml2.so.2(LIBXML2_2.4.30) libxml2
305 #FileProvides: libxml2.so.2(LIBXML2_2.5.0) libxml2
306 #FileProvides: libxml2.so.2(LIBXML2_2.6.0) libxml2
307 #FileProvides: librpm.so.3()(64bit) rpm
308 #FileProvides: librpmio.so.3()(64bit) rpm
309 %endif # aarch64
310
311 ########## exports for different architectures ##########
312
313 ExportFilter: ^qemu-linux-user.*\..*\.rpm$ . armv7l armv7hl aarch64
314
315 ExportFilter: ^qemu-accel-armv7hl.*\..*\.rpm$ .  armv7hl
316 ExportFilter: ^qemu-accel-armv7l.*\..*\.rpm$ .  armv7l
317 ExportFilter: ^qemu-accel-aarch64.*\..*\.rpm$ .  aarch64
318
319 ExportFilter: \.armv7l\.rpm$ armv7l
320 ExportFilter: \.aarch64\.rpm$ aarch64
321 ExportFilter: \.x86_64\.rpm$ x86_64
322
323 ########## buildroot config ##########
324
325 Preinstall: setup filesystem
326 RunScripts: setup
327
328 Preinstall: bash bzip2 coreutils diffutils grep rpm
329 Preinstall: glibc libacl libattr
330 Preinstall: libcap
331 Preinstall: libgcc_s1
332 Preinstall: libpopt sed tar zlib
333 Preinstall: libncurses libreadline
334 Preinstall: libelf libbz2
335 Preinstall: liblzma
336 Preinstall: nss nspr libfreebl3 libsoftokn3
337 Preinstall: libmagic
338 Preinstall: liblua
339 Preinstall: smack libsmack libxml2 libmagic  libmagic-data
340 Preinstall: libsqlite
341 Preinstall: rpm-security-plugin
342
343 VMinstall: perl libmount libblkid libext2fs libuuid  grep libpcre util-linux
344
345 %ifarch aarch64
346 Support: cross-aarch64-binutils cross-aarch64-gcc48-icecream-backend
347 %endif
348 Required: binutils gcc glibc rpm-build libtool
349
350 Support: glibc-locale
351 Support: perl
352 Support: hostname
353 Support: cpio findutils
354 Support: file findutils zlib bzip2
355 Support: gzip hostname net-tools
356 Support: make  patch sed  gawk tar grep coreutils pkg-config
357 Support: m4  tzdata
358 Support: util-linux
359 Support: less
360 Support: which  elfutils
361 Support: update-alternatives
362
363 # FIXME: TO REMOVE (? comes from IVI)
364 Support: gcc-c++
365
366 Keep: cpp%{gcc_version} gcc%{gcc_version} gcc%{gcc_version}-ada libstdc++%{gcc_version}
367 Keep: libstdc++%{gcc_version}-devel gcc%{gcc_version}-c++
368 Keep: cpp gcc libstdc++
369 Keep: pam
370 Keep: binutils cpp  libmagic-data file findutils gawk gcc  gcc-c++
371 Keep: gdbm gzip libada libunwind  glibc-devel libpcre xz-lzma-compat
372 Keep: make  gmp libcap groff cpio
373 Keep: patch rpm-build  nss nspr elfutils python grep libgcc gcc-c++
374 Keep: kernel-headers  perl-libs perl
375 Keep: pkgconfig glib2 tizen-rpm-config
376 Keep: libmpc libmpfr libppl libgmp libppl_c
377 Keep: libcloog libppl libgmpxx
378 Keep: nss-softokn-freebl libmagic libmagic-data
379 Keep: setup
380 Keep: update-alternatives
381 Prefer: libstdc++%{gcc_version} libgcc%{gcc_version}
382 Prefer: libstdc++%{gcc_version}-32bit libstdc++%{gcc_version}-64bit
383
384 Substitute: gettext gettext-tools
385
386 %ifarch x86_64
387 Substitute: glibc-devel-32bit glibc-devel-32bit glibc-32bit
388 %else
389 Substitute: glibc-devel-32bit
390 %endif
391
392 ########## compilation flags ##########
393
394 #%__global_cflags -O2 -g2 -feliminate-unused-debug-types -pipe -Wall  -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector  --param=ssp-buffer-size=32 -Wformat -Wformat-security
395
396 Optflags: x86_64 -O2 -g2 -feliminate-unused-debug-types -pipe -Wall  -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector  --param=ssp-buffer-size=32 -Wformat -Wformat-security -fmessage-length=0 -m64 -march=corei7 -msse4.2  -mtune=corei7-avx -mfpmath=sse -fasynchronous-unwind-tables -fno-omit-frame-pointer  -fipa-cp-clone
397
398 #generic arm platform
399 #Optflags: armv7l -O2 -g2 -feliminate-unused-debug-types -pipe -Wall  -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector  --param=ssp-buffer-size=32 -Wformat -Wformat-security -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian  -mfpu=vfpv3 -mfloat-abi=softfp -D__SOFTFP__
400
401 #activate neon FPU instructions set (crosswalk build)
402 Optflags: armv7l -O2 -g2 -feliminate-unused-debug-types -pipe -Wall  -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector  --param=ssp-buffer-size=32 -Wformat -Wformat-security -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian  -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__
403
404 Optflags: aarch64 -O2 -g2 -feliminate-unused-debug-types -pipe -Wall  -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector  -Wformat -Wformat-security -fmessage-length=0