]> git.pld-linux.org Git - packages/qt4.git/blob - qt4.spec
- use mirror for source.
[packages/qt4.git] / qt4.spec
1 #
2 # TODO:
3 # - build system recheck (most make -C are to be changed)
4 # - redo subpackages (qt-core,qt-xml,qt-network,qt-opengl, etc.)
5 # - bconds for IBM db2, oracle and tds sql drivers
6 # - fix install
7 # - remove obsolete patches
8
9 # Conditional build:
10 %bcond_with     nas             # enable NAS audio support
11 %bcond_with     nvidia          # prelink Qt/KDE and depend on NVIDIA binaries
12 %bcond_without  static_libs     # don't build static libraries
13 %bcond_without  cups            # disable CUPS support
14 %bcond_without  mysql           # don't build MySQL plugin
15 %bcond_without  odbc            # don't build unixODBC plugin
16 %bcond_without  pgsql           # don't build PostgreSQL plugin
17 %bcond_without  designer        # don't build designer (it takes long)
18 %bcond_without  sqlite          # don't build SQLite plugin
19 %bcond_without  ibase           # build ibase (InterBase/Firebird) plugin
20 %bcond_with     pch             # enable pch in qmake
21 %bcond_with     dont_enable     # a bcond for missing features
22
23 %undefine       with_dont_enable
24
25 %ifnarch %{ix86} amd64 sparc sparcv9 alpha ppc
26 %undefine       with_ibase
27 %endif
28 %define         _withsql        1
29 %{!?with_sqlite:%{!?with_ibase:%{!?with_mysql:%{!?with_pgsql:%{!?with_odbc:%undefine _withsql}}}}}
30
31 #define         _snap           040422
32 %define         _ver            4.0.0
33 %define         _packager       djurban
34 %define         _name           qt
35
36 Summary:        The Qt GUI application framework
37 Summary(es):    Biblioteca para ejecutar aplicaciones GUI Qt
38 Summary(pl):    Biblioteka Qt do tworzenia GUI
39 Summary(pt_BR): Estrutura para rodar aplicações GUI Qt
40 Name:           qt4
41 Version:        %{_ver}
42 Release:        0.tp1.1
43 Epoch:          6
44 License:        GPL/QPL
45 Group:          X11/Libraries
46 #Source0:       http://ep09.pld-linux.org/~%{_packager}/kde/%{_name}-copy-%{_snap}.tar.bz2
47 #Source0:       ftp://ftp.trolltech.com/qt/source/%{_name}-x11-opensource-%{version}-b1.tar.bz2
48 Source0:        http://wftp.tu-chemnitz.de/pub/Qt/source//%{_name}-x11-opensource-%{version}-b1.tar.bz2
49 # Source0-md5:  4e7432f9bf5f3333429b490e33568573
50 #Source1:       http://ep09.pld-linux.org/~%{_packager}/kde/%{_name}-copy-patches-040531.tar.bz2
51 #Source1-md5    2e38e44b6ef26bfb8a7f3b6900ee53c0
52 Source2:        %{_name}config.desktop
53 Source3:        designer.desktop
54 Source4:        assistant.desktop
55 Source5:        linguist.desktop
56 %if %{with dont_enable}
57 Patch0:         %{_name}-tools.patch
58 Patch1:         %{_name}-FHS.patch
59 Patch3:         %{_name}-disable_tutorials.patch
60 %endif
61 Patch2:         %{name}-buildsystem.patch
62 Patch4:         %{name}-locale.patch
63 Patch6:         %{name}-licence_check.patch
64 Patch7:         %{name}-xcursor_version.patch
65 Patch8:         %{name}-antialias.patch
66 Patch9:         %{name}-hotfixes.patch
67 URL:            http://www.trolltech.com/products/qt/
68 Icon:           qt.xpm
69 %{?with_ibase:BuildRequires:    Firebird-devel}
70 BuildRequires:  OpenGL-devel
71 %{?with_nvidia:BuildRequires:   XFree86-driver-nvidia-devel < 1.0.4620}
72 # incompatible with bison
73 BuildRequires:  byacc
74 %{?with_cups:BuildRequires:     cups-devel}
75 BuildRequires:  flex
76 BuildRequires:  freetype-devel >= 2.0.0
77 %{?with_pch:BuildRequires:      gcc >= 5:3.4.0}
78 BuildRequires:  libjpeg-devel
79 BuildRequires:  libmng-devel >= 1.0.0
80 BuildRequires:  libpng-devel >= 1.0.8
81 BuildRequires:  libstdc++-devel
82 BuildRequires:  libungif-devel
83 %{?with_mysql:BuildRequires:    mysql-devel}
84 %{?with_nas:BuildRequires:      nas-devel}
85 BuildRequires:  perl-base
86 %{?with_pgsql:BuildRequires:    postgresql-backend-devel}
87 %{?with_pgsql:BuildRequires:    postgresql-devel}
88 BuildRequires:  sed >= 4.0
89 %{?with_odbc:BuildRequires:     unixODBC-devel}
90 %{?with_sqlite:BuildRequires:   sqlite-devel}
91 BuildRequires:  xcursor-devel
92 BuildRequires:  xft-devel
93 BuildRequires:  xrender-devel
94 BuildRequires:  zlib-devel
95 Requires:       OpenGL
96 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
97 Conflicts:      kdelibs <= 8:3.2-0.030602.1
98 Obsoletes:      qt-extensions
99 Obsoletes:      qt-utils
100
101 %define         _noautoreqdep   libGL.so.1 libGLU.so.1
102
103 # <begin main library description>
104
105 %description
106 Qt is a complete C++ application development framework, which includes
107 a class library and tools for multiplatform development and
108 internationalization. Using Qt, a single source code tree can build
109 applications that run natively on different platforms (Windows,
110 Unix/Linux, Mac OS X, embedded Linux).
111
112 Qt has a rich set of standard widgets, and lets you write custom
113 controls. It encapsulates four different platform-specific APIs, and
114 the APIs for file-handling, networking, process-handling, threading,
115 database access, etc. Qt now also has Motif migration oraz Netscape
116 LiveConnect plugin.
117
118 This package contains the shared, multi-threaded, linux version of the
119 Qt library, the style plugins and translation files for Qt.
120
121 %description -l es
122 Contiene las bibliotecas compartidas necesarias para ejecutar
123 aplicaciones Qt, bien como los archivos README.
124
125 %description -l pl
126 Qt oferuje kompletny system do tworzenia i rozwijania aplikacji w
127 jêzyku C++, w którego sk³ad wchodzi biblioteka z klasami oraz
128 wieloplatformowymi narzêdziami do rozwijania i t³umaczenia aplikacji.
129 Z pomoc± Qt jeden kod ¼ród³owy mo¿e byæ natywnie uruchamiany na
130 ró¿nych platformach (Windows, Unix/Linux, Mac OS X).
131
132 Qt ma bogaty zbiór standardowych elementów interfejsu graficznego, ale
133 pozwala równie¿ na pisanie w³asnych elementów. £±czy w sposób
134 niewidoczny dla programisty interfejsy programowania ró¿nych systemów,
135 tworz±c w ten sposób jeden interfejs dla obs³ugi plików, sieci,
136 procesów, w±tków, baz danych itp. Umo¿liwia tak¿e ³atwe przenoszenie
137 na Qt aplikacji korzystaj±cych z Motif oraz pisanie wtyczek z
138 wykorzystaniem Netscape LiveConnect.
139
140 Ten pakiet zawiera wspó³dzielon±, wielow±tkow±, linuksow± wersjê
141 biblioteki Qt, wtyczki ze stylami oraz pliki t³umaczeñ Qt.
142
143 %description -l pt_BR
144 Contém as bibliotecas compartilhadas necessárias para rodar aplicações
145 Qt, bem como os arquivos README.
146
147 %package devel
148 Summary:        Development files for the Qt GUI toolkit
149 Summary(es):    Archivos de inclusión necesaria para compilar aplicaciones Qt
150 Summary(pl):    Pliki nag³ówkowe, przyk³ady i dokumentacja do biblioteki
151 Summary(pt_BR): Arquivos de inclusão necessária para compilar aplicações Qt
152 Group:          X11/Development/Libraries
153 Requires:       OpenGL-devel
154 Requires:       freetype-devel
155 Requires:       libjpeg-devel
156 Requires:       libmng-devel
157 Requires:       libpng-devel
158 Requires:       libstdc++-devel
159 Requires:       %{_name} = %{epoch}:%{version}-%{release}
160 Conflicts:      qt2-devel
161
162 %description devel
163 This package contains the Qt development tools: the metaobjects
164 compiler (moc) and the user interface compiler (uic); Qt include
165 files, pkgconfig helpers and tools for preserving compatibility
166 between versions of Qt.
167
168
169 %description devel -l pl
170 Ten pakiet zawiera narzêdzia programistyczne Qt: kompilator
171 metaobiektów (moc), kompilator interfejsu u¿ytkownika (uic); pliki
172 nag³ówkowe, wsparcie dla pkgconfig oraz narzêdzia u³atwiaj±ce
173 zachowanie kompatybilno¶ci niezale¿nie od wersji Qt.
174
175
176 %package static
177 Summary:        Qt static library
178 Summary(pl):    Biblioteka statyczna Qt
179 Group:          X11/Development/Libraries
180 Requires:       %{_name}-devel = %{epoch}:%{version}-%{release}
181
182 %description static
183 Qt is a complete C++ application development framework, which includes
184 a class library and tools for multiplatform development and
185 internationalization. Using Qt, a single source code tree can build
186 applications that run natively on different platforms (Windows,
187 Unix/Linux, Mac OS X, embedded Linux).
188
189 Qt has a rich set of standard widgets, and lets you write custom
190 controls. It encapsulates four different platform-specific APIs, and
191 the APIs for file-handling, networking, process-handling, threading,
192 database access, etc. Qt now also has Motif migration oraz Netscape
193 LiveConnect plugin.
194
195 This package contains the static, multi-threaded, linux version of the
196 Qt library.
197
198
199 %description static -l pl
200 Qt oferuje kompletny system do tworzenia i rozwijania aplikacji w
201 jêzyku C++, w którego sk³ad wchodzi biblioteka z klasami oraz
202 wieloplatformowymi narzêdziami do rozwijania i t³umaczenia aplikacji.
203 Z pomoc± Qt jeden kod ¼ród³owy mo¿e byæ natywnie uruchamiany na
204 ró¿nych platformach (Windows, Unix/Linux, Mac OS X).
205
206 Qt ma bogaty zbiór standardowych elementów interfejsu graficznego, ale
207 pozwala równie¿ na pisanie w³asnych elementów. £±czy w sposób
208 niewidoczny dla programisty interfejsy programowania ró¿nych systemów,
209 tworz±c w ten sposób jeden interfejs dla obs³ugi plików, sieci,
210 procesów, w±tków, baz danych itp. Umo¿liwia tak¿e ³atwe przenoszenie
211 na Qt aplikacji korzystaj±cych z Motif oraz pisanie wtyczek z
212 wykorzystaniem Netscape LiveConnect.
213
214 Ten pakiet zawiera statyczn±, wielow±tkow±, linuksow± wersjê
215 biblioteki Qt.
216
217 %package doc
218 Summary:        Qt Documentation in HTML format
219 Summary(pl):    Dokumentacja Qt w formacie HTML
220 Group:          X11/Development/Libraries
221 Obsoletes:      qt-doc-html
222
223 %description doc
224 Qt documentation in HTML format.
225
226 %description doc -l pl
227 Dokumentacja qt w formacie HTML.
228
229 %package man
230 Summary:        Qt man pages
231 Summary(pl):    Qt - strony man
232 Group:          X11/Development/Libraries
233 Obsoletes:      qt-doc-man
234
235 %description man
236 Qt documentation in man pages format.
237
238 %description man -l pl
239 Dokumentacja qt w formacie stron man.
240
241 %package examples
242 Summary:        Example programs bundled with Qt
243 Summary(pl):    Æwiczenia i przyk³ady do Qt
244 Summary(pt_BR): Programas exemplo desenvolvidos com o Qt
245 Group:          X11/Development/Libraries
246 Requires:       %{_name}-devel = %{epoch}:%{version}-%{release}
247
248 %description examples
249 Example programs bundled with Qt version.
250
251 %description examples -l pl
252 Æwiczenia/przyk³ady do³±czone do Qt.
253
254 %description examples -l pt_BR
255 Programas exemplo para o Qt versão.
256
257 # <end main library desc>
258
259 # <start multithreaded plugins desc>
260
261 %package plugin-ibase
262 Summary:        Database plugin for InterBase/Firebird Qt support
263 Summary(pl):    Wtyczka InterBase/Firebird do Qt
264 Summary(pt_BR): Plugin de suporte a InterBase/Firebird para Qt
265 Group:          X11/Libraries
266 Requires:       %{_name} = %{epoch}:%{version}-%{release}
267 Provides:       %{_name}-plugin-sql = %{epoch}:%{version}-%{release}
268
269 %description plugin-ibase
270 This package contains a multi-thread enabled plugin for accessing
271 Interbase/Firebird database via the QSql classes.
272
273 %description plugin-ibase -l pl
274 Ten pakiet zawiera wielow±tkow± wersjê wtyczki do Qt umo¿liwiaj±cej
275 korzystanie z baz danych Interbase/Firebird poprzez klasy QSql.
276
277 %description plugin-ibase -l pt_BR
278 Plugin de suporte a InterBase/Firebird para Qt.
279
280 %package plugin-mysql
281 Summary:        Database plugin for MySQL Qt support
282 Summary(pl):    Wtyczka MySQL do Qt
283 Summary(pt_BR): Plugin de suporte a MySQL para Qt
284 Group:          X11/Libraries
285 Requires:       %{_name} = %{epoch}:%{version}-%{release}
286 Provides:       %{_name}-plugin-sql = %{epoch}:%{version}-%{release}
287 Obsoletes:      qt-plugins-mysql
288
289 %description plugin-mysql
290 This package contains a multi-thread enabled plugin for accessing
291 MySQL database via the QSql classes.
292
293 %description plugin-mysql -l pl
294 Ten pakiet zawiera wielow±tkow± wersjê wtyczki do Qt umo¿liwiaj±cej
295 korzystanie z baz danych MySQL poprzez klasy QSql.
296
297 %description plugin-mysql -l pt_BR
298 Plugin de suporte a MySQL para Qt.
299
300 %package plugin-odbc
301 Summary:        Database plugin for ODBC Qt support
302 Summary(pl):    Wtyczka ODBC do Qt
303 Summary(pt_BR): Plugin de suporte a ODBC para Qt
304 Group:          X11/Libraries
305 Requires:       %{_name} = %{epoch}:%{version}-%{release}
306 Provides:       %{_name}-plugin-sql = %{epoch}:%{version}-%{release}
307 Obsoletes:      qt-plugins-odbc
308
309 %description plugin-odbc
310 This package contains a multi-thread enabled plugin for accessing
311 unixODBC services via the QSql classes.
312
313 %description plugin-odbc -l pl
314 Ten pakiet zawiera wielow±tkow± wersjê wtyczki do Qt umo¿liwiaj±cej
315 korzystanie z us³ug unixODBC poprzez klasy QSql.
316
317 %description plugin-odbc -l pt_BR
318 Plugin de suporte a ODBC para Qt.
319
320 %package plugin-psql
321 Summary:        Database plugin for PostgreSQL Qt support
322 Summary(pl):    Wtyczka PostgreSQL do Qt
323 Summary(pt_BR): Plugin de suporte a PostgreSQL para Qt
324 Group:          X11/Libraries
325 Requires:       %{_name} = %{epoch}:%{version}-%{release}
326 Provides:       %{_name}-plugin-sql = %{epoch}:%{version}-%{release}
327 Obsoletes:      qt-plugins-psql
328
329 %description plugin-psql
330 This package contains a multi-thread enabled plugin for accessing
331 PostgreSQL database via the QSql classes.
332
333
334 %description plugin-psql -l pl
335 Ten pakiet zawiera wielow±tkow± wersjê wtyczki do Qt umo¿liwiaj±cej
336 korzystanie z baz danych PostgreSQL poprzez klasy QSql.
337
338 %description plugin-psql -l es
339 Plugin de suporte a PostgreSQL para Qt.
340
341 %package plugin-sqlite
342 Summary:        Database plugin for SQLite Qt support
343 Summary(pl):    Wtyczka SQLite do Qt
344 Summary(pt_BR): Plugin de suporte a SQLite para Qt
345 Group:          X11/Libraries
346 Requires:       %{_name} = %{epoch}:%{version}-%{release}
347 Provides:       %{_name}-plugin-sql = %{epoch}:%{version}-%{release}
348
349 %description plugin-sqlite
350 This package contains a multi-thread enabled plugin for using the
351 SQLite library (which allows to acces virtually any SQL database) via
352 the QSql classes.
353
354 %description plugin-sqlite -l pl
355 Ten pakiet zawiera wielow±tkow± wersjê wtyczki do Qt umo¿liwiaj±cej
356 korzystanie z baz danych PostgreSQL poprzez klasy QSql.
357
358 %description plugin-sqlite -l pt_BR
359 Plugin de suporte a SQLite para Qt. # <end multithreaded plugins desc>
360
361 %package linguist
362 Summary:        Translation helper for Qt
363 Summary(pl):    Aplikacja u³atwiaj±ca t³umaczenie aplikacji oparty o Qt
364 Group:          X11/Development/Tools
365 Conflicts:      %{_name}-devel < 6:3.3.2-3
366
367 %description linguist
368 This program provides an interface that shortens and helps systematize
369 the process of translating GUIs. Qt Linguist takes all of the text of
370 a UI that will be shown to the user, and presents it to a human
371 translator in a simple window. When one UI text is translated, the
372 program automatically progresses to the next, until they are all
373 completed.
374
375 %description linguist -l pl
376 Ten program oferuje interfejs znacznie przy¶pieszaj±cy proces
377 t³umaczenia interfejsu u¿ytkownika. Zbiera wszystkie teksty
378 przeznaczone do t³umaczenia i przedstawia w ³atwym w obs³udze oknie.
379 Gdy jeden z nich jest ju¿ przet³umaczony, automatycznie przechodzi do
380 nastêpnego, a¿ wszystkie bêd± przet³umaczone.
381
382 %package assistant
383 Summary:        Qt documentation browser
384 Summary(pl):    Przegl±darka dokumentacji Qt
385 Group:          X11/Development/Tools
386 Requires:       %{_name}-doc
387 Conflicts:      %{_name}-devel < 6:3.3.2-3
388
389 %description assistant
390 Qt Assistant is a tool for browsing on-line documentation with
391 indexing, bookmarks and full-text search.
392
393 %description assistant -l pl
394 Qt Assistant to narzêdzie do przegl±dania dokumentacji z mo¿liwo¶ci±
395 indeksowania, dodawania zak³adek i pe³notekstowego wyszukiwania.
396
397 %package -n qmake
398 Summary:        Qt makefile generator
399 Summary(pl):    Generator plików makefile dla aplikacji Qt
400 Group:          X11/Development/Tools
401 Conflicts:      %{_name}-devel < 6:3.3.2-3
402
403 %description -n qmake
404 A powerful makefile generator. It can create makefiles on any platform
405 from a simple .pro definitions file.
406
407 %description -n qmake -l pl
408 Rozbudowany generator plików makefile. Potrafi tworzyæ pliki makefile
409 na ka¿dej platformi na podstawie ³atwego w przygotowaniu pliku .pro.
410
411 %package -n qtconfig
412 Summary:        Qt widgets configuration tool
413 Summary(pl):    Narzêdzie do konfigurowania widgetów Qt
414 Group:          X11/Applications
415 Requires:       %{_name} = %{epoch}:%{version}-%{release}
416
417 %description -n qtconfig
418 A tool for configuring look and behavior of Qt widgets.
419
420 %description -n qtconfig -l pl
421 Narzêdie do konfiguracji wygl±du i zachowania widgetów Qt.
422
423 %package designer
424 Summary:        IDE used for GUI designing with Qt library
425 Summary(pl):    IDE s³u¿±ce do projektowania GUI za pomoc± biblioteki Qt
426 Group:          X11/Applications
427 Requires:       %{_name}-designer-libs = %{epoch}:%{version}-%{release}
428
429 %description designer
430 An advanced tool used for GUI designing with Qt library.
431
432 %description designer -l pl
433 Zaawansowane narzêdzie s³u¿±ce do projektowania interfejsu graficznego
434 za pomoc± biblioteki Qt.
435
436 %package designer-libs
437 Summary:        Libraries IDE used for GUI designing with Qt library
438 Summary(pl):    Biblioteki do IDE s³u¿±cego do projektowania GUI za pomoc± biblioteki Qt
439 Group:          X11/Applications
440 Requires:       %{_name} >= %{epoch}:%{version}-%{release}
441
442 %description designer-libs
443 Libraries used by the Qt GUI Designer.
444
445 %description designer-libs -l pl
446 Biblioteki wykorzystywane przez narzêdzie projektowania interfejsu
447 graficznego - Qt Designer.
448
449 %prep
450 #setup -q -n %{_name}-copy-%{_snap}
451 %setup -q -n %{_name}-x11-opensource-%{version}-b1
452 %if %{with dont_enable}
453 %patch0 -p1
454 %patch1 -p1
455 %patch3 -p1
456 %endif
457 #patch2 -p1 -b .niedakh
458 #patch4 -p1 -b .niedakh
459 #patch6 -p1 -b .niedakh
460 #patch7 -p1 -b .niedakh
461 #patch8 -p1 -b .niedakh
462 #patch9 -p1
463
464 #cat >> patches/DISABLED <<EOF
465 #0005
466 #0039
467 #0042
468 #0043
469 #0047
470 #EOF
471 #./apply_patches
472
473 # change QMAKE_CFLAGS_RELEASE to build
474 # properly optimized libs
475 plik="mkspecs/linux-g++/qmake.conf"
476
477 perl -pi -e "
478         s|/usr/X11R6/lib|/usr/X11R6/%{_lib}|;
479         s|/usr/lib|%{_libdir}|;
480         s|\\(QTDIR\\)/lib|\\(QTDIR\\)/%{_lib}|;
481         " $plik
482
483 cat $plik \
484         |grep -v QMAKE_CFLAGS_RELEASE \
485         |grep -v QMAKE_CXXFLAGS_RELEASE \
486         |grep -v QMAKE_CFLAGS_DEBUG \
487         |grep -v QMAKE_CXXFLAGS_DEBUG \
488         > $plik.1
489
490 mv $plik.1 $plik
491 echo >> $plik
492 echo -e "QMAKE_CFLAGS_RELEASE\t=\t%{rpmcflags}" >> $plik
493 echo -e "QMAKE_CXXFLAGS_RELEASE\t=\t%{rpmcflags}" >> $plik
494 echo -e "QMAKE_CFLAGS_DEBUG\t=\t%{debugcflags}" >> $plik
495 echo -e "QMAKE_CXXFLAGS_DEBUG\t=\t%{debugcflags}" >> $plik
496
497 %build
498 export QTDIR=`/bin/pwd`
499 export YACC='byacc -d'
500 export PATH=$QTDIR/bin:$PATH
501 export LD_LIBRARY_PATH=$QTDIR/%{_lib}:$LD_LIBRARY_PATH
502 export QMAKESPEC=$QTDIR/mkspecs/linux-g++
503
504 if [ "%{_lib}" != "lib" ] ; then
505         ln -s lib "%{_lib}"
506 fi
507
508 # pass OPTFLAGS to build qmake itself with optimization
509 export OPTFLAGS="%{rpmcflags}"
510
511 #%{__make} -f Makefile.cvs
512
513 ##################################
514 # DEFAULT OPTIONS FOR ALL BUILDS #
515 ##################################
516
517 DEFAULTOPT=" \
518         -DQT_CLEAN_NAMESPACE \
519         -verbose \
520         -prefix %{_prefix} \
521         -libdir %{_libdir} \
522         -headerdir %{_includedir}/qt \
523         -datadir %{_datadir}/qt \
524         -docdir %{_docdir}/%{_name}-doc \
525         -sysconfdir %{_sysconfdir}/qt \
526         -translationdir %{_datadir}/locale/ \
527         -fast \
528         -qt-gif \
529         -system-libjpeg \
530         -system-libmng \
531         -system-libpng \
532         -system-zlib \
533         -no-exceptions \
534         -I%{_includedir}/postgresql/server \
535         -I%{_includedir}/mysql \
536         %{!?with_cups:-no-cups} \
537         %{?with_nas:-system-nas-sound} \
538         %{?with_nvidia:-dlopen-opengl} \
539         %{?with_pch:-pch} \
540         %{?debug:-debug} \
541         -xcursor"
542
543 ##################################
544 #      STATIC MULTI-THREAD       #
545 ##################################
546
547 %if %{with static_libs}
548 STATICOPT=" \
549         -qt-imgfmt-jpeg \
550         -qt-imgfmt-mng \
551         -qt-imgfmt-png \
552         %{?with_mysql:-qt-sql-mysql} \
553         %{?with_odbc:-qt-sql-odbc} \
554         %{?with_pgsql:-qt-sql-psql} \
555         %{?with_sqlite:-qt-sql-sqlite} \
556         %{?with_ibase:-qt-sql-ibase} \
557         -static"
558
559 ./configure \
560         $DEFAULTOPT \
561         $STATICOPT \
562         <<_EOF_
563 q
564 yes
565 _EOF_
566
567 # Do not build tutorial and examples. Provide them as sources.
568 %{__make} sub-qmake sub-src 
569
570 # This will not remove previously compiled libraries.
571 %{__make} clean
572 %endif
573
574 ##################################
575 #      SHARED MULTI-THREAD       #
576 ##################################
577
578 SHAREDOPT=" \
579         -plugin-imgfmt-jpeg \
580         -plugin-imgfmt-mng \
581         -plugin-imgfmt-png \
582         %{?with_mysql:-plugin-sql-mysql} \
583         %{?with_odbc:-plugin-sql-odbc} \
584         %{?with_pgsql:-plugin-sql-psql} \
585         %{?with_sqlite:-plugin-sql-sqlite} \
586         %{?with_ibase:-plugin-sql-ibase} \
587         -plugin-style-cde \
588         -plugin-style-compact \
589         -plugin-style-motif \
590         -plugin-style-motifplus \
591         -plugin-style-platinum \
592         -plugin-style-sgi \
593         -plugin-style-windows"
594
595 ./configure \
596         $DEFAULTOPT \
597         $SHAREDOPT \
598         -plugindir %{_libdir}/qt/plugins-mt \
599         <<_EOF_
600 q
601 yes
602 _EOF_
603
604 %if %{with dont_enable}
605 %if %{without designer}
606 grep -v designer tools/tools.pro > tools/tools.pro.1
607 mv tools/tools.pro{.1,}
608 %{__make} -C tools/designer/uic \
609         UIC="LD_PRELOAD=$QTDIR/%{_lib}/libqt-mt.so.3 $QTDIR/bin/uic -L $QTDIR/plugins"
610 %endif
611 %endif
612 # Do not build tutorial and examples. Provide them as sources.
613 %{__make} sub-qmake 
614 %{__make} -C src sub-moc
615 $QTDIR/bin/moc src/gui/image/qmovie.cpp > src/gui/image/qmovie.moc
616 $QTDIR/bin/moc src/gui/image/qpixmapcache.cpp > src/gui/image/qpixmapcache.moc
617 $QTDIR/bin/moc src/gui/widgets/qdockwindow.cpp > src/gui/widgets/qdockwindow.moc
618 $QTDIR/bin/moc src/gui/widgets/qeffects.cpp > src/gui/widgets/qeffects.moc
619 $QTDIR/bin/moc src/gui/widgets/qmenu.cpp > src/gui/widgets/qmenu.moc
620 $QTDIR/bin/moc src/gui/widgets/qmenudata.cpp > src/gui/widgets/qmenudata.moc
621 $QTDIR/bin/moc src/gui/widgets/qsplitter.cpp > src/gui/widgets/qsplitter.moc
622 $QTDIR/bin/moc src/gui/widgets/qworkspace.cpp > src/gui/widgets/qworkspace.moc
623 $QTDIR/bin/moc src/gui/dialogs/qcolordialog.cpp > src/gui/dialogs/qcolordialog.moc
624 $QTDIR/bin/moc src/gui/dialogs/qfontdialog.cpp > src/gui/dialogs/qfontdialog.moc
625 $QTDIR/bin/moc src/gui/dialogs/qprintdialog_unix.cpp > src/gui/dialogs/qprintdialog_unix.moc
626 $QTDIR/bin/moc src/opengl/qgl_x11.cpp > src/opengl/qgl_x11.moc
627 $QTDIR/bin/moc src/network/qftp.cpp > src/network/qftp.moc
628 $QTDIR/bin/moc src/compat/dialogs/q3filedialog.cpp > src/compat/dialogs/q3filedialog.moc
629 $QTDIR/bin/moc src/compat/other/qnetworkprotocol.cpp > src/compat/other/qnetworkprotocol.moc
630 $QTDIR/bin/moc src/compat/itemviews/qtable.cpp > src/compat/itemviews/qtable.moc
631 $QTDIR/bin/moc src/compat/widgets/q3dockwindow.cpp > src/compat/widgets/q3dockwindow.moc
632 $QTDIR/bin/moc src/compat/widgets/q3mainwindow.cpp > src/compat/widgets/q3mainwindow.moc
633 $QTDIR/bin/moc src/compat/widgets/qscrollview.cpp > src/compat/widgets/qscrollview.moc
634 $QTDIR/bin/moc src/compat/widgets/q3datetimeedit.cpp > src/compat/widgets/q3datetimeedit.moc
635 $QTDIR/bin/moc src/compat/widgets/q3toolbar.cpp > src/compat/widgets/q3toolbar.moc
636
637 %{__make} sub-src sub-tools sub-demos
638
639 %if %{with dont_enable}
640 %if %{with designer}
641 cd tools/designer/designer
642 lrelease designer_de.ts
643 lrelease designer_fr.ts
644 %endif
645 cd $QTDIR/tools/assistant
646 lrelease assistant_de.ts
647 lrelease assistant_fr.ts
648 cd $QTDIR/tools/linguist/linguist
649 lrelease linguist_de.ts
650 lrelease linguist_fr.ts
651 cd $QTDIR
652 %endif
653
654 ##make -C extensions/nsplugin/src
655
656 %install
657 rm -rf $RPM_BUILD_ROOT
658
659 export QTDIR=`/bin/pwd`
660
661 %{__make} install \
662         INSTALL_ROOT=$RPM_BUILD_ROOT
663
664 install -d \
665         $RPM_BUILD_ROOT%{_sysconfdir}/qt \
666         $RPM_BUILD_ROOT%{_libdir}/qt/plugins-mt/{crypto,network} \
667         $RPM_BUILD_ROOT%{_examplesdir}/%{_name}/lib \
668         $RPM_BUILD_ROOT%{_mandir}/man{1,3} \
669         $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
670
671 install bin/{findtr,qt20fix,qtrename140} \
672         $RPM_BUILD_ROOT%{_bindir}
673
674 #tools/{msg2qm/msg2qm,mergetr/mergetr}
675 #       $RPM_BUILD_ROOT%{_bindir}
676
677 %if %{with static_libs}
678 install %{_lib}/libqt*.a                $RPM_BUILD_ROOT%{_libdir}
679 %endif
680
681 install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
682 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
683
684 %if %{with dont_enable}
685 %if %{with designer}
686 install %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}/designer.desktop
687 %endif
688
689 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
690
691 %if %{without designer}
692 install bin/uic $RPM_BUILD_ROOT%{_bindir}
693 %endif
694 %endif
695
696 install tools/qtconfig/images/appicon.png \
697         $RPM_BUILD_ROOT%{_pixmapsdir}/qtconfig.png
698
699 install doc/man/man1/*.1        $RPM_BUILD_ROOT%{_mandir}/man1
700 install doc/man/man3/*.3qt      $RPM_BUILD_ROOT%{_mandir}/man3
701
702 cp -dpR examples tutorial $RPM_BUILD_ROOT%{_examplesdir}/%{_name}
703
704 mv $RPM_BUILD_ROOT{%{_libdir}/*.prl,%{_examplesdir}/%{_name}/lib}
705
706 # From now QMAKE_INCDIR_QT becomes %{_includedir}/qt
707 perl -pi -e "
708         s|(QMAKE_INCDIR_QT\\s*=\\s*\\\$\\(QTDIR\\)/include)|\$1/qt|
709         " $RPM_BUILD_ROOT/%{_datadir}/qt/mkspecs/linux-g++/qmake.conf
710
711 # We provide qt style classes as plugins,
712 # so make corresponding changes to the qconfig.h.
713 chmod 644 $RPM_BUILD_ROOT%{_includedir}/qt/qconfig.h
714
715 cat >> $RPM_BUILD_ROOT%{_includedir}/qt/qconfig.h << EOF
716
717 /* All of these style classes we provide as plugins */
718 #define QT_NO_STYLE_CDE
719 #define QT_NO_STYLE_COMPACT
720 #define QT_NO_STYLE_MOTIF
721 #define QT_NO_STYLE_MOTIFPLUS
722 #define QT_NO_STYLE_PLATINUM
723 #define QT_NO_STYLE_SGI
724 #define QT_NO_STYLE_WINDOWS
725
726 EOF
727
728 %if %{with dont_enable}
729 install -d $RPM_BUILD_ROOT%{_datadir}/locale/{ar,de,fr,ru,he,cs,sk}/LC_MESSAGES
730 install translations/qt_ar.qm $RPM_BUILD_ROOT%{_datadir}/locale/ar/LC_MESSAGES/qt.qm
731 install translations/qt_de.qm $RPM_BUILD_ROOT%{_datadir}/locale/de/LC_MESSAGES/qt.qm
732 install translations/qt_fr.qm $RPM_BUILD_ROOT%{_datadir}/locale/fr/LC_MESSAGES/qt.qm
733 install translations/qt_ru.qm $RPM_BUILD_ROOT%{_datadir}/locale/ru/LC_MESSAGES/qt.qm
734 install translations/qt_iw.qm $RPM_BUILD_ROOT%{_datadir}/locale/he/LC_MESSAGES/qt.qm
735 install translations/qt_cs.qm $RPM_BUILD_ROOT%{_datadir}/locale/cs/LC_MESSAGES/qt.qm
736 install translations/qt_sk.qm $RPM_BUILD_ROOT%{_datadir}/locale/sk/LC_MESSAGES/qt.qm
737
738 %if %{with designer}
739 install tools/designer/designer/designer_de.qm $RPM_BUILD_ROOT%{_datadir}/locale/de/LC_MESSAGES/designer.qm
740 install tools/designer/designer/designer_fr.qm $RPM_BUILD_ROOT%{_datadir}/locale/fr/LC_MESSAGES/designer.qm
741 %endif
742 %endif
743
744 install tools/assistant/assistant_de.qm $RPM_BUILD_ROOT%{_datadir}/locale/de/LC_MESSAGES/assistant.qm
745 #install tools/assistant/assistant_fr.qm $RPM_BUILD_ROOT%{_datadir}/locale/fr/LC_MESSAGES/assistant.qm
746
747 %if %{with dont_enable}
748 install tools/linguist/linguist/linguist_de.qm $RPM_BUILD_ROOT%{_datadir}/locale/de/LC_MESSAGES/linguist.qm
749 install tools/linguist/linguist/linguist_fr.qm $RPM_BUILD_ROOT%{_datadir}/locale/fr/LC_MESSAGES/linguist.qm
750
751 install tools/linguist/qm2ts/qm2ts.1 $RPM_BUILD_ROOT%{_mandir}/man1
752 %endif
753
754 rm -rf `find $RPM_BUILD_ROOT -name CVS`
755
756 cd $RPM_BUILD_ROOT%{_examplesdir}/%{_name}/examples
757 for i in `find ./ -name Makefile`;
758 do
759
760 %{__sed} -i -e "s,$RPM_BUILD_DIR,/usr,g" $i
761 %{__sed} -i -e "s,examples,src/examples/qt/examples,g" $i
762
763 done
764
765 cd $RPM_BUILD_ROOT%{_examplesdir}/%{_name}/tutorial
766 for i in `find ./ -name Makefile`;
767 do
768
769 %{__sed} -i -e "s,$RPM_BUILD_DIR,/usr,g" $i
770 %{__sed} -i -e "s,examples,src/examples/qt/tutorial,g" $i
771
772 done
773
774 %clean
775 rm -rf $RPM_BUILD_ROOT
776
777 %post
778 /sbin/ldconfig
779
780 cat << EOF
781
782  *******************************************************
783  *                                                     *
784  *  NOTE:                                              *
785  *  With qt 4.0.0 the single threaded version was      *
786  *  removed.                                           *
787  *                                                     *
788  *******************************************************
789
790 EOF
791
792 %postun         -p /sbin/ldconfig
793
794 %post   designer-libs -p /sbin/ldconfig
795 %postun designer-libs -p /sbin/ldconfig
This page took 0.096444 seconds and 4 git commands to generate.