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