source: packaging/qt4.spec@ 1091

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

Spec for release 4.7.3-1.

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