]> git.pld-linux.org Git - packages/qt4.git/blob - qt4.spec
- disabled designer/linguist/assistant (not in this preview)
[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  single          # don't build single-threaded libraries
13 %bcond_without  static_libs     # don't build static libraries
14 %bcond_without  cups            # disable CUPS support
15 %bcond_without  mysql           # don't build MySQL plugin
16 %bcond_without  odbc            # don't build unixODBC plugin
17 %bcond_without  pgsql           # don't build PostgreSQL plugin
18 %bcond_without  designer        # don't build designer (it takes long)
19 %bcond_without  sqlite          # don't build SQLite plugin
20 %bcond_without  ibase           # build ibase (InterBase/Firebird) plugin
21 %bcond_with     pch             # enable pch in qmake
22 %bcond_with     pch_devel       # enable experimental boost (for developers only!)
23 #
24 %ifnarch %{ix86} sparc sparcv9 ppc
25 %undefine       with_ibase
26 %endif
27 %define         _withsql        1
28 %{!?with_sqlite:%{!?with_ibase:%{!?with_mysql:%{!?with_pgsql:%{!?with_odbc:%undefine _withsql}}}}}
29
30 %define         _snap           040422
31 %define         _ver            4.0.0
32 %define         _packager       djurban
33 %define         _name           qt
34
35 Summary:        The Qt GUI application framework
36 Summary(es):    Biblioteca para ejecutar aplicaciones GUI Qt
37 Summary(pl):    Biblioteka Qt do tworzenia GUI
38 Summary(pt_BR): Estrutura para rodar aplicações GUI Qt
39 Name:           qt4
40 #Version:       %{_ver}.%{_snap}
41 Version:        %{_ver}
42 Release:        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-preview-%{version}.tar.bz2
48 # Source0-md5:  903cad618274ad84d7d13fd0027a6c3c
49 #Source1:       http://ep09.pld-linux.org/~%{_packager}/kde/%{_name}-copy-patches-040531.tar.bz2
50 #%Source1-md5:  2e38e44b6ef26bfb8a7f3b6900ee53c0
51 Source2:        %{_name}config.desktop
52 Source3:        designer.desktop
53 Source4:        assistant.desktop
54 Source5:        linguist.desktop
55 Patch0:         %{_name}-tools.patch
56 Patch1:         %{_name}-FHS.patch
57 Patch2:         %{_name}-qmake-nostatic.patch
58 Patch3:         %{_name}-disable_tutorials.patch
59 Patch4:         %{_name}-locale.patch
60 Patch5:         %{_name}-make_use_of_locale.patch
61 Patch6:         %{_name}-qmake-opt.patch
62 Patch7:         %{_name}-xcursor_version.patch
63 Patch8:         %{_name}-gcc34.patch
64 # for troll only
65 Patch9:         %{_name}-autodetect-pch.patch
66 Patch10:        %{_name}-antialias.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 pgsql 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 pgsql 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-preview-%{version} -a1
452 %patch0 -p1
453 %patch1 -p1
454 %patch2 -p1
455 %patch3 -p1
456 %patch4 -p1
457 %patch5 -p1
458 %patch6 -p1
459 %patch7 -p1
460 %patch8 -p1
461 %patch9 -p1
462 %patch10 -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 %{?with_pch:echo -e "DEFINES\t+=\tUSING_PCH" >> $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
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         -ipv6 \
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         %{?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         -thread \
563         <<_EOF_
564 yes
565 _EOF_
566
567 # Do not build tutorial and examples. Provide them as sources.
568 %{__make} symlinks src-qmake src-moc 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         -thread \
599         -plugindir %{_libdir}/qt/plugins-mt \
600         <<_EOF_
601 yes
602 _EOF_
603
604 %if %{nil}
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} symlinks src-qmake src-moc sub-src sub-tools
614 %{__make} sub-tools \
615         UIC="LD_PRELOAD=$QTDIR/%{_lib}/libqt-mt.so.3 $QTDIR/bin/uic -L $QTDIR/plugins"
616
617 %if %{nil}
618 %if %{with designer}
619 cd tools/designer/designer
620 LD_PRELOAD=$QTDIR/%{_lib}/libqt-mt.so.3 lrelease designer_de.ts
621 LD_PRELOAD=$QTDIR/%{_lib}/libqt-mt.so.3 lrelease designer_fr.ts
622 %endif
623 cd $QTDIR/tools/assistant
624 LD_PRELOAD=$QTDIR/%{_lib}/libqt-mt.so.3 lrelease assistant_de.ts
625 LD_PRELOAD=$QTDIR/%{_lib}/libqt-mt.so.3 lrelease assistant_fr.ts
626 cd $QTDIR/tools/linguist/linguist
627 LD_PRELOAD=$QTDIR/%{_lib}/libqt-mt.so.3 lrelease linguist_de.ts
628 LD_PRELOAD=$QTDIR/%{_lib}/libqt-mt.so.3 lrelease linguist_fr.ts
629 cd $QTDIR
630 %endif
631
632 ##make -C extensions/nsplugin/src
633
634 %install
635 rm -rf $RPM_BUILD_ROOT
636
637 export QTDIR=`/bin/pwd`
638
639 %{__make} install \
640         INSTALL_ROOT=$RPM_BUILD_ROOT
641
642 install -d \
643         $RPM_BUILD_ROOT%{_sysconfdir}/qt \
644         $RPM_BUILD_ROOT%{_libdir}/qt/plugins-mt/{crypto,network} \
645         $RPM_BUILD_ROOT%{_examplesdir}/%{_name}/lib \
646         $RPM_BUILD_ROOT%{_mandir}/man{1,3} \
647         $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
648
649 install bin/{findtr,qt20fix,qtrename140} \
650         $RPM_BUILD_ROOT%{_bindir}
651
652 #tools/{msg2qm/msg2qm,mergetr/mergetr} 
653 #       $RPM_BUILD_ROOT%{_bindir}
654
655 %if %{with static_libs}
656 install %{_lib}/libqt*.a                $RPM_BUILD_ROOT%{_libdir}
657 %endif
658
659 install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
660 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
661
662 %if %{nil}
663 %if %{with designer}
664 install %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}/designer.desktop
665 %endif
666
667 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
668
669 %if %{without designer}
670 install bin/uic $RPM_BUILD_ROOT%{_bindir}
671 %endif
672 %endif
673
674 install tools/qtconfig/images/appicon.png \
675         $RPM_BUILD_ROOT%{_pixmapsdir}/qtconfig.png
676
677 install doc/man/man1/*.1        $RPM_BUILD_ROOT%{_mandir}/man1
678 install doc/man/man3/*.3qt      $RPM_BUILD_ROOT%{_mandir}/man3
679
680 cp -dpR examples tutorial $RPM_BUILD_ROOT%{_examplesdir}/%{_name}
681
682 mv $RPM_BUILD_ROOT{%{_libdir}/*.prl,%{_examplesdir}/%{_name}/lib}
683
684 # From now QMAKE_INCDIR_QT becomes %{_includedir}/qt
685 perl -pi -e "
686         s|(QMAKE_INCDIR_QT\\s*=\\s*\\\$\\(QTDIR\\)/include)|\$1/qt|
687         " $RPM_BUILD_ROOT/%{_datadir}/qt/mkspecs/linux-g++/qmake.conf
688
689 # We provide qt style classes as plugins,
690 # so make corresponding changes to the qconfig.h.
691 chmod 644 $RPM_BUILD_ROOT%{_includedir}/qt/qconfig.h
692
693 cat >> $RPM_BUILD_ROOT%{_includedir}/qt/qconfig.h << EOF
694
695 /* All of these style classes we provide as plugins */
696 #define QT_NO_STYLE_CDE
697 #define QT_NO_STYLE_COMPACT
698 #define QT_NO_STYLE_MOTIF
699 #define QT_NO_STYLE_MOTIFPLUS
700 #define QT_NO_STYLE_PLATINUM
701 #define QT_NO_STYLE_SGI
702 #define QT_NO_STYLE_WINDOWS
703
704 EOF
705
706 %if %{with pch_devel}
707 cd $RPM_BUILD_ROOT%{_includedir}/qt
708 for h in qevent.h qglist.h qmap.h qobject.h qpixmap.h \
709         qptrlist.h qstring.h qstrlist.h qstringlist.h \
710         qvaluelist.h qwidget.h; do
711         %{__cxx} -s $h
712 done
713 cd -
714 %endif
715 %if %{nil}
716 install -d $RPM_BUILD_ROOT%{_datadir}/locale/{ar,de,fr,ru,he,cs,sk}/LC_MESSAGES
717 install translations/qt_ar.qm $RPM_BUILD_ROOT%{_datadir}/locale/ar/LC_MESSAGES/qt.qm
718 install translations/qt_de.qm $RPM_BUILD_ROOT%{_datadir}/locale/de/LC_MESSAGES/qt.qm
719 install translations/qt_fr.qm $RPM_BUILD_ROOT%{_datadir}/locale/fr/LC_MESSAGES/qt.qm
720 install translations/qt_ru.qm $RPM_BUILD_ROOT%{_datadir}/locale/ru/LC_MESSAGES/qt.qm
721 install translations/qt_iw.qm $RPM_BUILD_ROOT%{_datadir}/locale/he/LC_MESSAGES/qt.qm
722 install translations/qt_cs.qm $RPM_BUILD_ROOT%{_datadir}/locale/cs/LC_MESSAGES/qt.qm
723 install translations/qt_sk.qm $RPM_BUILD_ROOT%{_datadir}/locale/sk/LC_MESSAGES/qt.qm
724
725
726 %if %{with designer}
727 install tools/designer/designer/designer_de.qm $RPM_BUILD_ROOT%{_datadir}/locale/de/LC_MESSAGES/designer.qm
728 install tools/designer/designer/designer_fr.qm $RPM_BUILD_ROOT%{_datadir}/locale/fr/LC_MESSAGES/designer.qm
729 %endif
730 %endif
731
732 install tools/assistant/assistant_de.qm $RPM_BUILD_ROOT%{_datadir}/locale/de/LC_MESSAGES/assistant.qm
733 #install tools/assistant/assistant_fr.qm $RPM_BUILD_ROOT%{_datadir}/locale/fr/LC_MESSAGES/assistant.qm
734
735 %if %{nil}
736 install tools/linguist/linguist/linguist_de.qm $RPM_BUILD_ROOT%{_datadir}/locale/de/LC_MESSAGES/linguist.qm
737 install tools/linguist/linguist/linguist_fr.qm $RPM_BUILD_ROOT%{_datadir}/locale/fr/LC_MESSAGES/linguist.qm
738
739 install tools/linguist/qm2ts/qm2ts.1 $RPM_BUILD_ROOT%{_mandir}/man1
740 %endif
741
742 rm -rf `find $RPM_BUILD_ROOT -name CVS`
743
744
745 cd $RPM_BUILD_ROOT%{_examplesdir}/%{_name}/examples
746 for i in `find ./ -name Makefile`;
747 do
748
749 %{__sed} -i -e "s,$RPM_BUILD_DIR,/usr,g" $i
750 %{__sed} -i -e "s,examples,src/examples/qt/examples,g" $i
751
752 done
753
754 cd $RPM_BUILD_ROOT%{_examplesdir}/%{_name}/tutorial
755 for i in `find ./ -name Makefile`;
756 do
757
758 %{__sed} -i -e "s,$RPM_BUILD_DIR,/usr,g" $i
759 %{__sed} -i -e "s,examples,src/examples/qt/tutorial,g" $i
760
761 done
762
763
764 %clean
765 rm -rf $RPM_BUILD_ROOT
766
767 %post
768 /sbin/ldconfig
769
770 cat << EOF
771
772  *******************************************************
773  *                                                     *
774  *  NOTE:                                              *
775  *  With qt 4.0.0 the single threaded version was      *
776  *  removed.                                           *
777  *******************************************************
778
779 EOF
780
781 %postun         -p /sbin/ldconfig
782
783 %post   designer-libs -p /sbin/ldconfig
784 %postun designer-libs -p /sbin/ldconfig
785
786 %files
787 %defattr(644,root,root,755)
788 %doc FAQ LICENSE.* README* changes*
789 %dir %{_sysconfdir}/qt
790 %attr(755,root,root) %{_libdir}/libqassistantclient.so.*.*.*
791 %attr(755,root,root) %{_libdir}/libqt-mt.so.*.*.*
792 %dir %{_libdir}/%{_name}
793 %dir %{_libdir}/%{_name}/plugins-mt
794 %dir %{_libdir}/%{_name}/plugins-mt/crypto
795 %dir %{_libdir}/%{_name}/plugins-mt/imageformats
796 %attr(755,root,root) %{_libdir}/%{_name}/plugins-mt/imageformats/*.so
797 %dir %{_libdir}/%{_name}/plugins-mt/network
798 %{?_withsql:%dir %{_libdir}/%{_name}/plugins-mt/sqldrivers}
799 %dir %{_libdir}/%{_name}/plugins-mt/styles
800 %attr(755,root,root) %{_libdir}/%{_name}/plugins-mt/styles/*.so
801 %dir %{_datadir}/qt
802 %lang(ar) %{_datadir}/locale/ar/LC_MESSAGES/qt.qm
803 %lang(de) %{_datadir}/locale/de/LC_MESSAGES/qt.qm
804 %lang(fr) %{_datadir}/locale/fr/LC_MESSAGES/qt.qm
805 %lang(he) %{_datadir}/locale/he/LC_MESSAGES/qt.qm
806 %lang(ru) %{_datadir}/locale/ru/LC_MESSAGES/qt.qm
807 %lang(sk) %{_datadir}/locale/sk/LC_MESSAGES/qt.qm
808 %lang(cs) %{_datadir}/locale/cs/LC_MESSAGES/qt.qm
809
810 %files devel
811 %defattr(644,root,root,755)
812 %attr(755,root,root) %{_bindir}/moc
813 %attr(755,root,root) %{_bindir}/qt20fix
814 #%attr(755,root,root) %{_bindir}/qt32castcompat
815 %attr(755,root,root) %{_bindir}/qtrename140
816 %attr(755,root,root) %{_bindir}/uic
817 %{_includedir}/qt
818 %{_libdir}/libqassistantclient.so
819 %{_libdir}/libqt-mt.so
820 %{_mandir}/man1/moc*
821 %{_mandir}/man1/uic*
822 %{_pkgconfigdir}/qt-mt.pc
823
824 %files -n qmake
825 %defattr(644,root,root,755)
826 %attr(755,root,root) %{_bindir}/qmake
827 %{_datadir}/qt/mkspecs
828
829 %if %{with static_libs}
830 %files static
831 %defattr(644,root,root,755)
832 %{_libdir}/libqt-mt.a
833 %endif
834
835 %files doc
836 %defattr(644,root,root,755)
837 %{_docdir}/%{_name}-doc
838
839 %files examples
840 %defattr(644,root,root,755)
841 %{_examplesdir}/%{_name}
842
843 %files man
844 %defattr(644,root,root,755)
845 %{_mandir}/man3/*
846
847 %if %{with mysql}
848 %files plugin-mysql
849 %defattr(644,root,root,755)
850 %attr(755,root,root) %{_libdir}/%{_name}/plugins-mt/sqldrivers/lib*mysql.so
851 %endif
852
853 %if %{with pgsql}
854 %files plugin-psql
855 %defattr(644,root,root,755)
856 %attr(755,root,root) %{_libdir}/%{_name}/plugins-mt/sqldrivers/lib*psql.so
857 %endif
858
859 %if %{with odbc}
860 %files plugin-odbc
861 %defattr(644,root,root,755)
862 %attr(755,root,root) %{_libdir}/%{_name}/plugins-mt/sqldrivers/lib*odbc.so
863 %endif
864
865 %if %{with sqlite}
866 %files plugin-sqlite
867 %defattr(644,root,root,755)
868 %attr(755,root,root) %{_libdir}/%{_name}/plugins-mt/sqldrivers/lib*sqlite.so
869 %endif
870
871 %if %{with ibase}
872 %files plugin-ibase
873 %defattr(644,root,root,755)
874 %attr(755,root,root) %{_libdir}/%{_name}/plugins-mt/sqldrivers/lib*ibase.so
875 %endif
876
877
878 %if %{nil}
879 %if %{with designer}
880 %files designer-libs
881 %defattr(644,root,root,755)
882 %attr(755,root,root) %{_libdir}/libdesignercore.so.*.*.*
883 %attr(755,root,root) %{_libdir}/libeditor.so.*.*.*
884 %attr(755,root,root) %{_libdir}/libqui.so.*.*.*
885 %attr(755,root,root) %{_libdir}/libdesignercore.so
886 %attr(755,root,root) %{_libdir}/libeditor.so
887 %attr(755,root,root) %{_libdir}/libqui.so
888
889 %files designer
890 %defattr(644,root,root,755)
891 %attr(755,root,root) %{_bindir}/designer
892 %{_desktopdir}/designer.desktop
893 %dir %{_libdir}/%{_name}/plugins-?t/designer
894 %attr(755,root,root) %{_libdir}/%{_name}/plugins-?t/designer/*.so
895 %{_datadir}/qt/designer
896 %lang(de) %{_datadir}/locale/de/LC_MESSAGES/designer.qm
897 %lang(fr) %{_datadir}/locale/fr/LC_MESSAGES/designer.qm
898 %endif
899 %endif
900
901 %files assistant
902 %defattr(644,root,root,755)
903 %attr(755,root,root) %{_bindir}/assistant
904 %lang(de) %{_datadir}/locale/de/LC_MESSAGES/assistant.qm
905 %lang(fr) %{_datadir}/locale/fr/LC_MESSAGES/assistant.qm
906 %{_desktopdir}/assistant.desktop
907
908 %if %{nil}
909 %files linguist
910 %defattr(644,root,root,755)
911 %attr(755,root,root) %{_bindir}/linguist
912 %attr(755,root,root) %{_bindir}/findtr
913 %attr(755,root,root) %{_bindir}/lrelease
914 %attr(755,root,root) %{_bindir}/lupdate
915 %attr(755,root,root) %{_bindir}/mergetr
916 %attr(755,root,root) %{_bindir}/qm2ts
917 %attr(755,root,root) %{_bindir}/msg2qm
918 %lang(de) %{_datadir}/locale/de/LC_MESSAGES/linguist.qm
919 %lang(fr) %{_datadir}/locale/fr/LC_MESSAGES/linguist.qm
920 %{_desktopdir}/linguist.desktop
921 %{_datadir}/qt/phrasebooks
922 %{_mandir}/man1/l*
923 %{_mandir}/man1/*qm*
924 %endif
925
926 %files -n qtconfig
927 %defattr(644,root,root,755)
928 %attr(755,root,root) %{_bindir}/qtconfig
929 %{_desktopdir}/qtconfig.desktop
930 %{_pixmapsdir}/qtconfig.png
This page took 0.089533 seconds and 3 git commands to generate.