summaryrefslogtreecommitdiff
path: root/packaging/qt5.spec
blob: 7331b8ff257b006d391def2e73ee452660bd5092 (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
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
# The MIT License (MIT)
# 
# Copyright (c) 2013 Tomasz Olszak <olszak.tomasz@gmail.com>
# 
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# 
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

# This file is based on qtbase.spec from Mer project
# http://merproject.org

# libQtPlatformSupport is not built as a shared library, only as a
# static .a lib-archive. By default the OBS build removes all discovered
# libFOO.a files and as such rpmlint never complains about
# installed-but-unpackaged static libs.
# This flag tells rpmbuild to behave.

%define _with_xkbcommon 1
%define xkb_config_root %{nil}

%bcond_with tizenscim
%bcond_with xkbcommon
%bcond_with wayland
%bcond_with x
%bcond_with cups
%bcond_with xscrnsaver

# Version is the date of latest commit in qtbase, followed by 'g' + few
# characters of the last git commit ID.
# NOTE: tarball's prefix is 'qt5-base' until version number starts to
# make sense. This allows to update spec contents easily as snapshots
# evolve.
Name:       qt5
Summary:    Cross-platform application and UI framework
Version:    5.5.90+alpha1
Release:    0
Group:      Base/Libraries
License:    LGPL-2.1+ or GPL-3.0
URL:        http://qt.digia.com
Source0:    %{name}-%{version}.tar.bz2
Source1:    macros.qt5-default
Source100:  qtbase-rpmlintrc
Source1001: %{name}.manifest
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(icu-uc)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(libxslt)
BuildRequires:  pkgconfig(openssl)
BuildRequires:  pkgconfig(sqlite3)
BuildRequires:  pkgconfig(zlib)
BuildRequires:  pkgconfig(udev)
BuildRequires:  pkgconfig(mtdev)
%if %{with cups}
BuildRequires:  cups-devel
%endif
BuildRequires:  fdupes
BuildRequires:  flex
BuildRequires:  libjpeg-devel
BuildRequires:  pam-devel
BuildRequires:  readline-devel
BuildRequires:  python
BuildRequires:  pkgconfig(fontconfig)
%if %{with xkbcommon}
BuildRequires:  pkgconfig(xkbcommon)
%endif
BuildRequires:  pkgconfig(egl)
%if %{with tizenscim}
BuildRequires:  pkgconfig(scim)
%endif
BuildRequires:  pkgconfig(gles20)
%if %{with x}
BuildRequires:  pkgconfig(ice)
BuildRequires:  pkgconfig(sm)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xcursor)
BuildRequires:  pkgconfig(xcomposite)
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(xft)
BuildRequires:  pkgconfig(xi)
BuildRequires:  pkgconfig(xinerama)
BuildRequires:  pkgconfig(xmu)
BuildRequires:  pkgconfig(xrandr)
BuildRequires:  pkgconfig(xt)
BuildRequires:  pkgconfig(xtst)
BuildRequires:  pkgconfig(xv)
BuildRequires:  pkgconfig(aul)
BuildRequires:  pkgconfig(xdamage)
BuildRequires:  pkgconfig(xfixes)
BuildRequires:  pkgconfig(xrender)
%if %{with xscrnsaver}
BuildRequires:  pkgconfig(xscrnsaver)
%endif
%endif


%description
Qt is a cross-platform application and UI framework. Using Qt, you can
write web-enabled applications once and deploy them across desktop,
mobile and embedded systems without rewriting the source code.

%package tools
Summary:    Development tools for qtbase
Group:      Base/Libraries
Requires:   qtchooser

%description tools
This package contains useful tools for Qt development

%package qtcore
Summary:    The QtCore library
Group:      Base/Libraries
Requires(post):     /sbin/ldconfig
Requires(postun):   /sbin/ldconfig

%description qtcore
This package contains the QtCore library

%package qtcore-devel
Summary:    Development files for QtCore
Group:      Base/Libraries
Requires:   %{name}-qmake
Requires:   %{name}-tools
Requires:   %{name}-qtcore = %{version}-%{release}
Requires:   fontconfig-devel
Requires:   qtchooser

%description qtcore-devel
This package contains the files necessary to develop applications
that use the QtCore


%package qmake
Summary:    QMake
Group:      Base/Libraries
Requires:   qtchooser

%description qmake
This package contains qmake


%package plugin-bearer-connman
Summary:    Connman bearer plugin
Group:      Base/Libraries
Requires:   %{name}-qtcore = %{version}-%{release}

%description plugin-bearer-connman
This package contains the connman bearer plugin


%package plugin-bearer-generic
Summary:    Connman generic plugin
Group:      Base/Libraries
Requires:   %{name}-qtcore = %{version}-%{release}

%description plugin-bearer-generic
This package contains the connman generic bearer plugin


%package plugin-bearer-nm
Summary:    Connman generic plugin
Group:      Base/Libraries
Requires:   %{name}-qtcore = %{version}-%{release}

%description plugin-bearer-nm
This package contains the connman NetworkManager bearer plugin


%package plugin-imageformat-gif
Summary:    Gif image format plugin
Group:      Base/Libraries
Requires:   %{name}-qtcore = %{version}-%{release}

%description plugin-imageformat-gif
This package contains the gif imageformat plugin


%package plugin-imageformat-ico
Summary:    Ico image format plugin
Group:      Base/Libraries
Requires:   %{name}-qtcore = %{version}-%{release}

%description plugin-imageformat-ico
This package contains the ico imageformat plugin


%package plugin-imageformat-jpeg
Summary:    JPEG image format plugin
Group:      Base/Libraries
Requires:   %{name}-qtcore = %{version}-%{release}

%description plugin-imageformat-jpeg
This package contains the JPEG imageformat plugin

%package plugin-platform-minimal
Summary:    Minimal platform plugin
Group:      Base/Libraries
Requires:   %{name}-qtcore = %{version}-%{release}

%description plugin-platform-minimal
This package contains the minimal platform plugin

%package plugin-platform-offscreen
Summary:    Offscreen platform plugin
Group:      Base/Libraries
Requires:   %{name}-qtcore = %{version}-%{release}

%description plugin-platform-offscreen
This package contains the offscreen platform plugin

%package plugin-platform-eglfs
Summary:    Eglfs platform plugin
Group:      Base/Libraries
Requires:   %{name}-qtcore = %{version}-%{release}

%description plugin-platform-eglfs
This package contains the eglfs platform plugin

%package plugin-platform-minimalegl
Summary:    Minimalegl platform plugin
Group:      Base/Libraries
Requires:   %{name}-qtcore = %{version}-%{release}

%description plugin-platform-minimalegl
This package contains the minimalegl platform plugin

%package plugin-platform-linuxfb
Summary:    Linux framebuffer platform plugin
Group:      Base/Libraries
Requires:   %{name}-qtcore = %{version}-%{release}

%description plugin-platform-linuxfb
This package contains the linuxfb platform plugin for Qt

%if %{with x}

%package plugin-platform-xcb
Summary:    XCB platform plugin
Group:      Base/Libraries
Requires:   %{name}-qtcore = %{version}-%{release}

%description plugin-platform-xcb
This package contains the XCB platform plugin

%endif

%if %{with cups}
%package plugin-printsupport-cups
Summary:    CUPS print support plugin
Group:      Base/Libraries
Requires:   %{name}-qtcore = %{version}-%{release}

%description plugin-printsupport-cups
This package contains the CUPS print support plugin
%endif

%package plugin-sqldriver-sqlite
Summary:    Sqlite sql driver plugin
Group:      Base/Libraries
Requires:   %{name}-qtcore = %{version}-%{release}

%description plugin-sqldriver-sqlite
This package contains the sqlite sql driver plugin

%package plugin-platforminputcontext-ibus
Summary:    The ibus platform import context plugin
Group:      Base/Libraries
Requires:   %{name}-qtcore = %{version}-%{release}

%description plugin-platforminputcontext-ibus
This package contains the ibus platform input context plugin

%if %{with x}
%package plugin-platforminputcontext-compose
Summary:    Compose input context platform plugin
Group:      Base/Libraries
Requires:   %{name}-qtcore = %{version}-%{release}

%description plugin-platforminputcontext-compose
This package contains compose platform inputcontext plugin
%endif

%if %{with tizenscim}
%package plugin-platform-inputcontext-tizenscim
Summary:    tizenscim input context platform plugin
Group:      Qt/Qt
Requires:   %{name}-qtcore = %{version}-%{release}

%description plugin-platform-inputcontext-tizenscim
This package contains tizenscim platform inputcontext plugin
%endif

%package plugin-generic-tuiotouch
Summary:    The TuioTouch generic plugin
Group:      Base/Libraries
Requires:   %{name}-qtcore = %{version}-%{release}

%description plugin-generic-tuiotouch
This package contains evdev plugins

%package plugin-generic-evdev
Summary:    The evdev generic plugin
Group:      Base/Libraries
Requires:   %{name}-qtcore = %{version}-%{release}

%description plugin-generic-evdev
This package contains evdev plugins

%package qtdbus
Summary:    The QtDBus library
Group:      Base/Libraries
Requires(post):     /sbin/ldconfig
Requires(postun):   /sbin/ldconfig

%description qtdbus
This package contains the QtDBus library


%package qtdbus-devel
Summary:    Development files for QtDBus
Group:      Base/Libraries
Requires:   %{name}-qtdbus = %{version}-%{release}
Requires:   pkgconfig(dbus-1)

%description qtdbus-devel
This package contains the files necessary to develop
applications that use QtDBus

%package qtegldeviceintegration
Summary:    The Qt5EglDeviceIntegration library
Group:      Base/Libraries
Requires(post):     /sbin/ldconfig
Requires(postun):   /sbin/ldconfig

%description qtegldeviceintegration
This package contains the Qt5EglDeviceIntegration library


%package qtegldeviceintegration-devel
Summary:    Development files for Qt5EglDeviceIntegration
Group:      Base/Libraries
Requires:   %{name}-qtdbus = %{version}-%{release}
Requires:   pkgconfig(dbus-1)

%description qtegldeviceintegration-devel
This package contains the files necessary to develop
applications that use Qt5EglDeviceIntegration

%package qtgui
Summary:    The QtGui Library
Group:      Base/Libraries
Requires(post):     /sbin/ldconfig
Requires(postun):   /sbin/ldconfig
%if %{with wayland}
Recommends: qt5-qtwayland
%endif

%description qtgui
This package contains the QtGui library


%package qtgui-devel
Summary:    Development files for QtGui
Group:      Base/Libraries
Requires:   %{name}-qtgui = %{version}-%{release}
Requires:   %{name}-qtopengl-devel

%description qtgui-devel
This package contains the files necessary to develop
applications that use QtGui


%package qtnetwork
Summary:    The QtNetwork library
Group:      Base/Libraries
Requires(post):     /sbin/ldconfig
Requires(postun):   /sbin/ldconfig

%description qtnetwork
This package contains the QtNetwork library


%package qtnetwork-devel
Summary:    Development files for QtNetwork
Group:      Base/Libraries
Requires:   %{name}-qtnetwork = %{version}-%{release}

%description qtnetwork-devel
This package contains the files necessary to develop
applications that use QtNetwork

%package qtopengl
Summary:    The QtOpenGL library
Group:      Base/Libraries
Requires(post):     /sbin/ldconfig
Requires(postun):   /sbin/ldconfig

%description qtopengl
This package contains the QtOpenGL library


%package qtopengl-devel
Summary:    Development files for QtOpenGL
Group:      Base/Libraries
Requires:   %{name}-qtopengl = %{version}-%{release}
Requires:   pkgconfig(gles20)
Requires:   pkgconfig(egl)


%description qtopengl-devel
This package contains the files necessary to develop
applications that use QtOpenGL


%package qtsql
Summary:    The QtSql library
Group:      Base/Libraries
Requires(post):     /sbin/ldconfig
Requires(postun):   /sbin/ldconfig

%description qtsql
This package contains the QtSql library

%package qtsql-devel
Summary:    Development files for QtSql
Group:      Base/Libraries
Requires:   %{name}-qtsql = %{version}-%{release}

%description qtsql-devel
This package contains the files necessary to develop
applications that use QtSql


%package qttest
Summary:    The QtTest library
Group:      Base/Libraries
Requires(post):     /sbin/ldconfig
Requires(postun):   /sbin/ldconfig

%description qttest
This package contains the QtTest library


%package qttest-devel
Summary:    Development files for QtTest
Group:      Base/Libraries
Requires:   %{name}-qttest = %{version}-%{release}

%description qttest-devel
This package contains the files necessary to develop
applications that use QtTest


%package qtxml
Summary:    The QtXml library
Group:      Base/Libraries
Requires(post):     /sbin/ldconfig
Requires(postun):   /sbin/ldconfig

%description qtxml
This package contains the QtXml library

%package qtxml-devel
Summary:    Development files for QtXml
Group:      Base/Libraries
Requires:   %{name}-qtxml = %{version}-%{release}

%description qtxml-devel
This package contains the files necessary to develop
applications that use QtXml


%package qtwidgets
Summary:    The QtWidgets library
Group:      Base/Libraries
Requires(post):     /sbin/ldconfig
Requires(postun):   /sbin/ldconfig

%description qtwidgets
This package contains the QtWidgets library

%package qtwidgets-devel
Summary:    Development files for QtWidgets
Group:      Base/Libraries
Requires:   %{name}-qtwidgets = %{version}-%{release}

%description qtwidgets-devel
This package contains the files necessary to develop
applications that use QtWidgets

%package qtplatformsupport-devel
Summary:    Development files for QtPlatformSupport
Group:      Base/Libraries

%description qtplatformsupport-devel
This package contains the files necessary to develop
applications that use QtPlatformSupport

%package qtbootstrap-devel
Summary:    Development files for QtBootstrap
Group:      Base/Libraries

%description qtbootstrap-devel
This package contains the files necessary to develop
applications that use QtBootstrap

%package qtprintsupport
Summary:    The QtPrintSupport
Group:      Base/Libraries
Requires(post):     /sbin/ldconfig
Requires(postun):   /sbin/ldconfig

%description qtprintsupport
This package contains the QtPrintSupport library

%package qtprintsupport-devel
Summary:    Development files for QtPrintSupport
Group:      Base/Libraries
Requires:   %{name}-qtprintsupport = %{version}-%{release}

%description qtprintsupport-devel
This package contains the files necessary to develop
applications that use QtPrintSupport

%package qtconcurrent
Summary:    QtConcurrent library
Group:      Base/Libraries
Requires(post):     /sbin/ldconfig
Requires(postun):   /sbin/ldconfig

%description qtconcurrent
This package contains the QtConcurrent library

%package qtconcurrent-devel
Summary:    Development files for QtConcurrent
Group:      Base/Libraries
Requires:   %{name}-qtconcurrent = %{version}-%{release}

%description qtconcurrent-devel
This package contains the files necessary to develop
applications that use QtConcurrent

%package -n qt5-default
Summary:    Qt5 development defaults packafge
Group:      Development/Libraries
Requires:   qtchooser
Provides:   qt-default
Conflicts:   qt4-default

%description -n qt5-default
Qt is a cross-platform application and UI framework. Using Qt, you can write
web-enabled applications once and deploy them across desktop, mobile and
embedded operating systems without rewriting the source code.

This package contains the Qt5 development defaults package



##### Build section

%prep
%setup -q -n qt5-%{version}

%build
cp %{SOURCE1001} .
touch .git

%ifarch %arm armv7l %{aarch64}
export CFLAGS="$(echo $CFLAGS| sed 's/-mfpu=neon//gi')"
export CXXFLAGS="$(echo $CXXFLAGS| sed 's/-mfpu=neon//gi')"
%endif

%ifarch %arm armv7l %{aarch64}
unset CFLAGS CXXFLAGS LFLAGS
%endif

MAKEFLAGS=%{?_smp_mflags} \
./configure --disable-static \
    -confirm-license \
%if ! 0%{?qt5_release_build}
    -developer-build \
    -no-warnings-are-errors \
%endif
    -platform linux-g++-tizen \
%if 0%{?_with_emulator:1}
    -device-option TIZEN_EMULATOR=1 \
%endif
%if %{with tizenscim}
    -device-option DEFINES+=TIZEN_SCIM=1 \
%endif
%if %{with wayland}
    -qpa wayland \
%else
%if %{with x}
    -qpa xcb \
%endif
%endif
    -opengl es2 \
    -prefix "%{_prefix}" \
    -bindir "%{_libdir}/qt5/bin" \
    -libdir "%{_libdir}" \
    -docdir "%{_docdir}/qt5/" \
    -headerdir "%{_includedir}/qt5" \
    -datadir "%{_datadir}/qt5" \
    -plugindir "%{_libdir}/qt5/plugins" \
    -importdir "%{_libdir}/qt5/imports" \
    -translationdir "%{_datadir}/qt5/translations" \
    -sysconfdir "%{_sysconfdir}/xdg" \
    -examplesdir "%{_libdir}/qt5/examples" \
    -archdatadir "%{_datadir}/qt5" \
    -testsdir "%{_libdir}/qt5/tests" \
    -qmldir "%{_libdir}/qt5/qml" \
    -libexecdir "%{_libdir}/qt5/libexec" \
    -opensource \
    -no-sql-ibase \
    -no-sql-mysql \
    -no-sql-odbc \
    -no-sql-psql \
    -plugin-sql-sqlite \
    -no-sql-sqlite2 \
    -no-sql-tds \
    -system-sqlite \
    -audio-backend \
    -system-zlib \
    -system-libpng \
    -system-libjpeg \
    -no-rpath \
    -optimized-qmake \
    -dbus-linked \
%if ! 0%{?qt5_release_build}
    -no-strip \
    -no-separate-debug-info \
%endif
    -verbose \
    -no-gtkstyle \
    -no-openvg \
    -nomake tests \
    -nomake examples \
    -no-xinput2 \
    -qt-xkbcommon \
    %{xkb_config_root} \
%if %{with x}
    -xcb \
%if 0%{?_force_eglx:1}
    -force-eglx \
%endif
    -qt-xcb
%else 
    -no-xcb
%endif


make %{?_smp_mflags}


%install
rm -rf %{buildroot}
INSTALL_ROOT=%{buildroot} %{__make} install

find %{buildroot}%{_docdir}/qt5/ -type f -exec chmod ugo-x {} \;

# Make sure these are around
mkdir -p %{buildroot}%{_includedir}/qt5/
mkdir -p %{buildroot}%{_datadir}/qt5/
mkdir -p %{buildroot}%{_libdir}/qt5/plugins/
mkdir -p %{buildroot}%{_libdir}/qt5/imports/
mkdir -p %{buildroot}%{_libdir}/qt5/translations/
mkdir -p %{buildroot}%{_libdir}/qt5/examples/
#
# Install qmake rpm macros
install -D -p -m 0644 %{_sourcedir}/macros.qt5-default \
%{buildroot}%{_sysconfdir}/rpm/macros.qt5-default

# Add a configuration link for qtchooser - the 5.conf is installed by qtchooser
mkdir -p %{buildroot}%{_sysconfdir}/xdg/qtchooser
ln -s %{_sysconfdir}/xdg/qtchooser/5.conf %{buildroot}%{_sysconfdir}/xdg/qtchooser/default.conf

#
%fdupes %{buildroot}%{_libdir}
%fdupes %{buildroot}%{_includedir}
%fdupes %{buildroot}%{_datadir}


#### Pre/Post section

%post qtcore
/sbin/ldconfig
%postun qtcore
/sbin/ldconfig

%post qtdbus
/sbin/ldconfig
%postun qtdbus
/sbin/ldconfig

%post qtsql
/sbin/ldconfig
%postun qtsql
/sbin/ldconfig

%post qtnetwork
/sbin/ldconfig
%postun qtnetwork
/sbin/ldconfig

%post qtgui
/sbin/ldconfig
%postun qtgui
/sbin/ldconfig

%post qttest
/sbin/ldconfig
%postun qttest
/sbin/ldconfig

%post qtopengl
/sbin/ldconfig
%postun qtopengl
/sbin/ldconfig

%post qtxml
/sbin/ldconfig
%postun qtxml
/sbin/ldconfig

%post qtprintsupport
/sbin/ldconfig
%postun qtprintsupport
/sbin/ldconfig

%post qtwidgets
/sbin/ldconfig
%postun qtwidgets
/sbin/ldconfig

%post qtconcurrent 
/sbin/ldconfig
%postun qtconcurrent 
/sbin/ldconfig

#### File section

# There is no naked qt5 package

%files tools
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/bin/moc
%{_libdir}/qt5/bin/rcc
%{_libdir}/qt5/bin/syncqt.pl
%{_libdir}/qt5/bin/uic
%{_libdir}/qt5/bin/qdoc
%{_libdir}/qt5/bin/qlalr
%{_docdir}/qt5/*

%files qtcore
%defattr(-,root,root,-)
%manifest %{name}.manifest
%dir %{_includedir}/qt5/
%dir %{_datadir}/qt5/
%dir %{_libdir}/qt5/plugins/
%dir %{_libdir}/qt5/imports/
%dir %{_libdir}/qt5/translations/
%dir %{_libdir}/qt5/examples/
%{_libdir}/libQt5Core.so.*

%files qtcore-devel
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_includedir}/qt5/QtCore
%{_libdir}/libQt5Core.prl
%{_libdir}/libQt5Core.la
%{_libdir}/libQt5Core.so
%{_libdir}/pkgconfig/Qt5Core.pc
%{_datadir}/qt5/mkspecs/modules/qt_lib_core.pri
%{_datadir}/qt5/mkspecs/modules/qt_lib_core_private.pri
%{_libdir}/cmake

%files qmake
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/bin/qmake
%{_datadir}/qt5/mkspecs/aix-*
%{_datadir}/qt5/mkspecs/blackberry*
%{_datadir}/qt5/mkspecs/common
%{_datadir}/qt5/mkspecs/cygwin-*
%{_datadir}/qt5/mkspecs/darwin-*
%{_datadir}/qt5/mkspecs/features
%{_datadir}/qt5/mkspecs/freebsd-*
%{_datadir}/qt5/mkspecs/haiku-g++
%{_datadir}/qt5/mkspecs/hpux-*
%{_datadir}/qt5/mkspecs/hpuxi-*
%{_datadir}/qt5/mkspecs/hurd-g++
%{_datadir}/qt5/mkspecs/irix-*
%{_datadir}/qt5/mkspecs/linux-*
%{_datadir}/qt5/mkspecs/lynxos-*
%{_datadir}/qt5/mkspecs/macx-*
%{_datadir}/qt5/mkspecs/netbsd-*
%{_datadir}/qt5/mkspecs/openbsd-*
%{_datadir}/qt5/mkspecs/qconfig.pri
%{_datadir}/qt5/mkspecs/qfeatures.pri
%{_datadir}/qt5/mkspecs/qmodule.pri
%{_datadir}/qt5/mkspecs/qnx*
%{_datadir}/qt5/mkspecs/sco-*
%{_datadir}/qt5/mkspecs/solaris-*
%{_datadir}/qt5/mkspecs/tru64-*
%{_datadir}/qt5/mkspecs/unixware-*
%{_datadir}/qt5/mkspecs/unsupported
%{_datadir}/qt5/mkspecs/win32-g++
%{_datadir}/qt5/mkspecs/win32-icc
%{_datadir}/qt5/mkspecs/win32-msvc20*
%{_datadir}/qt5/mkspecs/wince*
%{_datadir}/qt5/mkspecs/devices
%{_datadir}/qt5/mkspecs/qdevice.pri
%{_datadir}/qt5/mkspecs/winphone-arm-msvc2013
%{_datadir}/qt5/mkspecs/winphone-x86-msvc2013
%{_datadir}/qt5/mkspecs/winrt-arm-msvc2013
%{_datadir}/qt5/mkspecs/winrt-x64-msvc2013
%{_datadir}/qt5/mkspecs/winrt-x86-msvc2013
%{_datadir}/qt5/mkspecs/winrt-arm-msvc2015
%{_datadir}/qt5/mkspecs/winrt-x64-msvc2015
%{_datadir}/qt5/mkspecs/winrt-x86-msvc2015
%config(noreplace) %{_sysconfdir}/rpm/macros.qt5-default

%files qtdbus
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/libQt5DBus.so.*


%files qtdbus-devel
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/bin/qdbuscpp2xml
%{_libdir}/qt5/bin/qdbusxml2cpp
%{_includedir}/qt5/QtDBus
%{_libdir}/libQt5DBus.so
%{_libdir}/libQt5DBus.prl
%{_libdir}/libQt5DBus.la
%{_libdir}/pkgconfig/Qt5DBus.pc
%{_datadir}/qt5/mkspecs/modules/qt_lib_dbus.pri
%{_datadir}/qt5/mkspecs/modules/qt_lib_dbus_private.pri

%files qtegldeviceintegration
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/libQt5EglDeviceIntegration.so.*


%files qtegldeviceintegration-devel
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/libQt5EglDeviceIntegration.so
%{_libdir}/libQt5EglDeviceIntegration.prl
%{_libdir}/libQt5EglDeviceIntegration.la
%{_libdir}/pkgconfig/Qt5EglDeviceIntegration.pc
%{_datadir}/qt5/mkspecs/modules/qt_lib_eglfs_device_lib_private.pri

%files qtgui
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/libQt5Gui.so.*


%files qtgui-devel
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_includedir}/qt5/QtGui
%{_libdir}/libQt5Gui.prl
%{_libdir}/libQt5Gui.la
%{_libdir}/libQt5Gui.so
%{_libdir}/pkgconfig/Qt5Gui.pc
%{_datadir}/qt5/mkspecs/modules/qt_lib_gui.pri
%{_datadir}/qt5/mkspecs/modules/qt_lib_gui_private.pri


%files qtnetwork
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/libQt5Network.so.*


%files qtnetwork-devel
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_includedir}/qt5/QtNetwork
%{_libdir}/libQt5Network.prl
%{_libdir}/libQt5Network.la
%{_libdir}/libQt5Network.so
%{_libdir}/pkgconfig/Qt5Network.pc
%{_datadir}/qt5/mkspecs/modules/qt_lib_network.pri
%{_datadir}/qt5/mkspecs/modules/qt_lib_network_private.pri


%files qtopengl
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/libQt5OpenGL.so.*


%files qtopengl-devel
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_includedir}/qt5/QtOpenGL
%{_includedir}/qt5/QtOpenGLExtensions
%{_libdir}/libQt5OpenGL.prl
%{_libdir}/libQt5OpenGL.la
%{_libdir}/libQt5OpenGLExtensions.prl
%{_libdir}/libQt5OpenGLExtensions.la
%{_libdir}/libQt5OpenGL.so
%{_libdir}/libQt5OpenGLExtensions.a
%{_libdir}/pkgconfig/Qt5OpenGL.pc
%{_libdir}/pkgconfig/Qt5OpenGLExtensions.pc
%{_datadir}/qt5/mkspecs/modules/qt_lib_opengl.pri
%{_datadir}/qt5/mkspecs/modules/qt_lib_opengl_private.pri
%{_datadir}/qt5/mkspecs/android-g++/qmake.conf
%{_datadir}/qt5/mkspecs/android-g++/qplatformdefs.h
%{_datadir}/qt5/mkspecs/modules/qt_lib_openglextensions.pri
%{_datadir}/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri


%files qtsql
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/libQt5Sql.so.*


%files qtsql-devel
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_includedir}/qt5/QtSql
%{_libdir}/libQt5Sql.prl
%{_libdir}/libQt5Sql.la
%{_libdir}/libQt5Sql.so
%{_libdir}/pkgconfig/Qt5Sql.pc
%{_datadir}/qt5/mkspecs/modules/qt_lib_sql.pri
%{_datadir}/qt5/mkspecs/modules/qt_lib_sql_private.pri


%files qttest
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/libQt5Test.so.*

%files qttest-devel
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_includedir}/qt5/QtTest
%{_libdir}/libQt5Test.prl
%{_libdir}/libQt5Test.la
%{_libdir}/libQt5Test.so
%{_libdir}/pkgconfig/Qt5Test.pc
%{_datadir}/qt5/mkspecs/modules/qt_lib_testlib.pri
%{_datadir}/qt5/mkspecs/modules/qt_lib_testlib_private.pri

%files qtxml
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/libQt5Xml.so.*

%files qtxml-devel
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_includedir}/qt5/QtXml
%{_libdir}/libQt5Xml.prl
%{_libdir}/libQt5Xml.la
%{_libdir}/libQt5Xml.so
%{_libdir}/pkgconfig/Qt5Xml.pc
%{_datadir}/qt5/mkspecs/modules/qt_lib_xml.pri
%{_datadir}/qt5/mkspecs/modules/qt_lib_xml_private.pri

%files qtwidgets
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/libQt5Widgets.so.*

%files qtwidgets-devel
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_includedir}/qt5/QtWidgets
%{_libdir}/libQt5Widgets.prl
%{_libdir}/libQt5Widgets.la
%{_libdir}/libQt5Widgets.so
%{_libdir}/pkgconfig/Qt5Widgets.pc
%{_datadir}/qt5/mkspecs/modules/qt_lib_widgets.pri
%{_datadir}/qt5/mkspecs/modules/qt_lib_widgets_private.pri

%files qtplatformsupport-devel
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_includedir}/qt5/QtPlatformSupport
%{_includedir}/qt5/QtPlatformHeaders
%{_libdir}/libQt5PlatformSupport.prl
%{_libdir}/libQt5PlatformSupport.la
%{_libdir}/libQt5PlatformSupport.a
%{_libdir}/pkgconfig/Qt5PlatformSupport.pc
%{_datadir}/qt5/mkspecs/modules/qt_lib_platformsupport_private.pri

%files qtbootstrap-devel
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/libQt5Bootstrap.prl
%{_libdir}/libQt5Bootstrap.la
%{_libdir}/libQt5Bootstrap.a
%{_libdir}/pkgconfig/Qt5Bootstrap.pc
%{_datadir}/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri

%files qtprintsupport
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/libQt5PrintSupport.so.*

%files qtprintsupport-devel
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_includedir}/qt5/QtPrintSupport
%{_libdir}/libQt5PrintSupport.prl
%{_libdir}/libQt5PrintSupport.la
%{_libdir}/libQt5PrintSupport.so
%{_libdir}/pkgconfig/Qt5PrintSupport.pc
%{_datadir}/qt5/mkspecs/modules/qt_lib_printsupport.pri
%{_datadir}/qt5/mkspecs/modules/qt_lib_printsupport_private.pri

%files qtconcurrent
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/libQt5Concurrent.so.*

%files qtconcurrent-devel
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_includedir}/qt5/QtConcurrent
%{_libdir}/libQt5Concurrent.prl
%{_libdir}/libQt5Concurrent.la
%{_libdir}/libQt5Concurrent.so
%{_libdir}/pkgconfig/Qt5Concurrent.pc
%{_datadir}/qt5/mkspecs/modules/qt_lib_concurrent.pri
%{_datadir}/qt5/mkspecs/modules/qt_lib_concurrent_private.pri

# Plugin packages

%files plugin-bearer-connman
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/plugins/bearer/libqconnmanbearer.so

%files plugin-bearer-generic
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/plugins/bearer/libqgenericbearer.so

%files plugin-bearer-nm
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/plugins/bearer/libqnmbearer.so

%files plugin-imageformat-gif
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/plugins/imageformats/libqgif.so

%files plugin-imageformat-ico
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/plugins/imageformats/libqico.so

%files plugin-imageformat-jpeg
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/plugins/imageformats/libqjpeg.so

%files plugin-platform-minimal
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/plugins/platforms/libqminimal.so

%files plugin-platform-offscreen
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/plugins/platforms/libqoffscreen.so

%files plugin-platform-eglfs
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/plugins/platforms/libqeglfs.so

%files plugin-platform-minimalegl
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/plugins/platforms/libqminimalegl.so

%files plugin-platform-linuxfb
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/plugins/platforms/libqlinuxfb.so

%if %{with x}

%files plugin-platform-xcb
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/plugins/platforms/libqxcb.so

%endif

%if %{with cups}
%files plugin-printsupport-cups
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/plugins/printsupport/libcupsprintersupport.so
%endif

%files plugin-sqldriver-sqlite
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/plugins/sqldrivers/libqsqlite.so

%files plugin-platforminputcontext-ibus
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so

%if %{with x}
%files plugin-platforminputcontext-compose
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so
%endif

%if %{with tizenscim}
%files plugin-platform-inputcontext-tizenscim
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/plugins/platforminputcontexts/libtizenscimplatforminputcontextplugin.so
%endif

%files plugin-generic-evdev
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/plugins/generic/libqevdev*plugin.so

%files plugin-generic-tuiotouch
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_libdir}/qt5/plugins/generic/libqtuiotouchplugin.so

%files -n qt5-default
%defattr(-,root,root,-)
%manifest %{name}.manifest
%{_sysconfdir}/xdg/qtchooser/default.conf

#### No changelog section, separate $pkg.changes contains the history