1 ################################################################################
2 # OBS Project config for Tizen:Common
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>
9 # Git mirror for OBS config: review.tizen.org:scm/meta/build-config / branch tizen_common
11 # vim: set syntax=spec:
12 ################################################################################
14 Patterntype: rpm-md comps
15 Release: <CI_CNT>.<B_CNT>
17 Support: build-compare build-mkbaselibs
18 Support: rpmlint-mini rpmlint-tizen
20 ############################# conflicts resolution #############################
22 FileProvides: /usr/sbin/groupadd pwdutils
28 Prefer: vconf-buxton-devel
29 Prefer: vconf-buxton-keys-devel
31 ############################# profile definition ###############################
33 %define profile common
36 # %release_name and %tizen_full_version are used in platform/upstream/tizen-release
40 %release_name Tizen3/Common
42 %tizen_version_major 3
43 %tizen_version_minor 0
44 %tizen_version_patch 0
46 %tizen_version %{tizen_version_major}.%{tizen_version_minor}
47 %tizen_full_version %{tizen_version}.%{tizen_version_patch}
56 %_default_patch_fuzz 2
59 ############################# display system ###################################
61 ########## display system selection ##########
63 # selection of the display system
64 # this selection is done for each repository
67 # |----------------------------------------------------
68 # | wayland | x | meaning
69 # |----------------------------------------------------
70 # | | 1 | pure X11 platform(no wayland)
71 # | 1 | | pure wayland platform (no X11)
72 # | 1 | 1 | wayland but X compatibility
73 # | | | no X and no wayland
74 # |----------------------------------------------------
76 # Owner: Stephane <stephane.desneux@open.eurogiciel.org>
78 ########## RDP flag ##########
80 # enable/disable RDP (remote desktop protocol) for wayland
81 # flag: _with_rdp, used in repositories
82 # Affects: weston, freerdp
83 # Owner: Manuel <manuel.bachmann@open.eurogiciel.org>
85 ########## mesa activation ##########
92 %ifarch %arm armv7l aarch64
93 Substitute: mesa-devel pkgconfig(glesv2)
94 #FIXME Substitute: pkgconfig(egl)
97 ############################# wayland repositories #############################
99 %if "%_repository" == "ia32-wayland" || "%_repository" == "x86_64-wayland" || "%_repository" == "arm-wayland"|| "%_repository" == "arm"|| "%_repository" == "arm64" || "%_repository" == "arm64-wayland" || "%_repository" == "wayland" || "%_repository" == "standard"
101 Substitute: pkgconfig(gles20) pkgconfig(egl) pkgconfig(glesv2)
102 Substitute: pkgconfig(gles11) pkgconfig(egl) pkgconfig(glesv1) pkgconfig(gl)
104 %define _with_wayland 1
114 ############################# X11 repositories #################################
116 %if "%_repository" == "ia32-x11" || "%_repository" == "x86_64-x11" || "%_repository" == "arm-x11" || "%_repository" == "arm64-x11" || "%_repository" == "x11"
118 Substitute: pkgconfig(gles20) pkgconfig(egl) pkgconfig(glesv2) pkgconfig(gl)
119 Substitute: pkgconfig(gles11) pkgconfig(egl) pkgconfig(glesv1_cm) pkgconfig(gl)
129 ############################# X+Wayland repositories ###########################
131 %if "%_repository" == "ia32-xwayland" || "%_repository" == "x86_64-xwayland" || "%_repository" == "arm-xwayland" || "%_repository" == "arm64-xwayland" || "%_repository" == "xwayland"
133 Substitute: pkgconfig(gles20) pkgconfig(egl) pkgconfig(glesv2) pkgconfig(gl)
134 Substitute: pkgconfig(gles11) pkgconfig(egl) pkgconfig(glesv1_cm) pkgconfig(gl)
136 %define _with_wayland 1
146 ############################# emulator repositories ############################
148 %if "%_repository" == "emulator32-wayland"
150 Prefer: mesa-libGLESv2
151 Prefer: libwayland-egl
155 Prefer: emulator-yagl
157 Substitute: pkgconfig(gles20) pkgconfig(egl) pkgconfig(glesv2)
158 Substitute: pkgconfig(gles11) pkgconfig(egl) pkgconfig(glesv1) pkgconfig(gl)
160 %define _with_wayland 1
161 %define _with_emulator 1
171 ############################# misc config flags ################################
173 ########## USAGE ##########
175 # IMPORTANT: please follow the following rules when playing with flags
176 # ********************************************************************
178 # In spec file, call %bcond_with macro at the beginning and test with %with:
179 # -------------------------
180 # | %bcond_with myfeature
182 # | %if %{with myfeature}
186 # -------------------------
188 # To activate an option, use:
189 # -------------------------
190 # | %define _with_myfeature 1
192 # | %_with_myfeature 1
194 # -------------------------
196 # To disable an option, DON'T set the values to 0, as the option would still be defined
197 # but simply comment the lines: this will undefine the option.
198 # -------------------------
199 # | #%define _with_myfeature 1
201 # | #%_with_myfeature 1
203 # -------------------------
205 # More information here:
206 # https://en.opensuse.org/openSUSE:Build_Service_prjconf#.25bcond
209 ########## flags ##########
211 # This build macro controls the libdlog output. If enabled,
212 # libdlog writes to Systemd Journal. If disabled, libdlog writes to kernel Android
213 # logger FIFO. Affects: dlog.
214 # Owner: Mikko <mikko.ylinen@intel.com>
216 %_with_dlog_to_systemd_journal 1
219 # Macro used to handle bluetooth popups without syspopup/bt-syspopup which needs OSP .
220 # In IVI, this macro permits to address bluetooth notifications (using C API) to notification-service daemon.
221 # Then homescreen is supposed to deal with those notifications and display relevant popups.
222 # Affects: bluetooth-frwk
223 # Owner: Corentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>
225 %_with_bluetooth_frwk_libnotification 1
228 # Macro used for testing gstreamer 1.X API
230 # Owner: Philippe Coval <philippe.coval@open.eurogiciel.org>
231 %define _with_gstreamer1 1
236 # Macro used for testing libva availability
238 # Owner: Philippe Coval <philippe.coval@open.eurogiciel.org>
240 %define _with_libva 1
246 # Macro used for testing Input methods
248 # Owner: Philippe Coval <philippe.coval@open.eurogiciel.org>
249 #%define _with_tizenscim 1
254 # This build macro controls whether the OS uses
255 # legacy nfc-manager or neard enabled nfc-manager-neard. If enabled,
256 # nfc-manager-neard is used. Affects: nfc CAPI, emulator-plugin-nfc
257 # Owner: Arron Wang <arron.wang@intel.com>
262 # Uses mobile-specific Samsung patches for PulseAudio. Tizen Mobile needs
263 # this -> Tizen Mobile is compiled with this option.
264 # Owner: Ismo Puustinen <ismo.puustinen@intel.com>
265 # FIXME: Why this extra define in the obs config ?
266 %define _with_pulseaudio_samsung_policy 1
268 %_with_pulseaudio_samsung_policy 1
271 # Activate introspection
272 # This is needed on GuPNP to build Rygel correctly in IVI
273 # Impacts potentially packages that use gobject-introspection
274 # Owner: Mikko <mikko.ylinen@intel.com>
276 %_with_introspection 1
280 # This configuration flag enables the support of KDBUS
281 # Used: platform/upstream/setup
282 # Owner: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
283 #%define _with_kdbus 1
288 ############################# build config #####################################
290 %define gcc_version 49
295 ########## targets ##########
298 Target: i686-tizen-linux
302 Target: armv7hl-tizen-linux
306 Target: armv7l-tizen-linux
310 Target: aarch64-tizen-linux
313 ########## cross build ##########
317 # cross build support for the build hosts
318 Preinstall: qemu-linux-user-cross-arm
319 Keep: qemu-linux-user-cross-arm
323 Preinstall: qemu-accel-armv7hl
324 Runscripts: qemu-accel-armv7hl
325 Preinstall: libmount libblkid libuuid
329 Preinstall: qemu-accel-armv7l-cross-arm
330 Runscripts: qemu-accel-armv7l-cross-arm
331 Preinstall: libmount libblkid libuuid
336 Preinstall: qemu-linux-user-cross-arm
337 Keep: qemu-linux-user-cross-arm
338 Preinstall: qemu-accel-aarch64-cross-aarch64
339 Runscripts: qemu-accel-aarch64-cross-aarch64
340 Preinstall: libmount libblkid libuuid
343 ########## exports for different architectures ##########
345 ExportFilter: \.armv7l\.rpm$ armv7l
346 ExportFilter: \.aarch64\.rpm$ aarch64
347 ExportFilter: \.x86_64\.rpm$ x86_64
349 ########## buildroot config ##########
351 Preinstall: setup filesystem
354 Preinstall: bash bzip2 coreutils diffutils grep rpm
355 Preinstall: glibc libacl libattr
357 Preinstall: libgcc_s1
358 Preinstall: libpopt sed tar zlib
359 Preinstall: libncurses libreadline
360 Preinstall: libelf libbz2
362 Preinstall: nss nspr libfreebl3 libsoftokn3
365 Preinstall: smack libsmack libxml2 libmagic libmagic-data
366 Preinstall: libsqlite
367 Preinstall: rpm-security-plugin
368 Preinstall: util-linux
370 VMinstall: perl libmount libblkid libext2fs libuuid grep libpcre util-linux
372 Required: binutils gcc glibc rpm-build libtool
374 Support: glibc-locale
377 Support: cpio findutils
378 Support: file findutils zlib bzip2
379 Support: gzip hostname net-tools
380 Support: make patch sed gawk tar grep coreutils pkg-config
384 Support: which elfutils
385 Support: update-alternatives
387 # FIXME: TO REMOVE (? comes from IVI)
390 Keep: cpp%{gcc_version} gcc%{gcc_version} gcc%{gcc_version}-ada libstdc++%{gcc_version}
391 Keep: libstdc++%{gcc_version}-devel gcc%{gcc_version}-c++
392 Keep: cpp gcc libstdc++
394 Keep: binutils cpp libmagic-data file findutils gawk gcc gcc-c++
395 Keep: gdbm gzip libada libunwind glibc-devel libpcre xz-lzma-compat
396 Keep: make gmp libcap groff cpio
397 Keep: patch rpm-build nss nspr elfutils python grep libgcc gcc-c++
398 Keep: kernel-headers perl-libs perl
399 Keep: pkgconfig glib2 tizen-rpm-config
400 Keep: libmpc libmpfr libppl libgmp libppl_c
401 Keep: libcloog libppl libgmpxx
402 Keep: nss-softokn-freebl libmagic libmagic-data
404 Keep: update-alternatives
405 Prefer: libstdc++%{gcc_version} libgcc%{gcc_version}
406 Prefer: libstdc++%{gcc_version}-32bit libstdc++%{gcc_version}-64bit
408 Substitute: gettext gettext-tools
411 Substitute: glibc-devel-32bit glibc-devel-32bit glibc-32bit
413 Substitute: glibc-devel-32bit
416 ########## compilation flags ##########
418 %define __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 -fmessage-length=0 -finline-functions -fdiagnostics-color=never
420 Optflags: i686 %{__global_cflags} -m32 -march=i686 -mtune=i686 -msse4.2 -mfpmath=sse -fasynchronous-unwind-tables -fno-omit-frame-pointer
422 Optflags: x86_64 %{__global_cflags} -m64 -march=corei7 -mtune=corei7-avx -msse4.2 -mfpmath=sse -fasynchronous-unwind-tables -fno-omit-frame-pointer
424 #generic arm platform
425 #Optflags: armv7l %{__global_cflags} -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=vfpv3 -mfloat-abi=softfp -Wp,-D__SOFTFP__
426 #activate neon FPU instructions set (crosswalk build)
427 Optflags: armv7l %{__global_cflags} -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -Wp,-D__SOFTFP__
429 Optflags: aarch64 %{__global_cflags} -march=armv8-a+fp+simd+crc+crypto