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