source: packaging/qt4.spec@ 1082

Last change on this file since 1082 was 1082, checked in by Dmitry A. Kuminov, 14 years ago

packaging: Move headers out of qt4 to /usr/include.

This is to avoid passing -I/usr/include/qt4 to the compiler.

File size: 21.9 KB
Line 
1#
2# http://svn.netlabs.org/qt4
3#
4# If you are a packager, please read HowToDistribute.txt for general
5# instructions.
6#
7
8Name: qt4
9Vendor: netlabs.org
10License: LGPLv2 with exceptions or GPLv3 with exceptions
11Url: http://www.qtsoftware.com/
12
13%define ver_major 4
14%define ver_minor 7
15%define ver_patch 3
16
17%define os2_release 0
18
19%define rpm_release 1
20
21%define svn_revision 1070
22
23%define descr_brief Qt is a software toolkit for developing applications.
24
25%define pkg_wps_base QT4
26%define pkg_wps_folder_id <%{pkg_wps_base}_FOLDER>
27%define pkg_wps_folder_create %{pkg_wps_base}_FOLDER:WPFolder|Qt 4|<WP_DESKTOP>
28%define pkg_wps_view_txt() EXENAME=e.exe;PROGTYPE=PROG_PM;PARAMETERS=((%*))
29
30%define pkg_docdir %{_docdir}/%{name}
31
32%if 0%{?os2_release}
33Version: %{ver_major}.%{ver_minor}.%{ver_patch}.%{os2_release}
34%else
35Version: %{ver_major}.%{ver_minor}.%{ver_patch}
36%endif
37Release: %{rpm_release}
38
39Source: %{name}-%{version}.zip
40
41#BuildRequires: gnumake (when available)
42BuildRequires: libc-devel
43BuildRequires: gcc
44BuildRequires: gcc-wlink
45BuildRequires: gcc-wrc
46#BuildRequires: cups-devel (when available)
47BuildRequires: openssl-devel
48BuildRequires: pthread-devel
49#BuildRequires: mysql-devel (when available)
50#BuildRequires: psql-devel (when available)
51
52# @todo add wrc support to Qt!
53
54#------------------------------------------------------------------------------
55# commons
56#------------------------------------------------------------------------------
57
58# process command line arguments
59%if "%{?QT_SOURCE_TREE}" == ""
60%define QT_SOURCE_TREE .
61%endif
62
63# @todo temporary
64%define skip_prep_export 1
65
66# installation paths
67%define qt_prefix %{_libdir}/%{name}
68%define qt_libdir %{_libdir}
69%define qt_headerdir %{_includedir}
70%define qt_bindir %{qt_prefix}/bin
71%define qt_plugindir %{qt_prefix}/plugins
72%define qt_importdir %{qt_prefix}/imports
73%define qt_demosdir %{qt_prefix}/demos
74%define qt_examplesdir %{qt_prefix}/examples
75%define qt_datadir %{_datadir}/%{name}
76%define qt_docdir %{qt_datadir}/doc
77%define qt_translationdir %{qt_datadir}/translations
78%define qt_sysconfdir %{_sysconfdir}/xdg
79
80# disable lxlite compression (Qt EXEs and DLLs are already compressed)
81%define __os_install_post %{nil}
82
83#------------------------------------------------------------------------------
84# main package
85#------------------------------------------------------------------------------
86
87Summary: Qt 4 runtime
88Group: System Environment/Libraries
89
90%description
91%{descr_brief}
92
93This package contains runtime Qt libraries for console applications, including
94core, network and XML modules.
95
96%files
97%defattr(-,root,root,-)
98%dir %{pkg_docdir}/
99%docdir %{pkg_docdir}/
100%{pkg_docdir}/*
101%if "%{qt_prefix}" != "%{_prefix}"
102%dir %{qt_prefix}/
103%endif
104%if "%{qt_libdir}" != "%{_libdir}"
105%dir %{qt_libdir}/
106%endif
107%if "%{qt_bindir}" != "%{_bindir}"
108%dir %{qt_bindir}/
109%endif
110%dir %{qt_plugindir}
111%{qt_plugindir}/bearer/
112%{qt_plugindir}/codecs/
113%dir %{qt_plugindir}/sqldrivers/
114%{qt_plugindir}/sqldrivers/*
115%exclude %{qt_plugindir}/sqldrivers/qmysql%{ver_major}.dll
116%exclude %{qt_plugindir}/sqldrivers/qpsql%{ver_major}.dll
117%dir %{qt_datadir}/
118%dir %{qt_docdir}/
119%dir %{qt_docdir}/qch/
120%dir %{qt_translationdir}/
121%{qt_translationdir}/qt_??.qm
122%{qt_translationdir}/qt_??_??.qm
123%if "%{qt_sysconfdir}" != "%{_sysconfdir}" && "%{qt_sysconfdir}" != "%{_sysconfdir}/xdg"
124%dir %{qt_sysconfdir}/
125%endif
126%{qt_libdir}/QtCore%{ver_major}.dll
127%{qt_libdir}/QtNet%{ver_major}.dll
128%{qt_libdir}/QtScri%{ver_major}.dll
129%{qt_libdir}/QtSql%{ver_major}.dll
130%{qt_libdir}/QtTest%{ver_major}.dll
131%{qt_libdir}/QtXml%{ver_major}.dll
132%{qt_libdir}/QtXmlP%{ver_major}.dll
133
134%pre
135%warpin_conflicts_begin
136netlabs.org\Qt4\Runtime
137%warpin_conflicts_end
138
139%post
140# clean up the plugin/font cache to remove old entries (@todo other users?)
141rm -f "$HOME/.config/Trolltech.ini"
142
143#------------------------------------------------------------------------------
144%package sql-mysql
145#------------------------------------------------------------------------------
146
147Summary: Qt 4 MySQL database driver
148Group: System Environment/Libraries
149
150Requires: %{name} = %{version}-%{release}
151
152%description sql-mysql
153%{descr_brief}
154
155This package contains the MySQL plugin for Qt 4.
156
157%files sql-mysql
158%defattr(-,root,root,-)
159%{qt_plugindir}/sqldrivers/qmysql%{ver_major}.dll
160
161#------------------------------------------------------------------------------
162%package sql-psql
163#------------------------------------------------------------------------------
164
165Summary: Qt 4 PostgreSQL database driver
166Group: System Environment/Libraries
167
168Requires: %{name} = %{version}-%{release}
169
170%description sql-psql
171%{descr_brief}
172
173This package contains the PostgreSQL plugin for Qt 4.
174
175%files sql-psql
176%defattr(-,root,root,-)
177%{qt_plugindir}/sqldrivers/qpsql%{ver_major}.dll
178
179#------------------------------------------------------------------------------
180%package pm
181#------------------------------------------------------------------------------
182
183Summary: Qt 4 GUI runtime
184Group: System Environment/Libraries
185
186Requires: %{name} = %{version}-%{release}
187
188%description pm
189%{descr_brief}
190
191This package contains runtime Qt libraries for Presentation Manager GUI
192applications.
193
194%files pm
195%defattr(-,root,root,-)
196%dir %{qt_plugindir}/designer
197%{qt_plugindir}/designer/qdeclv.dll
198%{qt_plugindir}/accessible/
199%{qt_plugindir}/graphicssystems/
200%{qt_plugindir}/iconengines/
201%{qt_plugindir}/imageformats/
202%{qt_plugindir}/qmltooling/
203%{qt_translationdir}/qt_help_??.qm
204%{qt_translationdir}/qt_help_??_??.qm
205%dir %{qt_importdir}/
206%{qt_importdir}/Qt/
207%{qt_libdir}/QtCLuc%{ver_major}.dll
208%{qt_libdir}/QtDecl%{ver_major}.dll
209%{qt_libdir}/QtGui%{ver_major}.dll
210%{qt_libdir}/QtHelp%{ver_major}.dll
211%{qt_libdir}/QtScTl%{ver_major}.dll
212%{qt_libdir}/QtSvg%{ver_major}.dll
213
214#------------------------------------------------------------------------------
215%package webkit
216#------------------------------------------------------------------------------
217
218Summary: Qt 4 WebKit runtime
219Group: System Environment/Libraries
220
221Requires: %{name}-pm = %{version}-%{release}
222
223%description webkit
224%{descr_brief}
225
226This package contains runtime Qt libraries for applications based on the WebKit
227technology.
228
229%files webkit
230%defattr(-,root,root,-)
231%{qt_plugindir}/designer/qwebv.dll
232%{qt_importdir}/QtWebKit/
233%{qt_libdir}/QtWebK%{ver_major}.dll
234
235#------------------------------------------------------------------------------
236%package demos
237#------------------------------------------------------------------------------
238Summary: Qt 4 demos and examples
239Group: Documentation
240
241Requires: %{name}-pm = %{version}-%{release}
242Requires: %{name}-designer = %{version}-%{release}
243Requires: %{name}-webkit = %{version}-%{release}
244Requires: %{name}-doc = %{version}-%{release}
245
246%description demos
247%{descr_brief}
248
249This package contains the demo and example Qt applications and their
250source code. These applications demonstrate the possibilities of the
251Qt toolkit.
252
253%files demos
254%defattr(-,root,root,-)
255%{qt_plugindir}/designer/
256%exclude %{qt_plugindir}/designer/qdeclv.dll
257%exclude %{qt_plugindir}/designer/qwebv.dll
258%{qt_bindir}/qtdemo.exe
259%{qt_examplesdir}
260%{qt_demosdir}
261
262%post demos
263%wps_object_create_begin -n %{name}-demos
264%{pkg_wps_folder_create}
265%{pkg_wps_base}_DEMO:WPProgram|Examples and Demos|%{pkg_wps_folder_id}|EXENAME=((%{qt_bindir}/qtdemo.exe))
266%wps_object_create_end
267
268# clean up the qtdemo doc cache, otherwise the demo descriptions may not show up
269# if the old cache contains links to non-existent doc files (@todo other users?)
270rm -f "$HOME/.local/share/data/Trolltech/Assistant/qtdemo_%{ver_major}.%{ver_minor}.%{ver_patch}.qhc"
271
272%postun demos
273%wps_object_delete_all -n %{name}-demos
274
275#------------------------------------------------------------------------------
276%package qmlviewer
277#------------------------------------------------------------------------------
278Summary: Qt 4 QML Viewer tool
279Group: Development/Tools
280
281Requires: %{name}-pm = %{version}-%{release}
282
283%description qmlviewer
284%{descr_brief}
285
286This package contains the Qt QML Viewer tool that allows to view QML files.
287
288%files qmlviewer
289%defattr(-,root,root,-)
290%{qt_bindir}/qmlviewer.exe
291
292%post qmlviewer
293%wps_object_create_begin -n %{name}-qmlviewer
294%{pkg_wps_folder_create}
295%{pkg_wps_base}_QMLVIEWER:WPProgram|QML Viewer|%{pkg_wps_folder_id}|EXENAME=((%{qt_bindir}/qmlviewer.exe))
296%wps_object_create_end
297
298%postun qmlviewer
299%wps_object_delete_all -n %{name}-qmlviewer
300
301#------------------------------------------------------------------------------
302%package linguist
303#------------------------------------------------------------------------------
304Summary: Qt 4 Linguist tool
305Group: Development/Tools
306
307Requires: %{name}-pm = %{version}-%{release}
308
309%description linguist
310%{descr_brief}
311
312This package contains the Qt Linguist tool used to edit the translation files
313for Qt applications.
314
315%files linguist
316%defattr(-,root,root,-)
317%{qt_translationdir}/linguist_??.qm
318%{qt_translationdir}/linguist_??_??.qm
319%dir %{qt_datadir}/phrasebooks/
320%{qt_datadir}/phrasebooks/*
321%{qt_bindir}/linguist.exe
322
323%post linguist
324%wps_object_create_begin -n %{name}-linguist
325%{pkg_wps_folder_create}
326%{pkg_wps_base}_LINGUIST:WPProgram|Linguist|%{pkg_wps_folder_id}|EXENAME=((%{qt_bindir}/linguist.exe))
327%wps_object_create_end
328
329%postun linguist
330%wps_object_delete_all -n %{name}-linguist
331
332#------------------------------------------------------------------------------
333%package assistant
334#------------------------------------------------------------------------------
335Summary: Qt 4 Assistant tool
336Group: Development/Tools
337
338Requires: %{name}-pm = %{version}-%{release}
339
340%description assistant
341%{descr_brief}
342
343This package contains the Qt Assistant tool used to read and search the Qt
344Toolkit reference documentation.
345
346%files assistant
347%defattr(-,root,root,-)
348%{qt_translationdir}/assistant_??.qm
349%{qt_translationdir}/assistant_??_??.qm
350%{qt_bindir}/assistant.exe
351
352%post assistant
353%wps_object_create_begin -n %{name}-assistant
354%{pkg_wps_folder_create}
355%{pkg_wps_base}_ASSISTANT:WPProgram|Assistant|%{pkg_wps_folder_id}|EXENAME=((%{qt_bindir}/assistant.exe))
356%wps_object_create_end
357
358# clean up the assistant cache & search index (@todo other users?)
359rm -f "$HOME/.local/share/data/Trolltech/Assistant/assistant.qch.%{ver_major}.%{ver_minor}"
360rm -f "$HOME/.local/share/data/Trolltech/Assistant/qthelpcollection_%{ver_major}.%{ver_minor}.%{ver_patch}.qhc"
361rm -rf "$HOME/.local/share/data/Trolltech/Assistant/.qthelpcollection_%{ver_major}.%{ver_minor}.%{ver_patch}"
362
363%postun assistant
364%wps_object_delete_all -n %{name}-assistant
365
366#------------------------------------------------------------------------------
367%package designer
368#------------------------------------------------------------------------------
369Summary: Qt 4 Designer tool
370Group: Development/Tools
371
372Requires: %{name}-pm = %{version}-%{release}
373
374%description designer
375%{descr_brief}
376
377This package contains the Qt Designer tool used to for designing and building
378graphical user interfaces from Qt components.
379
380%files designer
381%defattr(-,root,root,-)
382%{qt_translationdir}/designer_??.qm
383%{qt_translationdir}/designer_??_??.qm
384%{qt_libdir}/QtDsgC%{ver_major}.dll
385%{qt_libdir}/QtDsgn%{ver_major}.dll
386%{qt_bindir}/designer.exe
387
388%post designer
389%wps_object_create_begin -n %{name}-designer
390%{pkg_wps_folder_create}
391%{pkg_wps_base}_DESIGNER:WPProgram|Designer|%{pkg_wps_folder_id}|EXENAME=((%{qt_bindir}/designer.exe))
392%wps_object_create_end
393
394%postun designer
395%wps_object_delete_all -n %{name}-designer
396
397#------------------------------------------------------------------------------
398%package devel-tools
399#------------------------------------------------------------------------------
400Summary: Qt 4 development tools
401Group: Development/Tools
402
403Requires: %{name}-pm = %{version}-%{release}
404
405%description devel-tools
406%{descr_brief}
407
408This package contains tools used to assist in Qt development, including
409PixelTool, Help Converter and other applications.
410
411%files devel-tools
412%defattr(-,root,root,-)
413%{qt_bindir}/lconvert.exe
414%{qt_bindir}/pixeltool.exe
415%{qt_bindir}/qcollectiongenerator.exe
416%{qt_bindir}/qdoc3.exe
417%{qt_bindir}/qhelpconverter.exe
418%{qt_bindir}/qhelpgenerator.exe
419%{qt_bindir}/qt3to4.exe
420%{qt_bindir}/qttracereplay.exe
421%{qt_bindir}/xmlpatterns.exe
422%{qt_bindir}/xmlpatternsvalidator.exe
423
424%post devel-tools
425%wps_object_create_begin -n %{name}-devel-tools
426%{pkg_wps_folder_create}
427%{pkg_wps_base}_PIXELTOOL:WPProgram|Pixel Tool|%{pkg_wps_folder_id}|EXENAME=((%{qt_bindir}/pixeltool.exe))
428%{pkg_wps_base}_HELPCONVERTER:WPProgram|Help Converter|%{pkg_wps_folder_id}|EXENAME=((%{qt_bindir}/qhelpconverter.exe))
429%wps_object_create_end
430
431%postun devel-tools
432%wps_object_delete_all -n %{name}-devel-tools
433
434#------------------------------------------------------------------------------
435%package doc
436#------------------------------------------------------------------------------
437Summary: Qt 4 API documentation
438Group: Documentation
439BuildArch: noarch
440
441Requires: %{name}-assistant = %{version}-%{release}
442
443%description doc
444%{descr_brief}
445
446This package contains the Qt Toolkit reference documentation that provides the
447detailed description of all Qt classes and tools.
448
449%files doc
450%defattr(-,root,root,-)
451%{qt_docdir}/qch/*.qch
452
453%post doc
454%wps_object_create_begin -n %{name}-doc
455%{pkg_wps_folder_create}
456%{pkg_wps_base}_README_FOLDER:WPFolder|Readme Files|%{pkg_wps_folder_id}
457%{pkg_wps_base}_README:WPShadow|README|<%{pkg_wps_base}_README_FOLDER>|SHADOWID=((%{pkg_docdir}/README))
458%{pkg_wps_base}_CHANGES:WPShadow|CHANGES|<%{pkg_wps_base}_README_FOLDER>|SHADOWID=((%{pkg_docdir}/changes-4.7.3))
459%{pkg_wps_base}_README_OS2:WPShadow|README.OS2|<%{pkg_wps_base}_README_FOLDER>|SHADOWID=((%{pkg_docdir}/README.OS2))
460%{pkg_wps_base}_CHANGES_OS2:WPShadow|CHANGES.OS2|<%{pkg_wps_base}_README_FOLDER>|SHADOWID=((%{pkg_docdir}/CHANGES.OS2))
461%wps_object_create_end
462
463%postun doc
464%wps_object_delete_all -n %{name}-doc
465
466#------------------------------------------------------------------------------
467%package devel
468#------------------------------------------------------------------------------
469Summary: Qt 4 development files
470Group: Development/Libraries
471
472Requires: %{name}-pm = %{version}-%{release}
473
474%description devel
475%{descr_brief}
476
477This package contains the headers, libraries and tools necessary to develop
478applications using the Qt toolkit.
479
480%files devel
481%defattr(-,root,root,-)
482%if "%{qt_headerdir}" != "%{_includedir}"
483%dir %{qt_headerdir}/
484%endif
485%{qt_headerdir}/*
486%exclude %{qt_headerdir}/Qt/QtWebKit
487%exclude %{qt_headerdir}/Qt/qgraphicswebview.h
488%exclude %{qt_headerdir}/Qt/qweb*.h
489%exclude %{qt_headerdir}/QtWebKit/
490%{qt_libdir}/*.lib
491%{qt_libdir}/*.prl
492%exclude %{qt_libdir}/QtWebKit%{ver_major}.lib
493%exclude %{qt_libdir}/QtWebKit.prl
494%dir %{qt_datadir}/mkspecs/
495%{qt_datadir}/mkspecs/*
496%exclude %{qt_datadir}/mkspecs/modules/qt_webkit_version.pri
497%{qt_datadir}/q3porting.xml
498%{qt_bindir}/lrelease.exe
499%{qt_bindir}/lupdate.exe
500%{qt_bindir}/moc.exe
501%if "%{qt_bindir}" != "%{_bindir}"
502%{_bindir}/qmake.exe
503%endif
504%{qt_bindir}/qmake.exe
505%{qt_bindir}/rcc.exe
506%{qt_bindir}/uic.exe
507
508#------------------------------------------------------------------------------
509%package webkit-devel
510#------------------------------------------------------------------------------
511Summary: Qt 4 WebKit development files
512Group: Development/Libraries
513
514Requires: %{name}-webkit = %{version}-%{release}
515Requires: %{name}-devel = %{version}-%{release}
516
517%description webkit-devel
518%{descr_brief}
519
520This package contains the headers, libraries and tools necessary to
521develop applications using the Qt WebKit technology.
522
523%files webkit-devel
524%defattr(-,root,root,-)
525%{qt_headerdir}/Qt/QtWebKit
526%{qt_headerdir}/Qt/qgraphicswebview.h
527%{qt_headerdir}/Qt/qweb*.h
528%{qt_headerdir}/QtWebKit/
529%{qt_libdir}/QtWebKit%{ver_major}.lib
530%{qt_libdir}/QtWebKit.prl
531%{qt_datadir}/mkspecs/modules/qt_webkit_version.pri
532
533#------------------------------------------------------------------------------
534%package devel-all
535#------------------------------------------------------------------------------
536Summary: Qt 4 development kit
537Group: Development/Libraries
538
539Requires: %{name}-demos = %{version}-%{release}
540Requires: %{name}-qmlviewer = %{version}-%{release}
541Requires: %{name}-linguist = %{version}-%{release}
542Requires: %{name}-assistant = %{version}-%{release}
543Requires: %{name}-designer = %{version}-%{release}
544Requires: %{name}-devel-tools = %{version}-%{release}
545Requires: %{name}-doc = %{version}-%{release}
546Requires: %{name}-devel = %{version}-%{release}
547Requires: %{name}-webkit-devel = %{version}-%{release}
548
549%description devel-all
550%{descr_brief}
551
552This meta package installs all individual packages containing various Qt
553development components, including the Qt headers and libraries, the Linguist,
554Assistant and Designer applications, development tools, example
555Qt applications and the API documentation.
556
557%files devel-all
558
559#------------------------------------------------------------------------------
560%prep
561#------------------------------------------------------------------------------
562
563%if !0%{?skip_prep}
564
565%if "%{?QT_SOURCE_TREE}" != ""
566%if !0%{?skip_prep_export}
567# get clean source tree from SVN
568%setup -n "%{name}-%{version}" -Tc
569svn export -r %{svn_revision} %{QT_SOURCE_TREE} .
570%else
571# use passed source tree as is (shadow build)
572%setup -n "%{name}-%{version}" -Tc%{?skip_prep_clean:D}
573%endif
574%else
575# use source zip
576%setup -q
577%endif
578
579%endif # if !0%{?skip_prep}
580
581#------------------------------------------------------------------------------
582%build
583#------------------------------------------------------------------------------
584
585%if !0%{?skip_build}
586
587die() { echo "ERROR: $@"; exit 1; }
588check_var() { eval "[ -n \"\$$1\" ] || die \"$1 variable is not set.\""; }
589
590# Qt source tree (DOS format)
591QT_SOURCE_TREE_D=$(echo "%{QT_SOURCE_TREE}" | tr '/' '\\')
592
593# Sanity checks (laking these would turn off features that must be ON)
594check_var "CUPS_INCLUDEPATH"
595check_var "MYSQL_INCLUDEPATH"
596check_var "MYSQL_LIBS"
597check_var "PSQL_INCLUDEPATH"
598check_var "PSQL_LIBS"
599
600[ -z "$MAKE_JOBS" ] && MAKE_JOBS=1
601
602# Qt links to some OS/2 DLLs directly (w/o import libs)
603export LIBRARY_PATH=%{os2_boot_drive}/OS2/DLL\;%{os2_boot_drive}/MPTN/DLL\;$LIBRARY_PATH
604
605# CMD.EXE is required by the build process for now
606export MAKESHELL=%{os2_boot_drive}\\OS2\\CMD.EXE
607
608# Qt doesn't understand /@unixroot in library paths, replace it with $(UNIXROOT)
609library_paths=$(echo \
610 --official-build-quiet %{svn_revision} \
611 -prefix "%{qt_prefix}" \
612 -datadir "%{qt_datadir}" \
613 -libdir "%{qt_libdir}" \
614 -headerdir "%{qt_headerdir}" \
615 -bindir "%{qt_bindir}" \
616 -plugindir "%{qt_plugindir}" \
617 -importdir "%{qt_importdir}" \
618 -demosdir "%{qt_demosdir}" \
619 -examplesdir "%{qt_examplesdir}" \
620 -docdir "%{qt_docdir}" \
621 -translationdir "%{qt_translationdir}" \
622 -sysconfdir "%{qt_sysconfdir}" \
623| sed -re 's,/@unixroot,$(UNIXROOT),g')
624
625BUILDDIR_D=$(echo "%{_builddir}/%{buildsubdir}" | sed -re 's,/,\\,g')
626
627# make sure the right DLLs are used by the build (and in particular by qdoc
628# in make docs) in case if there is another Qt version installed
629export PATH="$BUILDDIR_D\\bin\;$PATH"
630export BEGINLIBPATH="$BUILDDIR_D\\bin\;$BEGINLIBPATH"
631
632# temporarily reset UNIXROOT so that install targets will get only Qt prefixes
633# w/o the UNIXROOT directory chain (if it's not at root)
634UNIXROOT_OLD="$UNIXROOT"
635export UNIXROOT=/.
636
637cmd /c $QT_SOURCE_TREE_D\\configure.cmd $library_paths
638
639make -j$MAKE_JOBS
640
641# resture UNIXROOT
642export UNIXROOT="$UNIXROOT_OLD"
643
644%if !0%{?skip_build_docs}
645# qdoc needs the qsqlite plugin but nothing is installed to target locations
646# yet, so generate qt.conf to override paths
647echo \
648"[Paths]
649Prefix = ..
650Settings = \$(ETC)/xdg
651Examples = examples
652Demos = demos" \
653> "%{_builddir}/%{buildsubdir}/bin/qt.conf"
654make docs -j$MAKE_JOBS
655rm -f "%{_builddir}/%{buildsubdir}/bin/qt.conf"
656%endif
657
658%endif # if !0%{?skip_build}
659
660#------------------------------------------------------------------------------
661%install
662#------------------------------------------------------------------------------
663
664%if !0%{?skip_install}
665
666rm -rf %{buildroot}
667
668# Qt links to some OS/2 DLLs directly (w/o import libs)
669export LIBRARY_PATH=%{os2_boot_drive}/OS2/DLL\;%{os2_boot_drive}/MPTN/DLL\;$LIBRARY_PATH
670
671# CMD.EXE is required by the build process for now
672export MAKESHELL=%{os2_boot_drive}\\OS2\\CMD.EXE
673
674# exclude install_htmldocs from install targets
675make install_subtargets install_qchdocs install_qmake install_mkspecs \
676 INSTALL_ROOT=$(echo "%{buildroot}/@unixroot" | sed -re 's,/,\\,g')
677
678# copy READMEs (make install doesn't do that)
679mkdir -p "%{buildroot}/%{pkg_docdir}/"
680cp -dp \
681 "%{QT_SOURCE_TREE}/LICENSE.*" \
682 "%{QT_SOURCE_TREE}/LGPL_EXCEPTION.txt" \
683 "%{QT_SOURCE_TREE}/README" \
684 "%{QT_SOURCE_TREE}/changes-%{ver_major}.%{ver_minor}.%{ver_patch}" \
685 "%{QT_SOURCE_TREE}/README.OS2" \
686 "%{QT_SOURCE_TREE}/CHANGES.OS2" \
687 "%{buildroot}/%{pkg_docdir}/"
688
689# remove *.dll from bin (they will live in %{qt_libdir})
690rm -f "%{buildroot}/%{qt_bindir}/*.dll" "%{buildroot}/%{qt_bindir}/*.sym"
691
692# remove translations we don't need
693rm -f "%{buildroot}/%{qt_translationdir}/qtconfig_??.qm" \
694 "%{buildroot}/%{qt_translationdir}/qtconfig_??_??.qm"
695rm -f "%{buildroot}/%{qt_translationdir}/qvfb_??.qm" \
696 "%{buildroot}/%{qt_translationdir}/qvfb_??_??.qm"
697
698# move qmake.exe to %{_bindir} (to have it in PATH) and symlink back to qt4/bin
699%if "%{qt_bindir}" != "%{_bindir}"
700mkdir -p "%{buildroot}/%{_bindir}/"
701mv "%{buildroot}/%{qt_bindir}/qmake.exe" "%{buildroot}/%{_bindir}/"
702ln -s "%{_bindir}/qmake.exe" "%{buildroot}/%{qt_bindir}/qmake.exe"
703%endif
704
705# @todo temporarily delete .sym files (until we generate -debuginfo packages)
706find "%{buildroot}/" -type f -name "*.sym" -exec rm -f "{}" \;
707
708%endif # if !0%{?skip_install}
709
710#------------------------------------------------------------------------------
711%clean
712#------------------------------------------------------------------------------
713
714#rm -rf %{buildroot}
715
716#------------------------------------------------------------------------------
717%changelog
Note: See TracBrowser for help on using the repository browser.