source: packaging/qt4.spec@ 1080

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

packaging: More WPS objects and various fixes.

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