dd46e03569cbfabce240a731908246f57202ea0c
[scm/meta/obs.git] / Tizen:Common / _config
1 ################################################################################
2 # OBS Project config for Tizen:Common
3 #
4 # RE contacts:
5 # Maciej Wereski <m.wereski@partner.samsung.com>
6 # Pawel Wieczorek <p.wieczorek2@samsung.com>
7 #
8 # Git mirror for OBS config: review.tizen.org:scm/meta/build-config / branch tizen_common
9 #
10 # vim: set syntax=spec:
11 ################################################################################
12
13 Patterntype: rpm-md comps
14 Release: <CI_CNT>.<B_CNT>
15 Support: build
16 Support: build-compare build-mkbaselibs
17 Support: rpmlint-mini rpmlint-tizen
18
19 ############################# conflicts resolution #############################
20
21 FileProvides: /usr/sbin/groupadd pwdutils
22 Prefer: util-linux
23 Prefer: libtapi-devel
24 Prefer: libpci-devel
25
26 Prefer: vconf-buxton
27 Prefer: vconf-buxton-devel
28 Prefer: vconf-buxton-keys-devel
29
30 ############################# profile definition ###############################
31
32 %define profile common
33 %define _with_tizen 1
34
35 # %release_name and %tizen_full_version are used in platform/upstream/tizen-release
36
37 Macros:
38 %profile common
39 %release_name Tizen3/Common
40
41 %tizen_version_major 3
42 %tizen_version_minor 0
43 %tizen_version_patch 0
44
45 %tizen_version %{tizen_version_major}.%{tizen_version_minor}
46 %tizen_full_version %{tizen_version}.%{tizen_version_patch}
47 %tizen %tizen_version
48 %vendor tizen
49 %_vendor tizen
50 %_with_tizen 1
51
52 %check exit 0
53 %run_check_section 0
54 %opensuse_bs 1
55 %_default_patch_fuzz   2
56 :Macros
57
58 ########## RDP flag ##########
59
60 # enable/disable RDP (remote desktop protocol) for wayland
61 # flag: _with_rdp, used in repositories
62 # Affects: weston, freerdp
63 # Owner: Manuel <manuel.bachmann@open.eurogiciel.org>
64
65 ########## mesa activation ##########
66
67 %define _with_mesa 1
68 Macros:
69 %_with_mesa 1
70 :Macros
71
72 %ifarch %arm armv7l aarch64
73    Substitute: mesa-devel pkgconfig(glesv2)
74    #FIXME Substitute: pkgconfig(egl)
75 %endif
76
77 ############################# wayland repositories #############################
78
79 %if "%_repository" == "ia32-wayland" || "%_repository" == "x86_64-wayland" || "%_repository" == "arm-wayland"|| "%_repository" == "arm"|| "%_repository" == "arm64" || "%_repository" == "arm64-wayland" || "%_repository" == "wayland" || "%_repository" == "standard"
80
81 Substitute: pkgconfig(gles20)  pkgconfig(egl) pkgconfig(glesv2)
82 Substitute: pkgconfig(gles11)  pkgconfig(egl) pkgconfig(glesv1) pkgconfig(gl)
83
84 %define _with_wayland 1
85 %define _with_rdp 1
86
87 Macros:
88 %_with_wayland 1
89 %_with_rdp 1
90 :Macros
91
92 %endif
93
94 ############################# emulator repositories ############################
95
96 %if "%_repository" == "emulator32-wayland"
97
98 Prefer: mesa-libGLESv2
99 Prefer: libwayland-egl
100 Prefer: libgbm
101 Prefer: mesa-libGL
102 Prefer: mesa-libEGL
103 Prefer: emulator-yagl
104
105 Substitute: pkgconfig(gles20)  pkgconfig(egl) pkgconfig(glesv2)
106 Substitute: pkgconfig(gles11)  pkgconfig(egl) pkgconfig(glesv1) pkgconfig(gl)
107
108 %define _with_wayland 1
109 %define _with_emulator 1
110
111 Macros:
112 %_with_wayland 1
113 %_with_emulator 1
114 :Macros
115
116 %endif
117
118
119 ############################# misc config flags ################################
120
121 ########## USAGE ##########
122 #
123 # IMPORTANT: please follow the following rules when playing with flags
124 # ********************************************************************
125 #
126 # In spec file, call %bcond_with macro at the beginning and test with %with:
127 # -------------------------
128 # | %bcond_with myfeature
129 # | [...]
130 # | %if %{with myfeature}
131 # | [...]
132 # | %endif
133 # | [...]
134 # -------------------------
135 #
136 # To activate an option, use:
137 # -------------------------
138 # | %define _with_myfeature 1
139 # | Macros:
140 # | %_with_myfeature 1
141 # | :Macros
142 # -------------------------
143 #
144 # To disable an option, DON'T set the values to 0, as the option would still be defined
145 # but simply comment the lines: this will undefine the option.
146 # -------------------------
147 # | #%define _with_myfeature 1
148 # | #Macros:
149 # | #%_with_myfeature 1
150 # | #:Macros
151 # -------------------------
152 #
153 # More information here:
154 # https://en.opensuse.org/openSUSE:Build_Service_prjconf#.25bcond
155 #
156
157 ########## flags ##########
158
159 # This build macro controls the libdlog output. If enabled,
160 # libdlog writes to Systemd Journal. If disabled, libdlog writes to kernel Android
161 # logger FIFO. Affects: dlog.
162 # Owner: Mikko <mikko.ylinen@intel.com>
163 Macros:
164 %_with_dlog_to_systemd_journal 1
165 :Macros
166
167 # Macro used to handle bluetooth popups without syspopup/bt-syspopup which needs OSP .
168 # In IVI, this macro permits to address bluetooth notifications (using C API) to notification-service daemon.
169 # Then homescreen is supposed to deal with those notifications and display relevant popups.
170 # Affects: bluetooth-frwk
171 # Owner: Corentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>
172 Macros:
173 %_with_bluetooth_frwk_libnotification 1
174 :Macros
175
176 # Macro used for testing gstreamer 1.X API
177 # Used: qt*
178 # Owner: Philippe Coval <philippe.coval@open.eurogiciel.org>
179 %define _with_gstreamer1 1
180 Macros:
181 %_with_gstreamer1 1
182 :Macros
183
184 # Macro used for testing libva availability
185 # Used: weston
186 # Owner: Philippe Coval <philippe.coval@open.eurogiciel.org>
187 %ifarch x86_64 i586
188 %define _with_libva 1
189 Macros:
190 %_with_libva 1
191 :Macros
192 %endif
193
194 # Macro used for testing Input methods
195 # Used: qt*
196 # Owner: Philippe Coval <philippe.coval@open.eurogiciel.org>
197 #%define _with_tizenscim 1
198 #Macros:
199 #%_with_tizenscim 1
200 #:Macros
201
202 # This build macro controls whether the OS uses
203 # legacy nfc-manager or neard enabled nfc-manager-neard. If enabled,
204 # nfc-manager-neard is used. Affects: nfc CAPI, emulator-plugin-nfc
205 # Owner: Arron Wang <arron.wang@intel.com>
206 Macros:
207 %_with_neard_nfc 1
208 :Macros
209
210 # Uses mobile-specific Samsung patches for PulseAudio. Tizen Mobile needs
211 # this -> Tizen Mobile is compiled with this option.
212 # Owner: Ismo Puustinen <ismo.puustinen@intel.com>
213 # FIXME: Why this extra define in the obs config ?
214 %define _with_pulseaudio_samsung_policy 1
215 Macros:
216 %_with_pulseaudio_samsung_policy 1
217 :Macros
218
219 # Activate introspection
220 # This is needed on GuPNP to build Rygel correctly in IVI
221 # Impacts potentially packages that use gobject-introspection
222 # Owner: Mikko <mikko.ylinen@intel.com>
223 Macros:
224 %_with_introspection 1
225 :Macros
226
227 # Activate KDBUS
228 # This configuration flag enables the support of KDBUS
229 # Used: platform/upstream/setup
230 # Owner: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
231 #%define _with_kdbus 1
232 #Macros:
233 #%_with_kdbus 1
234 #:Macros
235
236 ############################# build config #####################################
237
238 %define gcc_version 49
239 Macros:
240 %gcc_version 49
241 :Macros
242
243 ########## targets ##########
244
245 %ifarch i586
246 Target: i686-tizen-linux
247 %endif
248
249 %ifarch armv7hl
250 Target: armv7hl-tizen-linux
251 %endif
252
253 %ifarch armv7l
254 Target: armv7l-tizen-linux
255 %endif
256
257 %ifarch aarch64
258 Target: aarch64-tizen-linux
259 %endif
260
261 ########## cross build ##########
262
263 %ifarch %arm armv7l
264 Hostarch: x86_64
265 # cross build support for the build hosts
266 Preinstall: qemu-linux-user-cross-arm
267 Keep: qemu-linux-user-cross-arm
268 %endif
269
270 %ifarch armv7hl
271 Preinstall: qemu-accel-armv7hl
272 Runscripts: qemu-accel-armv7hl
273 Preinstall: libmount libblkid libuuid
274 %endif
275
276 %ifarch armv7l
277 Preinstall: qemu-accel-armv7l-cross-arm
278 Runscripts: qemu-accel-armv7l-cross-arm
279 Preinstall: libmount libblkid libuuid
280 %endif
281
282 %ifarch aarch64
283 Hostarch: x86_64
284 Preinstall: qemu-linux-user-cross-arm
285 Keep: qemu-linux-user-cross-arm
286 Preinstall: qemu-accel-aarch64-cross-aarch64
287 Runscripts: qemu-accel-aarch64-cross-aarch64
288 Preinstall: libmount libblkid libuuid
289 %endif # aarch64
290
291 ########## exports for different architectures ##########
292
293 ExportFilter: \.armv7l\.rpm$ armv7l
294 ExportFilter: \.aarch64\.rpm$ aarch64
295 ExportFilter: \.x86_64\.rpm$ x86_64
296
297 ########## buildroot config ##########
298
299 Preinstall: setup filesystem
300 RunScripts: setup
301
302 Preinstall: bash bzip2 coreutils diffutils grep rpm
303 Preinstall: glibc libacl libattr
304 Preinstall: libcap
305 Preinstall: libgcc_s1
306 Preinstall: libpopt sed tar zlib
307 Preinstall: libncurses libreadline
308 Preinstall: libelf libbz2
309 Preinstall: liblzma
310 Preinstall: nss nspr libfreebl3 libsoftokn3
311 Preinstall: libmagic
312 Preinstall: liblua
313 Preinstall: smack libsmack libxml2 libmagic  libmagic-data
314 Preinstall: libsqlite
315 Preinstall: util-linux
316
317 VMinstall: perl libmount libblkid libext2fs libuuid  grep libpcre util-linux libsmartcols
318
319
320 Required: binutils gcc glibc rpm-build libtool
321
322 Support: glibc-locale
323 Support: perl
324 Support: hostname
325 Support: cpio findutils
326 Support: file findutils zlib bzip2
327 Support: gzip hostname net-tools
328 Support: make  patch sed  gawk tar grep coreutils pkg-config
329 Support: m4  tzdata
330 Support: util-linux
331 Support: less
332 Support: which  elfutils
333 Support: update-alternatives
334
335 # FIXME: TO REMOVE (? comes from IVI)
336 Support: gcc-c++
337
338 Keep: cpp%{gcc_version} gcc%{gcc_version} gcc%{gcc_version}-ada libstdc++%{gcc_version}
339 Keep: libstdc++%{gcc_version}-devel gcc%{gcc_version}-c++
340 Keep: cpp gcc libstdc++
341 Keep: pam
342 Keep: binutils cpp  libmagic-data file findutils gawk gcc  gcc-c++
343 Keep: gdbm gzip libada libunwind  glibc-devel libpcre xz-lzma-compat
344 Keep: make  gmp libcap groff cpio
345 Keep: patch rpm-build  nss nspr elfutils python grep libgcc gcc-c++
346 Keep: kernel-headers  perl-libs perl
347 Keep: pkgconfig glib2 tizen-rpm-config
348 Keep: libmpc libmpfr libppl libgmp libppl_c
349 Keep: libcloog libppl libgmpxx
350 Keep: nss-softokn-freebl libmagic libmagic-data
351 Keep: setup
352 Keep: update-alternatives
353 Prefer: libstdc++%{gcc_version} libgcc%{gcc_version}
354 Prefer: libstdc++%{gcc_version}-32bit libstdc++%{gcc_version}-64bit
355
356 Substitute: gettext gettext-tools
357
358 %ifarch x86_64
359 Substitute: glibc-devel-32bit glibc-devel-32bit glibc-32bit
360 %else
361 Substitute: glibc-devel-32bit
362 %endif
363
364 ########## compilation flags ##########
365
366 %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 -fdiagnostics-color=never
367
368 Optflags: i686 %{__global_cflags} -m32 -march=i686 -mtune=i686 -msse4.2 -mfpmath=sse -fasynchronous-unwind-tables -fno-omit-frame-pointer
369
370 Optflags: x86_64 %{__global_cflags} -m64 -march=corei7 -mtune=corei7-avx -msse4.2 -mfpmath=sse -fasynchronous-unwind-tables -fno-omit-frame-pointer
371
372 #generic arm platform
373 #Optflags: armv7l %{__global_cflags} -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=vfpv3 -mfloat-abi=softfp -Wp,-D__SOFTFP__
374 #activate neon FPU instructions set (crosswalk build)
375 Optflags: armv7l %{__global_cflags} -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -Wp,-D__SOFTFP__
376
377 Optflags: aarch64 %{__global_cflags} -march=armv8-a+fp+simd+crc+crypto