source: packaging/qt4.spec@ 1090

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

packaging: Add lib prefix to all library packages and add libqt4-designer.

The lib prefix is necessary to distinguish between packages containing
applications and libraries (DLLs) of the same name, e.g. like in case of
Qt Designer. It also matches the common practice on other platforms.

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