summaryrefslogtreecommitdiff
path: root/build-target.conf
blob: 1c09eb4d055bbe1fad49973513aa350d29b836b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
%define _project Tizen:2.3:Mobile

### from Tizen:2.3:Mobile
%define _repository emulator

Macros:
%vendor obs://build.tizen.org/Tizen:2.3:Mobile
%_project Tizen:2.3:Mobile

### from Tizen:2.3:Mobile

%_repository emulator
:Macros

Patterntype: rpm-md comps
Release: <CI_CNT>.<B_CNT>
Support: build build-compare
#####################################
Substitute: gettext gettext-tools
Ignore: pkg-config
#####################################
Prefer: opengl-es-virtual-drv opengl-es-virtual-drv-devel

%ifarch armv7l armv7el
Substitute: libncurses ncurses-libs 
Substitute: libncurses-devel ncurses-devel
Preinstall: nss
Ignore: bash:libncurses
%endif
Support: util-linux
VMinstall: util-linux libblkid libuuid
%ifarch %arm armv7l
ExportFilter: \.i586\.rpm$ i586
ExportFilter: \.x86_64\.rpm$ x86_64
%endif
%ifarch %ix86 x86_64
ExportFilter: \.armv5el\.rpm$ armv5el
ExportFilter: \.armv5tel\.rpm$ armv5el
ExportFilter: \.armv6el\.rpm$ armv6el
ExportFilter: \.armv6l\.rpm$ armv6el
ExportFilter: \.armv6vl\.rpm$ armv6el
ExportFilter: \.armv7el\.rpm$ armv7el
ExportFilter: \.armv7l\.rpm$ armv7l armv7el
ExportFilter: \.armv7vl\.rpm$ armv7el
ExportFilter: \.armv7hl\.rpm$ armv7hl armv8el
ExportFilter: \.armv7thl\.rpm$ armv7thl armv8el
ExportFilter: \.armv7tnhl\.rpm$ armv7tnhl armv8el
ExportFilter: \.armv7nhl\.rpm$ armv7nhl armv8el
%endif
%ifarch aarch64
ExportFilter: ^qemu-linux-user.*\..*\.rpm$ . armv7l armv7hl aarch64
ExportFilter: ^qemu-accel-armv7hl.*\..*\.rpm$ . armv7hl
ExportFilter: ^qemu-accel-armv7l.*\..*\.rpm$ . armv7l
ExportFilter: ^qemu-accel-aarch64.*\..*\.rpm$ . aarch64
ExportFilter: ^.*cross-aarch64.*\.rpm$ . aarch64
ExportFilter: \.armv7l\.rpm$ armv7l
ExportFilter: \.aarch64\.rpm$ aarch64
ExportFilter: \.x86_64\.rpm$ x86_64
%endif
# filter out packages of cross setup on ia32
ExportFilter: .*vanish\.rpm
PublishFilter: .*vanish\.rpm
ExportFilter: .*dontuse\.rpm
PublishFilter: .*dontuse\.rpm
Prefer: coreutils
#
# ARM Start
#
%ifarch %arm
# arm land
Hostarch: i586
Preinstall: qemu.x86_64

%define cross_5 1
%define cross_7 1
%define native 1
%define cross_7h 1
%ifarch armv8el
Changetarget: armv7hl-tizen-linux
%define _gnu gnueabi
%if %{cross_7h}
Prefer: cross-armv7hl-binutils-accel-armv7hl
Prefer: cross-armv7hl-gcc-accel-armv7hl
%define speedcommon 1
%define speedbash 1
%define speedbinutils 1
%define speedgcc 1
%define native 0
%define speedtools 1
Support: cross-armv7tnhl-platformfile
%endif
%endif

########################
# preselect rpm targets
# more ifs for _repository possible as needed
#########################
%ifarch armv5el
Changetarget: armv5tel-tizen-linux
%define _gnu gnueabi
%if %{cross_5}
%define speedcommon 1
%define speedbash 1
%define speedbinutils 1
%define speedgcc 1
%define native 0
%endif
%endif
%ifarch armv6el
Changetarget: armv6l-tizen-linux
%define _gnu gnueabi
%endif
%ifarch armv7l armv7el
Changetarget: armv7l-tizen-linux
%define _gnu gnueabi
%if %{cross_7}
Support: cross-armv7l-platformfile
Prefer: cross-armv7l-binutils-accel-armv7l
Prefer: cross-armv7l-gcc-accel-armv7l
%define speedcommon 1
%define speedbash 1
%define speedbinutils 1
%define speedgcc 1
%define native 0
%define speedtools 1
%endif
%endif
%ifarch aarch64
Target: aarch64-tizen-linux
%endif
%ifarch aarch64
Hostarch: x86_64
Preinstall: qemu-accel-aarch64-cross-aarch64
Runscripts: qemu-accel-aarch64-cross-aarch64
Preinstall: libmount libblkid libuuid
Macros:
%_use_internal_dependency_generator 1
:Macros
%endif # aarch64
%if %speedtools
Support: patch-x86-arm findutils-x86-arm gawk-x86-arm fdupes-x86-arm 
Preinstall: libfile-x86-arm
Preinstall: elfutils-libelf-x86-arm
Preinstall: nss-softokn-freebl-x86-arm
Preinstall: nss-x86-arm
Preinstall: nspr-x86-arm
Preinstall: libgcc-x86-arm
Preinstall: libacl-x86-arm
Preinstall: libattr-x86-arm
Preinstall: libcap-x86-arm
Preinstall: liblua-x86-arm
Preinstall: popt-x86-arm
Preinstall: xz-libs-x86-arm
Preinstall: zlib-x86-arm
Preinstall: file
Preinstall: sqlite-x86-arm
Preinstall: mpfr-x86-arm
Preinstall: gmp-x86-arm
Preinstall: mpc-x86-arm
Preinstall: bzip2-libs-x86-arm
Preinstall: rpm-x86-arm
Preinstall: rpm-libs-x86-arm
Required: tar-x86-arm
Required: sed-x86-arm
Required: elfutils-x86-arm
Required: elfutils-libs-x86-arm
Required: elfutils-libelf-x86-arm
Required: diffutils-x86-arm
Required: gzip-x86-arm
Required: libgcc-x86-arm
Required: libacl-x86-arm
Required: libattr-x86-arm
Required: coreutils
Required: coreutils-x86-arm
Required: libcap-x86-arm
Required: liblua-x86-arm
Required: popt-x86-arm
Required: xz-libs-x86-arm
Required: zlib-x86-arm
Required: file
Required: file-x86-arm
Required: make
Required: make-x86-arm
Required: libfile-x86-arm
Required: sqlite-x86-arm
Required: rpm-x86-arm
Required: rpm-libs-x86-arm
Required: rpm-build-x86-arm
Runscripts: rpm-x86-arm
Runscripts: rpm-libs-x86-arm
Runscripts: rpm-build-x86-arm
Support: !rpmlint-mini
Support: !rpmlint-mini-x86-arm
Prefer: python-libs
%endif

%if %speedcommon
# cross-compilation/speedup
Preinstall: tizen-accelerator eglibc-x86-arm 
Runscripts: tizen-accelerator
Required: tizen-accelerator
%endif
%if %speedbash
# bash
Preinstall: ncurses-libs-x86-arm
Preinstall: bash-x86-arm 
Runscripts: bash-x86-arm
%endif
%if %speedbinutils
Required: cross-arm-binutils-accel
%endif
%if %speedgcc
Required: cross-arm-gcc-accel
%endif
Preinstall: rpm
Preinstall: rpm-libs
Required: rpm
Prefer: rpm-libs
Prefer: rpm
# now i586 land
%else
 
Ignore: ncurses-libs-x86 libncurses-x86
Preinstall: rpm rpm-libs
Required: rpm
%endif
#
# ARM End
#
Preinstall: setup filesystem tizen-release
Preinstall: bash bzip2 coreutils diffutils liblua
Preinstall: eglibc eglibc-common libacl libattr
Preinstall: libgcc libcap
Preinstall: popt readline sed tar zlib sqlite
Preinstall: ncurses-libs
Preinstall: elfutils-libelf bzip2-libs libstdc++ setup libfile
Preinstall: xz-libs 
Preinstall: nss nspr
Preinstall: nss-softokn-freebl
Runscripts: setup
VMinstall: perl libblkid e2fsprogs-libs libuuid perl-libs grep libpcre 
Preinstall: 
Required: binutils gcc eglibc rpm-build libtool lzo-devel
Support: cpio gcc-c++ perl-libs perl findutils
Support: perl-HTML-Tagset
Support: perl-IO-Compress-Base
Support: perl-Module-Pluggable
Support: perl-Pod-Escapes
Support: perl-TimeDate
Support: perl-Compress-Raw-Zlib
Support: perl-ExtUtils-ParseXS
Support: perl-Pod-Simple
Support: perl-Test-Simple
Support: perl-IO-Compress-Zlib
Support: perl-Test-Harness
Support: perl-ExtUtils-MakeMaker
Support: perl-CPAN
Support: file findutils zlib bzip2 
Support: gzip 
Support: ncurses-libs
Support: net-tools
Support: make patch sed gawk tar grep coreutils pkgconfig autoconf automake
Support: m4 libfile tzdata tizen-release
Support: kernel-headers eglibc-headers
Support: xz-lzma-compat
Keep: binutils cpp file findutils gawk gcc gcc-c++
Keep: gdbm gzip libada libunwind eglibc-devel libpcre xz-lzma-compat 
Keep: make gmp libcap groff cpio
Keep: patch rpm-build nss nspr elfutils python grep libgcc gcc-c++ 
Keep: eglibc-headers perl-libs
Keep: pkgconfig glib2 tizen-rpm-config
Keep: xz-lzma-compat
Keep: mpc mpfr tar sed
Keep: cloog cloog-ppl ppl ppl-pwl 
Keep: nss-softokn-freebl
Keep: setup
Ignore: iso-codes:xml-common
##############################################################
# This is for Main project
Prefer: libasound libasound-devel
Prefer: avsystem avsystem-devel
%if %{_repository} == "target"
Prefer: kernel-headers-linux-3.0
%else
Prefer: emulator-kernel-user-headers
%endif
Prefer: libjournal libjournal-proprietary
##############################################################
# This is for Global configuration
# You should uncomment following two options for model project
#Optflags: armv7l -Os -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=vfpv3 -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb
Optflags: aarch64 -O2 -g2 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector -Wformat -Wformat-security -fmessage-length=0
##############################################################
# This is for Global configuration
Macros:
%sec_build_project_name kirana_sdk
%tizen_profile_name mobile
%tizen_crash_enable 1
:Macros
##############################################################
# This is build parameters
%if (0%{!?_repository:1}) || ("%{_repository}" == "target")
Macros:
%tizen_build_binary_release_type_eng 1
%tizen_build_binary_release_type_daily 1
%sec_build_binary_debug_enable 1
%sec_build_binary_crash_enable 1
%tizen_build_binary_release_type_partner 1
%sec_product_feature_multiwindow 0
:Macros
%endif
%if %{_repository} == "emulator"
Macros:
%tizen_build_binary_release_type_eng 1
%sec_build_binary_sdk 1
%sec_build_binary_debug_enable 1
%sec_build_binary_crash_enable 1
%tizen_sdk 1
:Macros
%endif

### from Tizen:2.3:Mobile
%define _repository target

Macros:

### from Tizen:2.3:Mobile
%_repository emulator
##############################################################
# This is temporary global product features

%sec_product_feature_profile_lite 1
%dist %{?sec_build_conf_tizen_product_name}%{!?sec_build_conf_tizen_product_name:slp}
%tizen_version 2.3.0
%tizen 2.3
%vendor tizen
%_vendor tizen
%_default_patch_fuzz 2
# python main version
%py_ver %(echo `python -c "import sys; print sys.version[:3]"`)
# directories
%py_prefix %(echo `python -c "import sys; print sys.prefix"`)
%py_libdir %{py_prefix}/lib/python%{py_ver}
%py_incdir /usr/include/python%{py_ver}
%py_sitedir %{py_libdir}/site-packages
%py_dyndir %{py_libdir}/lib-dynload
# pure python modules compilation
%py_comp python -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
%py_ocomp python -O -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
%ext_info .gz
%ext_man .gz
%info_add(:-:) test -x /sbin/install-info -a -f %{?2}%{?!2:%{_infodir}}/%{1}%ext_info && /sbin/install-info --info-dir=%{?2}%{?!2:%{_infodir}} %{?2}%{?!2:%{_infodir}}/%{1}%ext_info \
%{nil}
%info_del(:-:) test -x /sbin/install-info -a ! -f %{?2}%{?!2:%{_infodir}}/%{1}%ext_info && /sbin/install-info --quiet --delete --info-dir=%{?2}%{?!2:%{_infodir}} %{?2}%{?!2:%{_infodir}}/%{1}%ext_info \
%{nil}
%lang_package \
%package locale \
Summary: Translations and Locale for package %{name}\
Group: Translations\
AutoReqProv: 0\
%description locale\
This package provides translations for package %{name}.\
%files locale -f %{name}.lang\
%defattr(-,root,root,-)\
%{nil}

%docs_package \
%package docs \
Summary: Documentation for package %{name}\
Group: Documentation\
AutoReqProv: 0\
%description docs\
This package provides documentation for package %{name}.\
%files docs -f documentation.list\
%defattr(-,root,root,-)\
%{nil}
%devel_package \
%package devel \
Summary: Development files for package %{name}\
Group: Development\
%description devel\
This package provides header files and other developer releated files for package %{name}.\
%files devel \
%{_includedir}/*\
%{_libdir}/pkgconfig/*.pc\
%{_libdir}/*.so\
%{nil}

%_smp_mflags -j4

%remove_docs \
rm -rf %{?buildroot:%{buildroot}}%{_infodir} \
rm -rf %{?buildroot:%{buildroot}}%{_defaultdocdir} \
rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc/%{name} \
rm -rf %{?buildroot:%{buildroot}}%{_datadir}/gtk-doc \
rm -rf %{?buildroot:%{buildroot}}%{_datadir}/man \
find %{?buildroot:%{buildroot}} -regex ".*/man/man./.*\.[0-9]" | xargs rm -f -- \
find %{?buildroot:%{buildroot}} -regex ".*/man/../man./.*\.[0-9]" | xargs rm -f -- \
find %{?buildroot:%{buildroot}} -regex ".*/man/man./.*\.[0-9]pm" | xargs rm -f --
%distribution Tizen:2.3:Mobile / target
%_project Tizen:2.3:Mobile

### from Tizen:2.3:Mobile

%_repository target
:Macros

Patterntype: rpm-md comps
Release: <CI_CNT>.<B_CNT>
Support: build build-compare
#####################################
Substitute: gettext gettext-tools
Ignore: pkg-config
#####################################
Prefer: opengl-es-virtual-drv opengl-es-virtual-drv-devel

%ifarch armv7l armv7el
Substitute: libncurses ncurses-libs 
Substitute: libncurses-devel ncurses-devel
Preinstall: nss
Ignore: bash:libncurses
%endif
Support: util-linux
VMinstall: util-linux libblkid libuuid
%ifarch %arm armv7l
ExportFilter: \.i586\.rpm$ i586
ExportFilter: \.x86_64\.rpm$ x86_64
%endif
%ifarch %ix86 x86_64
ExportFilter: \.armv5el\.rpm$ armv5el
ExportFilter: \.armv5tel\.rpm$ armv5el
ExportFilter: \.armv6el\.rpm$ armv6el
ExportFilter: \.armv6l\.rpm$ armv6el
ExportFilter: \.armv6vl\.rpm$ armv6el
ExportFilter: \.armv7el\.rpm$ armv7el
ExportFilter: \.armv7l\.rpm$ armv7l armv7el
ExportFilter: \.armv7vl\.rpm$ armv7el
ExportFilter: \.armv7hl\.rpm$ armv7hl armv8el
ExportFilter: \.armv7thl\.rpm$ armv7thl armv8el
ExportFilter: \.armv7tnhl\.rpm$ armv7tnhl armv8el
ExportFilter: \.armv7nhl\.rpm$ armv7nhl armv8el
%endif
%ifarch aarch64
ExportFilter: ^qemu-linux-user.*\..*\.rpm$ . armv7l armv7hl aarch64
ExportFilter: ^qemu-accel-armv7hl.*\..*\.rpm$ . armv7hl
ExportFilter: ^qemu-accel-armv7l.*\..*\.rpm$ . armv7l
ExportFilter: ^qemu-accel-aarch64.*\..*\.rpm$ . aarch64
ExportFilter: ^.*cross-aarch64.*\.rpm$ . aarch64
ExportFilter: \.armv7l\.rpm$ armv7l
ExportFilter: \.aarch64\.rpm$ aarch64
ExportFilter: \.x86_64\.rpm$ x86_64
%endif
# filter out packages of cross setup on ia32
ExportFilter: .*vanish\.rpm
PublishFilter: .*vanish\.rpm
ExportFilter: .*dontuse\.rpm
PublishFilter: .*dontuse\.rpm
Prefer: coreutils
#
# ARM Start
#
%ifarch %arm
# arm land
Hostarch: i586
Preinstall: qemu.x86_64

%define cross_5 1
%define cross_7 1
%define native 1
%define cross_7h 1
%ifarch armv8el
Changetarget: armv7hl-tizen-linux
%define _gnu gnueabi
%if %{cross_7h}
Prefer: cross-armv7hl-binutils-accel-armv7hl
Prefer: cross-armv7hl-gcc-accel-armv7hl
%define speedcommon 1
%define speedbash 1
%define speedbinutils 1
%define speedgcc 1
%define native 0
%define speedtools 1
Support: cross-armv7tnhl-platformfile
%endif
%endif

########################
# preselect rpm targets
# more ifs for _repository possible as needed
#########################
%ifarch armv5el
Changetarget: armv5tel-tizen-linux
%define _gnu gnueabi
%if %{cross_5}
%define speedcommon 1
%define speedbash 1
%define speedbinutils 1
%define speedgcc 1
%define native 0
%endif
%endif
%ifarch armv6el
Changetarget: armv6l-tizen-linux
%define _gnu gnueabi
%endif
%ifarch armv7l armv7el
Changetarget: armv7l-tizen-linux
%define _gnu gnueabi
%if %{cross_7}
Support: cross-armv7l-platformfile
Prefer: cross-armv7l-binutils-accel-armv7l
Prefer: cross-armv7l-gcc-accel-armv7l
%define speedcommon 1
%define speedbash 1
%define speedbinutils 1
%define speedgcc 1
%define native 0
%define speedtools 1
%endif
%endif
%ifarch aarch64
Target: aarch64-tizen-linux
%endif
%ifarch aarch64
Hostarch: x86_64
Preinstall: qemu-accel-aarch64-cross-aarch64
Runscripts: qemu-accel-aarch64-cross-aarch64
Preinstall: libmount libblkid libuuid
Macros:
%_use_internal_dependency_generator 1
:Macros
%endif # aarch64
%if %speedtools
Support: patch-x86-arm findutils-x86-arm gawk-x86-arm fdupes-x86-arm 
Preinstall: libfile-x86-arm
Preinstall: elfutils-libelf-x86-arm
Preinstall: nss-softokn-freebl-x86-arm
Preinstall: nss-x86-arm
Preinstall: nspr-x86-arm
Preinstall: libgcc-x86-arm
Preinstall: libacl-x86-arm
Preinstall: libattr-x86-arm
Preinstall: libcap-x86-arm
Preinstall: liblua-x86-arm
Preinstall: popt-x86-arm
Preinstall: xz-libs-x86-arm
Preinstall: zlib-x86-arm
Preinstall: file
Preinstall: sqlite-x86-arm
Preinstall: mpfr-x86-arm
Preinstall: gmp-x86-arm
Preinstall: mpc-x86-arm
Preinstall: bzip2-libs-x86-arm
Preinstall: rpm-x86-arm
Preinstall: rpm-libs-x86-arm
Required: tar-x86-arm
Required: sed-x86-arm
Required: elfutils-x86-arm
Required: elfutils-libs-x86-arm
Required: elfutils-libelf-x86-arm
Required: diffutils-x86-arm
Required: gzip-x86-arm
Required: libgcc-x86-arm
Required: libacl-x86-arm
Required: libattr-x86-arm
Required: coreutils
Required: coreutils-x86-arm
Required: libcap-x86-arm
Required: liblua-x86-arm
Required: popt-x86-arm
Required: xz-libs-x86-arm
Required: zlib-x86-arm
Required: file
Required: file-x86-arm
Required: make
Required: make-x86-arm
Required: libfile-x86-arm
Required: sqlite-x86-arm
Required: rpm-x86-arm
Required: rpm-libs-x86-arm
Required: rpm-build-x86-arm
Runscripts: rpm-x86-arm
Runscripts: rpm-libs-x86-arm
Runscripts: rpm-build-x86-arm
Support: !rpmlint-mini
Support: !rpmlint-mini-x86-arm
Prefer: python-libs
%endif

%if %speedcommon
# cross-compilation/speedup
Preinstall: tizen-accelerator eglibc-x86-arm 
Runscripts: tizen-accelerator
Required: tizen-accelerator
%endif
%if %speedbash
# bash
Preinstall: ncurses-libs-x86-arm
Preinstall: bash-x86-arm 
Runscripts: bash-x86-arm
%endif
%if %speedbinutils
Required: cross-arm-binutils-accel
%endif
%if %speedgcc
Required: cross-arm-gcc-accel
%endif
Preinstall: rpm
Preinstall: rpm-libs
Required: rpm
Prefer: rpm-libs
Prefer: rpm
# now i586 land
%else
 
Ignore: ncurses-libs-x86 libncurses-x86
Preinstall: rpm rpm-libs
Required: rpm
%endif
#
# ARM End
#
Preinstall: setup filesystem tizen-release
Preinstall: bash bzip2 coreutils diffutils liblua
Preinstall: eglibc eglibc-common libacl libattr
Preinstall: libgcc libcap
Preinstall: popt readline sed tar zlib sqlite
Preinstall: ncurses-libs
Preinstall: elfutils-libelf bzip2-libs libstdc++ setup libfile
Preinstall: xz-libs 
Preinstall: nss nspr
Preinstall: nss-softokn-freebl
Runscripts: setup
VMinstall: perl libblkid e2fsprogs-libs libuuid perl-libs grep libpcre 
Preinstall: 
Required: binutils gcc eglibc rpm-build libtool lzo-devel
Support: cpio gcc-c++ perl-libs perl findutils
Support: perl-HTML-Tagset
Support: perl-IO-Compress-Base
Support: perl-Module-Pluggable
Support: perl-Pod-Escapes
Support: perl-TimeDate
Support: perl-Compress-Raw-Zlib
Support: perl-ExtUtils-ParseXS
Support: perl-Pod-Simple
Support: perl-Test-Simple
Support: perl-IO-Compress-Zlib
Support: perl-Test-Harness
Support: perl-ExtUtils-MakeMaker
Support: perl-CPAN
Support: file findutils zlib bzip2 
Support: gzip 
Support: ncurses-libs
Support: net-tools
Support: make patch sed gawk tar grep coreutils pkgconfig autoconf automake
Support: m4 libfile tzdata tizen-release
Support: kernel-headers eglibc-headers
Support: xz-lzma-compat
Keep: binutils cpp file findutils gawk gcc gcc-c++
Keep: gdbm gzip libada libunwind eglibc-devel libpcre xz-lzma-compat 
Keep: make gmp libcap groff cpio
Keep: patch rpm-build nss nspr elfutils python grep libgcc gcc-c++ 
Keep: eglibc-headers perl-libs
Keep: pkgconfig glib2 tizen-rpm-config
Keep: xz-lzma-compat
Keep: mpc mpfr tar sed
Keep: cloog cloog-ppl ppl ppl-pwl 
Keep: nss-softokn-freebl
Keep: setup
Ignore: iso-codes:xml-common
##############################################################
# This is for Main project
Prefer: libasound libasound-devel
Prefer: avsystem avsystem-devel
%if %{_repository} == "target"
Prefer: kernel-headers-linux-3.0
%else
Prefer: emulator-kernel-user-headers
%endif
Prefer: libjournal libjournal-proprietary
##############################################################
# This is for Global configuration
# You should uncomment following two options for model project
#Optflags: armv7l -Os -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=vfpv3 -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb
Optflags: aarch64 -O2 -g2 -feliminate-unused-debug-types -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector -Wformat -Wformat-security -fmessage-length=0
##############################################################
# This is for Global configuration
Macros:
%sec_build_project_name kirana_sdk
%tizen_profile_name mobile
%tizen_crash_enable 1
:Macros
##############################################################
# This is build parameters
%if (0%{!?_repository:1}) || ("%{_repository}" == "target")
Macros:
%tizen_build_binary_release_type_eng 1
%tizen_build_binary_release_type_daily 1
%sec_build_binary_debug_enable 1
%sec_build_binary_crash_enable 1
%tizen_build_binary_release_type_partner 1
%sec_product_feature_multiwindow 0
:Macros
%endif
%if %{_repository} == "emulator"
Macros:
%tizen_build_binary_release_type_eng 1
%sec_build_binary_sdk 1
%sec_build_binary_debug_enable 1
%sec_build_binary_crash_enable 1
%tizen_sdk 1
:Macros
%endif

Macros:

### from Tizen:2.3:Mobile
%_repository target
##############################################################
# This is temporary global product features

%sec_product_feature_profile_lite 1
%dist %{?sec_build_conf_tizen_product_name}%{!?sec_build_conf_tizen_product_name:slp}
%tizen_version 2.3.0
%tizen 2.3
%vendor tizen
%_vendor tizen
%_default_patch_fuzz 2
# python main version
%py_ver %(echo `python -c "import sys; print sys.version[:3]"`)
# directories
%py_prefix %(echo `python -c "import sys; print sys.prefix"`)
%py_libdir %{py_prefix}/lib/python%{py_ver}
%py_incdir /usr/include/python%{py_ver}
%py_sitedir %{py_libdir}/site-packages
%py_dyndir %{py_libdir}/lib-dynload
# pure python modules compilation
%py_comp python -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
%py_ocomp python -O -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
%ext_info .gz
%ext_man .gz
%info_add(:-:) test -x /sbin/install-info -a -f %{?2}%{?!2:%{_infodir}}/%{1}%ext_info && /sbin/install-info --info-dir=%{?2}%{?!2:%{_infodir}} %{?2}%{?!2:%{_infodir}}/%{1}%ext_info \
%{nil}
%info_del(:-:) test -x /sbin/install-info -a ! -f %{?2}%{?!2:%{_infodir}}/%{1}%ext_info && /sbin/install-info --quiet --delete --info-dir=%{?2}%{?!2:%{_infodir}} %{?2}%{?!2:%{_infodir}}/%{1}%ext_info \
%{nil}
%lang_package \
%package locale \
Summary: Translations and Locale for package %{name}\
Group: Translations\
AutoReqProv: 0\
%description locale\
This package provides translations for package %{name}.\
%files locale -f %{name}.lang\
%defattr(-,root,root,-)\
%{nil}

%docs_package \
%package docs \
Summary: Documentation for package %{name}\
Group: Documentation\
AutoReqProv: 0\
%description docs\
This package provides documentation for package %{name}.\
%files docs -f documentation.list\
%defattr(-,root,root,-)\
%{nil}
%devel_package \
%package devel \
Summary: Development files for package %{name}\
Group: Development\
%description devel\
This package provides header files and other developer releated files for package %{name}.\
%files devel \
%{_includedir}/*\
%{_libdir}/pkgconfig/*.pc\
%{_libdir}/*.so\
%{nil}

%_smp_mflags -j4

%remove_docs \
rm -rf %{?buildroot:%{buildroot}}%{_infodir} \
rm -rf %{?buildroot:%{buildroot}}%{_defaultdocdir} \
rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc/%{name} \
rm -rf %{?buildroot:%{buildroot}}%{_datadir}/gtk-doc \
rm -rf %{?buildroot:%{buildroot}}%{_datadir}/man \
find %{?buildroot:%{buildroot}} -regex ".*/man/man./.*\.[0-9]" | xargs rm -f -- \
find %{?buildroot:%{buildroot}} -regex ".*/man/../man./.*\.[0-9]" | xargs rm -f -- \
find %{?buildroot:%{buildroot}} -regex ".*/man/man./.*\.[0-9]pm" | xargs rm -f --