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
RevLine 
[1041]1#
2# http://svn.netlabs.org/qt4
3#
[1068]4# If you are a packager, please read HowToDistribute.txt for general
5# instructions.
6#
[1041]7
[1079]8Name: qt4
[1068]9Vendor: netlabs.org
10License: LGPLv2 with exceptions or GPLv3 with exceptions
11Url: http://www.qtsoftware.com/
12
[1041]13%define ver_major 4
[1068]14%define ver_minor 7
[1041]15%define ver_patch 3
16
[1068]17%define os2_release 0
18
[1041]19%define rpm_release 1
20
[1068]21%define svn_revision 1070
[1041]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
[1079]30%define pkg_docdir %{_docdir}/%{name}
[1041]31
[1068]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
[1079]67%define qt_prefix %{_libdir}/%{name}
[1041]68%define qt_libdir %{_libdir}
[1082]69%define qt_headerdir %{_includedir}
[1041]70%define qt_bindir %{qt_prefix}/bin
71%define qt_plugindir %{qt_prefix}/plugins
[1062]72%define qt_importdir %{qt_prefix}/imports
[1041]73%define qt_demosdir %{qt_prefix}/demos
74%define qt_examplesdir %{qt_prefix}/examples
[1079]75%define qt_datadir %{_datadir}/%{name}
[1041]76%define qt_docdir %{qt_datadir}/doc
77%define qt_translationdir %{qt_datadir}/translations
78%define qt_sysconfdir %{_sysconfdir}/xdg
79
[1075]80# disable lxlite compression (Qt EXEs and DLLs are already compressed)
81%define __os_install_post %{nil}
82
[1041]83#------------------------------------------------------------------------------
84# main package
85#------------------------------------------------------------------------------
86
[1079]87Summary: Qt 4 runtime
[1041]88Group: System Environment/Libraries
89
[1062]90%description
[1041]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,-)
[1082]98%dir %{pkg_docdir}/
[1078]99%docdir %{pkg_docdir}/
[1080]100%{pkg_docdir}/*
[1078]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/*
[1081]115%exclude %{qt_plugindir}/sqldrivers/qmysql%{ver_major}.dll
116%exclude %{qt_plugindir}/sqldrivers/qpsql%{ver_major}.dll
[1078]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
[1068]126%{qt_libdir}/QtCore%{ver_major}.dll
[1078]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
[1041]133
134%pre
[1068]135%warpin_conflicts_begin
136netlabs.org\Qt4\Runtime
137%warpin_conflicts_end
[1041]138
[1080]139%post
140# clean up the plugin/font cache to remove old entries (@todo other users?)
141rm -f "$HOME/.config/Trolltech.ini"
142
[1041]143#------------------------------------------------------------------------------
[1081]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#------------------------------------------------------------------------------
[1041]180%package pm
181#------------------------------------------------------------------------------
182
[1079]183Summary: Qt 4 GUI runtime
[1041]184Group: System Environment/Libraries
185
[1068]186Requires: %{name} = %{version}-%{release}
[1041]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,-)
[1078]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
[1068]209%{qt_libdir}/QtGui%{ver_major}.dll
[1078]210%{qt_libdir}/QtHelp%{ver_major}.dll
211%{qt_libdir}/QtScTl%{ver_major}.dll
212%{qt_libdir}/QtSvg%{ver_major}.dll
[1041]213
214#------------------------------------------------------------------------------
[1078]215%package webkit
[1041]216#------------------------------------------------------------------------------
[1078]217
[1079]218Summary: Qt 4 WebKit runtime
[1078]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#------------------------------------------------------------------------------
[1079]238Summary: Qt 4 demos and examples
[1041]239Group: Documentation
240
[1068]241Requires: %{name}-pm = %{version}-%{release}
[1080]242Requires: %{name}-designer = %{version}-%{release}
[1078]243Requires: %{name}-webkit = %{version}-%{release}
[1080]244Requires: %{name}-doc = %{version}-%{release}
[1041]245
[1078]246%description demos
[1041]247%{descr_brief}
248
[1062]249This package contains the demo and example Qt applications and their
250source code. These applications demonstrate the possibilities of the
251Qt toolkit.
[1041]252
[1078]253%files demos
[1041]254%defattr(-,root,root,-)
[1078]255%{qt_plugindir}/designer/
256%exclude %{qt_plugindir}/designer/qdeclv.dll
257%exclude %{qt_plugindir}/designer/qwebv.dll
[1041]258%{qt_bindir}/qtdemo.exe
[1078]259%{qt_examplesdir}
260%{qt_demosdir}
[1041]261
[1078]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
[1062]267
[1080]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
[1078]272%postun demos
273%wps_object_delete_all -n %{name}-demos
274
275#------------------------------------------------------------------------------
276%package qmlviewer
277#------------------------------------------------------------------------------
[1079]278Summary: Qt 4 QML Viewer tool
[1078]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}
[1081]295%{pkg_wps_base}_QMLVIEWER:WPProgram|QML Viewer|%{pkg_wps_folder_id}|EXENAME=((%{qt_bindir}/qmlviewer.exe))
[1041]296%wps_object_create_end
297
[1078]298%postun qmlviewer
299%wps_object_delete_all -n %{name}-qmlviewer
[1041]300
301#------------------------------------------------------------------------------
302%package linguist
303#------------------------------------------------------------------------------
[1079]304Summary: Qt 4 Linguist tool
[1041]305Group: Development/Tools
306
[1068]307Requires: %{name}-pm = %{version}-%{release}
[1041]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,-)
[1078]317%{qt_translationdir}/linguist_??.qm
318%{qt_translationdir}/linguist_??_??.qm
319%dir %{qt_datadir}/phrasebooks/
320%{qt_datadir}/phrasebooks/*
[1041]321%{qt_bindir}/linguist.exe
322
323%post linguist
324%wps_object_create_begin -n %{name}-linguist
[1080]325%{pkg_wps_folder_create}
[1078]326%{pkg_wps_base}_LINGUIST:WPProgram|Linguist|%{pkg_wps_folder_id}|EXENAME=((%{qt_bindir}/linguist.exe))
[1041]327%wps_object_create_end
328
329%postun linguist
330%wps_object_delete_all -n %{name}-linguist
331
332#------------------------------------------------------------------------------
333%package assistant
334#------------------------------------------------------------------------------
[1079]335Summary: Qt 4 Assistant tool
[1041]336Group: Development/Tools
337
[1068]338Requires: %{name}-pm = %{version}-%{release}
[1041]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,-)
[1078]348%{qt_translationdir}/assistant_??.qm
349%{qt_translationdir}/assistant_??_??.qm
[1041]350%{qt_bindir}/assistant.exe
351
[1078]352%post assistant
353%wps_object_create_begin -n %{name}-assistant
[1080]354%{pkg_wps_folder_create}
[1078]355%{pkg_wps_base}_ASSISTANT:WPProgram|Assistant|%{pkg_wps_folder_id}|EXENAME=((%{qt_bindir}/assistant.exe))
356%wps_object_create_end
357
[1080]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
[1078]363%postun assistant
364%wps_object_delete_all -n %{name}-assistant
365
[1041]366#------------------------------------------------------------------------------
[1068]367%package designer
368#------------------------------------------------------------------------------
[1079]369Summary: Qt 4 Designer tool
[1068]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,-)
[1078]382%{qt_translationdir}/designer_??.qm
383%{qt_translationdir}/designer_??_??.qm
384%{qt_libdir}/QtDsgC%{ver_major}.dll
385%{qt_libdir}/QtDsgn%{ver_major}.dll
[1068]386%{qt_bindir}/designer.exe
387
[1078]388%post designer
389%wps_object_create_begin -n %{name}-designer
[1080]390%{pkg_wps_folder_create}
[1078]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
[1068]397#------------------------------------------------------------------------------
398%package devel-tools
399#------------------------------------------------------------------------------
[1079]400Summary: Qt 4 development tools
[1068]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
[1078]409PixelTool, Help Converter and other applications.
[1068]410
411%files devel-tools
412%defattr(-,root,root,-)
[1078]413%{qt_bindir}/lconvert.exe
[1068]414%{qt_bindir}/pixeltool.exe
[1078]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
[1068]423
[1080]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
[1068]434#------------------------------------------------------------------------------
[1041]435%package doc
436#------------------------------------------------------------------------------
[1079]437Summary: Qt 4 API documentation
[1041]438Group: Documentation
439BuildArch: noarch
440
[1068]441Requires: %{name}-assistant = %{version}-%{release}
[1041]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
[1080]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
[1041]466#------------------------------------------------------------------------------
467%package devel
468#------------------------------------------------------------------------------
[1079]469Summary: Qt 4 development files
[1041]470Group: Development/Libraries
471
[1068]472Requires: %{name}-pm = %{version}-%{release}
[1041]473
474%description devel
475%{descr_brief}
476
477This package contains the headers, libraries and tools necessary to develop
[1068]478applications using the Qt toolkit.
[1041]479
480%files devel
481%defattr(-,root,root,-)
[1078]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
[1068]500%{qt_bindir}/moc.exe
[1078]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
[1041]507
508#------------------------------------------------------------------------------
[1078]509%package webkit-devel
510#------------------------------------------------------------------------------
[1079]511Summary: Qt 4 WebKit development files
[1078]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#------------------------------------------------------------------------------
[1068]534%package devel-all
535#------------------------------------------------------------------------------
[1079]536Summary: Qt 4 development kit
[1068]537Group: Development/Libraries
538
[1078]539Requires: %{name}-demos = %{version}-%{release}
540Requires: %{name}-qmlviewer = %{version}-%{release}
[1068]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}
[1078]546Requires: %{name}-devel = %{version}-%{release}
547Requires: %{name}-webkit-devel = %{version}-%{release}
[1068]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,
[1079]554Assistant and Designer applications, development tools, example
[1068]555Qt applications and the API documentation.
556
[1080]557%files devel-all
558
[1068]559#------------------------------------------------------------------------------
[1041]560%prep
561#------------------------------------------------------------------------------
562
[1068]563%if !0%{?skip_prep}
564
[1062]565%if "%{?QT_SOURCE_TREE}" != ""
[1068]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} .
[1041]570%else
[1068]571# use passed source tree as is (shadow build)
[1075]572%setup -n "%{name}-%{version}" -Tc%{?skip_prep_clean:D}
[1041]573%endif
[1068]574%else
575# use source zip
576%setup -q
577%endif
[1041]578
[1068]579%endif # if !0%{?skip_prep}
580
[1041]581#------------------------------------------------------------------------------
582%build
583#------------------------------------------------------------------------------
584
[1068]585%if !0%{?skip_build}
[1041]586
[1062]587die() { echo "ERROR: $@"; exit 1; }
588check_var() { eval "[ -n \"\$$1\" ] || die \"$1 variable is not set.\""; }
589
[1068]590# Qt source tree (DOS format)
[1062]591QT_SOURCE_TREE_D=$(echo "%{QT_SOURCE_TREE}" | tr '/' '\\')
592
593# Sanity checks (laking these would turn off features that must be ON)
[1068]594check_var "CUPS_INCLUDEPATH"
[1062]595check_var "MYSQL_INCLUDEPATH"
596check_var "MYSQL_LIBS"
597check_var "PSQL_INCLUDEPATH"
598check_var "PSQL_LIBS"
599
[1075]600[ -z "$MAKE_JOBS" ] && MAKE_JOBS=1
601
[1068]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
[1062]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
[1071]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
[1075]628# in make docs) in case if there is another Qt version installed
[1071]629export PATH="$BUILDDIR_D\\bin\;$PATH"
630export BEGINLIBPATH="$BUILDDIR_D\\bin\;$BEGINLIBPATH"
631
[1075]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"
[1078]635export UNIXROOT=/.
[1075]636
[1062]637cmd /c $QT_SOURCE_TREE_D\\configure.cmd $library_paths
638
[1075]639make -j$MAKE_JOBS
640
641# resture UNIXROOT
642export UNIXROOT="$UNIXROOT_OLD"
643
644%if !0%{?skip_build_docs}
[1071]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"
[1068]654make docs -j$MAKE_JOBS
[1075]655rm -f "%{_builddir}/%{buildsubdir}/bin/qt.conf"
[1068]656%endif
657
658%endif # if !0%{?skip_build}
659
[1041]660#------------------------------------------------------------------------------
661%install
662#------------------------------------------------------------------------------
663
[1068]664%if !0%{?skip_install}
665
[1041]666rm -rf %{buildroot}
667
[1075]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
[1041]670
[1075]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
[1068]678# copy READMEs (make install doesn't do that)
[1078]679mkdir -p "%{buildroot}/%{pkg_docdir}/"
[1075]680cp -dp \
[1078]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}/"
[1041]688
[1078]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
[1068]708%endif # if !0%{?skip_install}
709
[1041]710#------------------------------------------------------------------------------
711%clean
712#------------------------------------------------------------------------------
713
[1068]714#rm -rf %{buildroot}
[1041]715
716#------------------------------------------------------------------------------
717%changelog
Note: See TracBrowser for help on using the repository browser.