]> git.pld-linux.org Git - packages/qt4.git/blob - qt4.spec
- remove RPM_BUILD_DIR from pkgconfig files
[packages/qt4.git] / qt4.spec
1 #
2 # TODO:
3 #       - better descriptions
4 #       - more cleanups
5 #       - check if translations are avilable
6 #
7 # Conditional build:
8 %bcond_with     nas             # enable NAS audio support
9 # static libs disabled for now
10 %bcond_with     static_libs     # don't build static libraries
11 %bcond_without  cups            # disable CUPS support
12 %bcond_without  mysql           # don't build MySQL plugin
13 %bcond_without  odbc            # don't build unixODBC plugin
14 %bcond_without  pgsql           # don't build PostgreSQL plugin
15 %bcond_without  designer        # don't build designer (it takes long)
16 %bcond_without  sqlite3         # don't build SQLite3 plugin
17 %bcond_without  sqlite          # don't build SQLite2 plugin
18 %bcond_without  ibase           # build ibase (InterBase/Firebird) plugin
19 %bcond_without  pch             # enable pch in qmake
20 %bcond_with     dont_enable     # blocks translations, they are not yet available
21
22 %undefine       with_dont_enable
23
24 %ifnarch %{ix86} %{x8664} sparc sparcv9 alpha ppc
25 %undefine       with_ibase
26 %endif
27 %define         _withsql        1
28 %{!?with_sqlite3:%{!?with_sqlite:%{!?with_ibase:%{!?with_mysql:%{!?with_pgsql:%{!?with_odbc:%undefine _withsql}}}}}}
29
30 #define         _snap           050513
31 %define         _ver            4.0.0
32 %define         _packager       djurban
33
34 Summary:        The Qt GUI application framework
35 Summary(es):    Biblioteca para ejecutar aplicaciones GUI Qt
36 Summary(pl):    Biblioteka Qt do tworzenia GUI
37 Summary(pt_BR): Estrutura para rodar aplicações GUI Qt
38 Name:           qt4
39 Version:        %{_ver}
40 #Release:       1.%{_snap}.0.1
41 Release:        0.rc1.0.3
42 License:        GPL/QPL
43 Group:          X11/Libraries
44 #Source0:       http://ep09.pld-linux.org/~%{_packager}/kde/qt-copy-%{_snap}.tar.bz2
45 #Source0:       http://wftp.tu-chemnitz.de/pub/Qt/source//%{_name}-x11-opensource-%{version}-b1.tar.bz2
46 Source0:        ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-desktop-%{version}-rc1.tar.bz2
47 # Source0-md5:  f7f48c9f7de7fd93a414e45ef691ebea
48 #Source1:       http://ep09.pld-linux.org/~%{_packager}/kde/%{_name}-copy-patches-040531.tar.bz2
49 #Source1-md5    2e38e44b6ef26bfb8a7f3b6900ee53c0
50 Source2:        qtconfig.desktop
51 Source3:        designer.desktop
52 Source4:        assistant.desktop
53 Source5:        linguist.desktop
54 Patch0:         %{name}-tools.patch
55 %if %{with dont_enable}
56 Patch1:         qt-FHS.patch
57 # no tutorials exist
58 Patch3:         qt-disable_tutorials.patch
59 %endif
60 Patch2:         %{name}-buildsystem.patch
61 Patch4:         %{name}-locale.patch
62 Patch8:         %{name}-antialias.patch
63 Patch9:         %{name}rc1-build.patch
64 URL:            http://www.trolltech.com/products/qt/
65 Icon:           qt.xpm
66 %{?with_ibase:BuildRequires:    Firebird-devel}
67 %{?with_sqlite3:BuildRequires:  sqlite3-devel}
68 BuildRequires:  OpenGL-devel
69 # incompatible with bison
70 BuildRequires:  byacc
71 %{?with_cups:BuildRequires:     cups-devel}
72 BuildRequires:  flex
73 BuildRequires:  freetype-devel >= 2.0.0
74 %{?with_pch:BuildRequires:      gcc >= 5:3.4.0}
75 BuildRequires:  libjpeg-devel
76 BuildRequires:  libmng-devel >= 1.0.0
77 BuildRequires:  libpng-devel >= 1.0.8
78 BuildRequires:  libstdc++-devel
79 BuildRequires:  libungif-devel
80 %{?with_mysql:BuildRequires:    mysql-devel}
81 %{?with_nas:BuildRequires:      nas-devel}
82 BuildRequires:  perl-base
83 %{?with_pgsql:BuildRequires:    postgresql-backend-devel}
84 %{?with_pgsql:BuildRequires:    postgresql-devel}
85 # uncomment this in rel. 1 - no time to upgrade rpm
86 #BuildRequires: rpmbuild(macros) >= 1.213
87 BuildRequires:  sed >= 4.0
88 %{?with_odbc:BuildRequires:     unixODBC-devel}
89 %{?with_sqlite:BuildRequires:   sqlite-devel}
90 BuildRequires:  xcursor-devel
91 BuildRequires:  xft-devel
92 BuildRequires:  xrender-devel
93 BuildRequires:  zlib-devel
94 Requires:       OpenGL
95 Conflicts:      kdelibs <= 8:3.2-0.030602.1
96 Obsoletes:      qt-extensions
97 Obsoletes:      qt-utils
98 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
99
100 %define         _noautoreqdep   libGL.so.1 libGLU.so.1
101 %define         _noautostrip    '.*_debug\\.so*'
102
103 %description
104 Qt is a complete C++ application development framework, which includes
105 a class library and tools for multiplatform development and
106 internationalization. Using Qt, a single source code tree can build
107 applications that run natively on different platforms (Windows,
108 Unix/Linux, Mac OS X, embedded Linux).
109
110 Qt has a rich set of standard widgets, and lets you write custom
111 controls. It encapsulates four different platform-specific APIs, and
112 the APIs for file-handling, networking, process-handling, threading,
113 database access, etc. Qt now also has Motif migration oraz Netscape
114 LiveConnect plugin.
115
116 %description -l es
117 Contiene las bibliotecas compartidas necesarias para ejecutar
118 aplicaciones Qt, bien como los archivos README.
119
120 %description -l pl
121 Qt oferuje kompletny system do tworzenia i rozwijania aplikacji w
122 jêzyku C++, w którego sk³ad wchodzi biblioteka z klasami oraz
123 wieloplatformowymi narzêdziami do rozwijania i t³umaczenia aplikacji.
124 Z pomoc± Qt jeden kod ¼ród³owy mo¿e byæ natywnie uruchamiany na
125 ró¿nych platformach (Windows, Unix/Linux, Mac OS X).
126
127 Qt ma bogaty zbiór standardowych elementów interfejsu graficznego, ale
128 pozwala równie¿ na pisanie w³asnych elementów. £±czy w sposób
129 niewidoczny dla programisty interfejsy programowania ró¿nych systemów,
130 tworz±c w ten sposób jeden interfejs dla obs³ugi plików, sieci,
131 procesów, w±tków, baz danych itp. Umo¿liwia tak¿e ³atwe przenoszenie
132 na Qt aplikacji korzystaj±cych z Motif oraz pisanie wtyczek z
133 wykorzystaniem Netscape LiveConnect.
134
135 %package -n QtCore
136 Summary:        Core classes used by other modules
137 Group:          X11/Development/Libraries
138
139 %description -n QtCore
140 Core classes used by other modules.
141
142 %package -n QtCore-devel
143 Summary:        Core classes used by other modules
144 Group:          X11/Development/Libraries
145 Requires:       QtCore >= %{epoch}:%{version}-%{release}
146
147 %description -n QtCore-devel
148 Core classes used by other modules.
149
150 %package -n QtGui
151 Summary:        Graphical User Interface components
152 Group:          X11/Development/Libraries
153 Requires:       QtCore >= %{epoch}:%{version}-%{release}
154
155 %description -n QtGui
156 Graphical User Interface components.
157
158 %package -n QtGui-devel
159 Summary:        Graphical User Interface components
160 Group:          X11/Development/Libraries
161 Requires:       QtCore-devel >= %{epoch}:%{version}-%{release}
162
163 %description -n QtGui-devel
164 Graphical User Interface components.
165
166 %package -n QtNetwork
167 Summary:        Classes for network programming
168 Group:          X11/Development/Libraries
169 Requires:       QtCore >= %{epoch}:%{version}-%{release}
170
171 %description -n QtNetwork
172 Classes for network programming.
173
174 %package -n QtNetwork-devel
175 Summary:        Classes for network programming
176 Group:          X11/Development/Libraries
177 Requires:       QtCore-devel >= %{epoch}:%{version}-%{release}
178
179 %description -n QtNetwork-devel
180 Classes for network programming.
181
182 %package -n QtOpenGL
183 Summary:        OpenGL support classes
184 Group:          X11/Development/Libraries
185 Requires:       QtCore >= %{epoch}:%{version}-%{release}
186
187 %description -n QtOpenGL
188 OpenGL support classes.
189
190 %package -n QtOpenGL-devel
191 Summary:        OpenGL support classes
192 Group:          X11/Development/Libraries
193 Requires:       QtCore-devel >= %{epoch}:%{version}-%{release}
194
195 %description -n QtOpenGL-devel
196 OpenGL support classes.
197
198 %package -n QtSql
199 Summary:        Classes for database integration using SQL
200 Group:          X11/Development/Libraries
201 Requires:       QtCore >= %{epoch}:%{version}-%{release}
202
203 %description -n QtSql
204 Classes for database integration using SQL.
205
206 %package -n QtSql-devel
207 Summary:        Classes for database integration using SQL
208 Group:          X11/Development/Libraries
209 Requires:       QtCore-devel >= %{epoch}:%{version}-%{release}
210
211 %description -n QtSql-devel
212 Classes for database integration using SQL.
213
214 %package -n QtSql-ibase
215 Summary:        Database plugin for InterBase/Firebird Qt support
216 Summary(pl):    Wtyczka InterBase/Firebird do Qt
217 Summary(pt_BR): Plugin de suporte a InterBase/Firebird para Qt
218 Group:          X11/Development/Libraries
219 Provides:       QtSql-backend = %{epoch}:%{version}-%{release}
220 Requires:       QtSql >= %{epoch}:%{version}-%{release}
221
222 %description -n QtSql-ibase
223 This package contains a plugin for accessing Interbase/Firebird
224 database via the QSql classes.
225
226 %description -n QtSql-ibase -l pl
227 Ten pakiet zawiera wtyczki do Qt umo¿liwiaj±ce korzystanie z baz
228 danych Interbase/Firebird poprzez klasy QSql.
229
230 %description -n QtSql-ibase -l pt_BR
231 Plugin de suporte a InterBase/Firebird para Qt.
232
233 %package -n QtSql-mysql
234 Summary:        Database plugin for MySQL Qt support
235 Summary(pl):    Wtyczka MySQL do Qt
236 Summary(pt_BR): Plugin de suporte a MySQL para Qt
237 Group:          X11/Development/Libraries
238 Provides:       QtSql-backend = %{epoch}:%{version}-%{release}
239 Requires:       QtSql >= %{epoch}:%{version}-%{release}
240
241 %description -n QtSql-mysql
242 This package contains a plugin for accessing MySQL database via the
243 QSql classes.
244
245 %description -n QtSql-mysql -l pl
246 Ten pakiet zawiera wtyczki do Qt umo¿liwiaj±ce korzystanie z baz
247 danych MySQL poprzez klasy QSql.
248
249 %description -n QtSql-mysql -l pt_BR
250 Plugin de suporte a MySQL para Qt.
251
252 %package -n QtSql-odbc
253 Summary:        Database plugin for ODBC Qt support
254 Summary(pl):    Wtyczka ODBC do Qt
255 Summary(pt_BR): Plugin de suporte a ODBC para Qt
256 Group:          X11/Development/Libraries
257 Provides:       QtSql-backend = %{epoch}:%{version}-%{release}
258 Requires:       QtSql >= %{epoch}:%{version}-%{release}
259
260 %description -n QtSql-odbc
261 This package contains a plugin for accessing unixODBC services via the
262 QSql classes.
263
264 %description -n QtSql-odbc -l pl
265 Ten pakiet zawiera wtyczki do Qt umo¿liwiaj±ce korzystanie z us³ug
266 unixODBC poprzez klasy QSql.
267
268 %description -n QtSql-odbc -l pt_BR
269 Plugin de suporte a ODBC para Qt.
270
271 %package -n QtSql-pgsql
272 Summary:        Database plugin for PostgreSQL Qt support
273 Summary(pl):    Wtyczka PostgreSQL do Qt
274 Summary(pt_BR): Plugin de suporte a PostgreSQL para Qt
275 Group:          X11/Development/Libraries
276 Provides:       QtSql-backend = %{epoch}:%{version}-%{release}
277 Requires:       QtSql >= %{epoch}:%{version}-%{release}
278
279 %description -n QtSql-pgsql
280 This package contains a plugin for accessing PostgreSQL database via
281 the QSql classes.
282
283 %description -n QtSql-pgsql -l pl
284 Ten pakiet zawiera wtyczki do Qt umo¿liwiaj±ce korzystanie z baz
285 danych PostgreSQL poprzez klasy QSql.
286
287 %description -n QtSql-pgsql -l es
288 Plugin de suporte a PostgreSQL para Qt.
289
290 %package -n QtSql-sqlite
291 Summary:        QtSql sqlite plugin
292 Summary:        Database plugin for SQLite Qt support
293 Summary(pl):    Wtyczka SQLite do Qt
294 Summary(pt_BR): Plugin de suporte a SQLite para Qt
295 Group:          X11/Development/Libraries
296 Provides:       QtSql-backend = %{epoch}:%{version}-%{release}
297 Requires:       QtSql >= %{epoch}:%{version}-%{release}
298
299 %description -n QtSql-sqlite
300 This package contains a plugin for using the SQLite library (which
301 allows to acces virtually any SQL database) via the QSql classes.
302
303 %description -n QtSql-sqlite -l pl
304 Ten pakiet zawiera wtyczki do Qt umo¿liwiaj±ce korzystanie z baz
305 danych SQLite poprzez klasy QSql.
306
307 %description -n QtSql-sqlite -l pt_BR
308 Plugin de suporte a SQLite para Qt.
309
310 %package -n QtSql-sqlite3
311 Summary:        Database plugin for SQLite3 Qt support
312 Summary(pl):    Wtyczka SQLite3 do Qt
313 Summary(pt_BR): Plugin de suporte a SQLite3 para Qt
314 Group:          X11/Development/Libraries
315 Provides:       QtSql-backend = %{epoch}:%{version}-%{release}
316 Requires:       QtSql >= %{epoch}:%{version}-%{release}
317
318 %description -n QtSql-sqlite3
319 This package contains a plugin for using the SQLite3 library (which
320 allows to acces virtually any SQL database) via the QSql classes.
321
322 %description -n QtSql-sqlite3 -l pl
323 Ten pakiet zawiera wtyczki do Qt umo¿liwiaj±ce korzystanie z baz
324 danych SQLite3 poprzez klasy QSql.
325
326 %description -n QtSql-sqlite3 -l pt_BR
327 Plugin de suporte a SQLite3 para Qt.
328
329 %package -n QtXml
330 Summary:        Classes for handling XML
331 Group:          X11/Development/Libraries
332 Requires:       QtCore >= %{epoch}:%{version}-%{release}
333
334 %description -n QtXml
335 Classes for handling XML.
336
337 %package -n QtXml-devel
338 Summary:        Classes for handling XML
339 Group:          X11/Development/Libraries
340 Requires:       QtCore-devel >= %{epoch}:%{version}-%{release}
341
342 %description -n QtXml-devel
343 Classes for handling XML.
344
345 %package -n Qt3Support
346 Summary:        Qt3 compat library
347 Group:          X11/Development/Libraries
348 Requires:       QtCore >= %{epoch}:%{version}-%{release}
349
350 %description -n Qt3Support
351 Qt3 compat library.
352
353 %package -n Qt3Support-devel
354 Summary:        Qt3 compat library
355 Group:          X11/Development/Libraries
356 Requires:       QtCore-devel >= %{epoch}:%{version}-%{release}
357
358 %description -n Qt3Support-devel
359 Qt3 compat library.
360
361 %package assistant
362 Summary:        Qt documentation browser
363 Summary(pl):    Przegl±darka dokumentacji Qt
364 Group:          X11/Development/Tools
365 Requires:       %{name}-doc
366
367 %description assistant
368 Qt Assistant is a tool for browsing on-line documentation with
369 indexing, bookmarks and full-text search.
370
371 %description assistant -l pl
372 Qt Assistant to narzêdzie do przegl±dania dokumentacji z mo¿liwo¶ci±
373 indeksowania, dodawania zak³adek i pe³notekstowego wyszukiwania.
374
375 %package build
376 Summary:        Build tools for Qt4
377 Group:          X11/Development/Libraries
378 Requires:       QtCore >= %{epoch}:%{version}-%{release}
379 Requires:       QtXml >= %{epoch}:%{version}-%{release}
380
381 %description build
382 This package includes the Qt resource compiler (rcc), meta objects
383 compiler (moc), user interface compiler (uic) and qt3to4 include names
384 converter.
385
386 %package designer
387 Summary:        IDE used for GUI designing with Qt library
388 Summary(pl):    IDE s³u¿±ce do projektowania GUI za pomoc± biblioteki Qt
389 Group:          X11/Applications
390 Requires:       %{name}-designer-libs = %{epoch}:%{version}-%{release}
391
392 %description designer
393 An advanced tool used for GUI designing with Qt library.
394
395 %description designer -l pl
396 Zaawansowane narzêdzie s³u¿±ce do projektowania interfejsu graficznego
397 za pomoc± biblioteki Qt.
398
399 %package designer-libs
400 Summary:        Libraries IDE used for GUI designing with Qt library
401 Summary(pl):    Biblioteki do IDE s³u¿±cego do projektowania GUI za pomoc± biblioteki Qt
402 Group:          X11/Applications
403
404 %description designer-libs
405 Libraries used by the Qt GUI Designer.
406
407 %description designer-libs -l pl
408 Biblioteki wykorzystywane przez narzêdzie projektowania interfejsu
409 graficznego - Qt Designer.
410
411 %package linguist
412 Summary:        Translation helper for Qt
413 Summary(pl):    Aplikacja u³atwiaj±ca t³umaczenie aplikacji oparty o Qt
414 Group:          X11/Development/Tools
415
416 %description linguist
417 This program provides an interface that shortens and helps systematize
418 the process of translating GUIs. Qt Linguist takes all of the text of
419 a UI that will be shown to the user, and presents it to a human
420 translator in a simple window. When one UI text is translated, the
421 program automatically progresses to the next, until they are all
422 completed.
423
424 %description linguist -l pl
425 Ten program oferuje interfejs znacznie przy¶pieszaj±cy proces
426 t³umaczenia interfejsu u¿ytkownika. Zbiera wszystkie teksty
427 przeznaczone do t³umaczenia i przedstawia w ³atwym w obs³udze oknie.
428 Gdy jeden z nich jest ju¿ przet³umaczony, automatycznie przechodzi do
429 nastêpnego, a¿ wszystkie bêd± przet³umaczone.
430
431 %package -n qmake
432 Summary:        Qt makefile generator
433 Summary(pl):    Generator plików makefile dla aplikacji Qt
434 Group:          X11/Development/Tools
435
436 %description -n qmake
437 A powerful makefile generator. It can create makefiles on any platform
438 from a simple .pro definitions file.
439
440 %description -n qmake -l pl
441 Rozbudowany generator plików makefile. Potrafi tworzyæ pliki makefile
442 na ka¿dej platformi na podstawie ³atwego w przygotowaniu pliku .pro.
443
444 %package -n qtconfig
445 Summary:        Qt widgets configuration tool
446 Summary(pl):    Narzêdzie do konfigurowania widgetów Qt
447 Group:          X11/Applications
448
449 %description -n qtconfig
450 A tool for configuring look and behavior of Qt widgets.
451
452 %description -n qtconfig -l pl
453 Narzêdie do konfiguracji wygl±du i zachowania widgetów Qt.
454
455 %package -n qvfb
456 Summary:        Qt Virtual framebuffer
457 Group:          X11/Development/Libraries
458
459 %description -n qvfb
460 Qt Virtual framebuffer alllows you to run Qt/Embedded applications in
461 XWindow.
462
463 %package demos
464 Summary:        Demos of new qt4 features
465 Group:          X11/Development/Libraries
466 Requires:       QtCore >= %{epoch}:%{version}-%{release}
467 Requires:       QtXml >= %{epoch}:%{version}-%{release}
468
469 %description demos
470 Demos are spiders that fly.
471
472 %package doc
473 Summary:        Qt Documentation in HTML format
474 Summary(pl):    Dokumentacja Qt w formacie HTML
475 Group:          X11/Development/Libraries
476
477 %description doc
478 Qt documentation in HTML format.
479
480 %description doc -l pl
481 Dokumentacja qt w formacie HTML.
482
483 %package man
484 Summary:        Qt man pages
485 Summary(pl):    Qt - strony man
486 Group:          X11/Development/Libraries
487
488 %description man
489 Qt documentation in man pages format.
490
491 %description man -l pl
492 Dokumentacja qt w formacie stron man.
493
494 %package examples
495 Summary:        Example programs bundled with Qt
496 Summary(pl):    Æwiczenia i przyk³ady do Qt
497 Summary(pt_BR): Programas exemplo desenvolvidos com o Qt
498 Group:          X11/Development/Libraries
499 # no it does not , we cant be sure the user wants to compile them right?
500 # he might just want to take a look, anwyay no single devel package now
501 #Requires:      %{name}-devel = %{epoch}:%{version}-%{release}
502
503 %description examples
504 Example programs bundled with Qt version.
505
506 %description examples -l pl
507 Æwiczenia/przyk³ady do³±czone do Qt.
508
509 %description examples -l pt_BR
510 Programas exemplo para o Qt versão.
511
512 %prep
513 #setup -q -n %{_name}-copy-%{_snap}
514 %setup -q -n qt-x11-opensource-desktop-%{version}-rc1
515 %patch0 -p1
516 %if %{with dont_enable}
517 %patch1 -p1
518 %patch3 -p1
519 %endif
520 %patch2 -p1 -b .niedakh
521 %patch4 -p1 -b .niedakh
522 %patch8 -p1 -b .niedakh
523 %patch9 -p1
524
525 #cat >> patches/DISABLED <<EOF
526 #0005
527 #0039
528 #0042
529 #0043
530 #0047
531 #EOF
532 #./apply_patches
533
534 # change QMAKE_CFLAGS_RELEASE to build
535 # properly optimized libs
536 plik="mkspecs/linux-g++/qmake.conf"
537
538 perl -pi -e "
539         s|/usr/X11R6/lib|/usr/X11R6/%{_lib}|;
540         s|/usr/lib|%{_libdir}|;
541         s|\\(QTDIR\\)/lib|\\(QTDIR\\)/%{_lib}|;
542         " $plik
543
544 cat $plik \
545         |grep -v QMAKE_CFLAGS_RELEASE \
546         |grep -v QMAKE_CXXFLAGS_RELEASE \
547         |grep -v QMAKE_CFLAGS_DEBUG \
548         |grep -v QMAKE_CXXFLAGS_DEBUG \
549         > $plik.1
550
551 mv $plik.1 $plik
552 echo >> $plik
553 echo -e "QMAKE_CFLAGS_RELEASE\t=\t%{rpmcflags}" >> $plik
554 echo -e "QMAKE_CXXFLAGS_RELEASE\t=\t%{rpmcxxflags}" >> $plik
555 echo -e "QMAKE_CFLAGS_DEBUG\t=\t%{debugcflags}" >> $plik
556 echo -e "QMAKE_CXXFLAGS_DEBUG\t=\t%{debugcflags}" >> $plik
557
558 %build
559 QTDIR=`/bin/pwd`
560
561 if test -n "$LD_LIBRARY_PATH"; then
562     LD_LIBRARY_PATH=$QTDIR/%{_lib}:$LD_LIBRARY_PATH
563 else
564     LD_LIBRARY_PATH=$QTDIR/lib
565 fi
566
567 if [ "%{_lib}" != "lib" ] ; then
568         ln -s lib "%{_lib}"
569 fi
570
571 # pass OPTFLAGS to build qmake itself with optimization
572 OPTFLAGS="%{rpmcflags}"
573 PATH=$QTDIR/bin:$PATH
574 QMAKESPEC=$QTDIR/mkspecs/linux-g++
575 YACC='byacc -d'
576
577 export QTDIR YACC PATH LD_LIBRARY_PATH QMAKESPEC OPTFLAGS
578
579 BuildLib() {
580 # $1 - aditional params
581
582 ##################################
583 # DEFAULT OPTIONS FOR ALL BUILDS #
584 ##################################
585
586 DEFAULTOPT=" \
587         -DQT_CLEAN_NAMESPACE \
588         -DQT_COMPAT \
589         -verbose \
590         -prefix %{_prefix} \
591         -docdir %{_docdir}/%{name}-doc \
592         -headerdir %{_includedir}/qt4 \
593         -libdir %{_libdir} \
594         -bindir %{_bindir} \
595         -plugindir %{_libdir}/qt4/plugins \
596         -datadir %{_datadir}/qt4 \
597         -translationdir %{_datadir}/locale/ \
598         -sysconfdir %{_sysconfdir}/qt4 \
599         -examplesdir %{_examplesdir}/qt4 \
600         -demosdir %{_examplesdir}/qt4-demos \
601         -fast \
602         -%{!?with_pch:no-}pch \
603         -qt-gif \
604         -system-libjpeg \
605         -system-libpng \
606         -system-zlib \
607         -no-exceptions \
608         -I%{_includedir}/postgresql/server \
609         -I%{_includedir}/mysql \
610         %{!?with_cups:-no-cups} \
611         %{?with_nas:-system-nas-sound} \
612         %{?with_nvidia:-dlopen-opengl} \
613         %{?with_pch:-pch} \
614         %{?debug:-debug} \
615         -xcursor \
616         -xshape \
617         -xrender \
618         -fontconfig \
619         -xkb \
620         -sm \
621         -nis"
622
623 ./configure \
624         $DEFAULTOPT \
625         $1 \
626         <<_EOF_
627 yes
628 _EOF_
629
630 %{__make} sub-src-all-ordered
631
632 }
633
634 ##################################
635 #      STATIC MULTI-THREAD       #
636 ##################################
637
638 %if %{with static_libs}
639 OPT=" \
640         %{?with_mysql:-qt-sql-mysql} \
641         %{?with_odbc:-qt-sql-odbc} \
642         %{?with_pgsql:-qt-sql-psql} \
643         %{?with_sqlite3:-qt-sql-sqlite} \
644         %{?with_sqlite:-qt-sql-sqlite2} \
645         %{?with_ibase:-qt-sql-ibase} \
646         -static"
647 BuildLib $OPT
648 %{__make} clean
649 %endif
650
651 ##################################
652 #      SHARED MULTI-THREAD       #
653 ##################################
654
655 OPT=" \
656         %{?with_mysql:-plugin-sql-mysql} \
657         %{?with_odbc:-plugin-sql-odbc} \
658         %{?with_pgsql:-plugin-sql-psql} \
659         %{?with_sqlite3:-plugin-sql-sqlite} \
660         %{?with_sqlite:-plugin-sql-sqlite2} \
661         %{?with_ibase:-plugin-sql-ibase}"
662 BuildLib $OPT
663
664 %{__make} \
665         sub-tools-all-ordered \
666         sub-demos-all-ordered \
667         sub-examples-all-ordered
668
669 #
670 # TODO: 
671 #       Check for "with" conditions befor build
672 # OR
673 #       Find out why and fix the reason of building only mysql sqldriver
674 #       (it is not installed either)
675 #
676 for dir in src/plugins/sqldrivers/{ibase,odbc,psql,sqlite,sqlite2}
677 do
678         cd $dir
679         %{__make}
680         cd -
681 done
682
683 %if %{with dont_enable}
684 %if %{with designer}
685 cd tools/designer/designer
686 lrelease designer_de.ts
687 lrelease designer_fr.ts
688 %endif
689 cd $QTDIR/tools/assistant
690 lrelease assistant_de.ts
691 lrelease assistant_fr.ts
692 cd $QTDIR/tools/linguist/linguist
693 lrelease linguist_de.ts
694 lrelease linguist_fr.ts
695 cd $QTDIR
696 %endif
697
698 %install
699 rm -rf $RPM_BUILD_ROOT
700 QTDIR=`/bin/pwd`
701
702 export QTDIR
703
704 %{__make} install \
705         INSTALL_ROOT=$RPM_BUILD_ROOT
706
707 install -d \
708         $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}} \
709         $RPM_BUILD_ROOT%{_libdir}/qt4/plugins/{crypto,network}
710         
711 install plugins/sqldrivers/* $RPM_BUILD_ROOT%{_libdir}/qt4/plugins/sqldrivers
712 install bin/findtr tools/qvfb/qvfb $RPM_BUILD_ROOT%{_bindir}
713
714 install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
715 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
716
717 install tools/qtconfig/images/appicon.png \
718         $RPM_BUILD_ROOT%{_pixmapsdir}/qtconfig.png
719
720 install tools/linguist/linguist/images/appicon.png \
721         $RPM_BUILD_ROOT%{_pixmapsdir}/linguist.png
722
723 install tools/assistant/images/assistant.png \
724         $RPM_BUILD_ROOT%{_pixmapsdir}/assistant.png
725
726 %if %{with designer}
727 install tools/designer/src/designer/images/designer.png \
728         $RPM_BUILD_ROOT%{_pixmapsdir}/designer.png
729 %endif
730
731 %if %{with static_libs}
732 install %{_lib}/*Qt*.a $RPM_BUILD_ROOT%{_libdir}
733 %endif
734
735 %if %{with designer}
736 install %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}/designer.desktop
737 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
738 %endif
739
740 %if %{with dont_enable}
741 install -d $RPM_BUILD_ROOT%{_datadir}/locale/{ar,de,fr,ru,he,cs,sk}/LC_MESSAGES
742 install translations/qt_ar.qm $RPM_BUILD_ROOT%{_datadir}/locale/ar/LC_MESSAGES/qt.qm
743 install translations/qt_de.qm $RPM_BUILD_ROOT%{_datadir}/locale/de/LC_MESSAGES/qt.qm
744 install translations/qt_fr.qm $RPM_BUILD_ROOT%{_datadir}/locale/fr/LC_MESSAGES/qt.qm
745 install translations/qt_ru.qm $RPM_BUILD_ROOT%{_datadir}/locale/ru/LC_MESSAGES/qt.qm
746 install translations/qt_iw.qm $RPM_BUILD_ROOT%{_datadir}/locale/he/LC_MESSAGES/qt.qm
747 install translations/qt_cs.qm $RPM_BUILD_ROOT%{_datadir}/locale/cs/LC_MESSAGES/qt.qm
748 install translations/qt_sk.qm $RPM_BUILD_ROOT%{_datadir}/locale/sk/LC_MESSAGES/qt.qm
749
750 %if %{with designer}
751 install tools/designer/designer/designer_de.qm $RPM_BUILD_ROOT%{_datadir}/locale/de/LC_MESSAGES/designer.qm
752 install tools/designer/designer/designer_fr.qm $RPM_BUILD_ROOT%{_datadir}/locale/fr/LC_MESSAGES/designer.qm
753 %endif
754
755 install tools/assistant/assistant_de.qm $RPM_BUILD_ROOT%{_datadir}/locale/de/LC_MESSAGES/assistant.qm
756 install tools/assistant/assistant_fr.qm $RPM_BUILD_ROOT%{_datadir}/locale/fr/LC_MESSAGES/assistant.qm
757
758 install tools/linguist/linguist/linguist_de.qm $RPM_BUILD_ROOT%{_datadir}/locale/de/LC_MESSAGES/linguist.qm
759 install tools/linguist/linguist/linguist_fr.qm $RPM_BUILD_ROOT%{_datadir}/locale/fr/LC_MESSAGES/linguist.qm
760 %endif
761
762 cd $RPM_BUILD_ROOT%{_includedir}/qt4/Qt
763 for f in ../Qt{3Support,Core,Gui,Network,OpenGL,Sql,Xml}/*
764 do
765         if [ ! -d $f ]; then
766                 ln -sf $f `basename $f`
767         fi
768 done
769 ln -sf ../../QtCore/arch/qatomic.h arch/qatomic.h
770 cd -
771
772 for f in $RPM_BUILD_ROOT%{_pkgconfigdir}/*.pc
773 do
774         sed s:-L$RPM_BUILD_DIR/qt-x11-opensource-desktop-%{version}-rc1/lib::g $f > $f.tmp
775         mv $f.tmp $f
776 done
777
778 # Prepare some files list
779 ifecho () {
780         RESULT=`echo $RPM_BUILD_ROOT$2 2>/dev/null`
781         [ "$RESULT" == "" ] && return
782         r=`echo $RESULT | awk '{ print $1 }'`
783
784         if [ -d "$r" ]; then
785                 echo "%%dir $2" >> $1.files
786         elif [ -x "$r" ] ; then
787                 echo "%%attr(755,root,root) $2" >> $1.files
788         elif [ -f "$r" ]; then
789                 echo "$2" >> $1.files
790         else
791                 echo "Error generation devel files list!"
792                 echo "$r: no such file or direcotry!"
793                 exit 1
794         fi
795 }
796
797 mkdevfl () {
798         MODULE=$1; shift
799         echo "%%defattr(644,root,root,755)" > $MODULE-devel.files
800         ifecho $MODULE-devel "%{_libdir}/lib$MODULE*.so"
801         ifecho $MODULE-devel "%{_libdir}/lib$MODULE*.la" 
802         ifecho $MODULE-devel "%{_libdir}/lib$MODULE*.prl"
803         ifecho $MODULE-devel "%{_pkgconfigdir}/$MODULE*.pc"
804         for f in `find $RPM_BUILD_ROOT%{_includedir}/qt4/$MODULE -printf "%%P "`
805         do
806                 ifecho $MODULE-devel %{_includedir}/qt4/$MODULE/$f
807                 ifecho $MODULE-devel %{_includedir}/qt4/Qt/$f
808         done
809         for f in $@; do ifecho $MODULE-devel $f; done
810 }
811
812 mkdevfl QtCore  %{_includedir}/qt4 %{_includedir}/qt4/Qt \
813         %{_libdir}/libQtAssistantClient{.prl,_debug.prl} \
814         %{_libdir}/libQtDesigner{.prl,_debug.prl,Components{.prl,_debug.prl}}
815 mkdevfl QtGui
816 mkdevfl QtNetwork
817 mkdevfl QtOpenGL
818 mkdevfl QtSql
819 mkdevfl QtXml
820 mkdevfl Qt3Support
821
822 echo "%defattr(644,root,root,755)" > examples.files
823 ifecho examples %{_examplesdir}/qt4
824 for f in `find $RPM_BUILD_ROOT%{_examplesdir}/qt4 -printf "%%P "`
825 do
826         ifecho examples %{_examplesdir}/qt4/$f
827 done
828
829 echo "%defattr(644,root,root,755)" > demos.files
830 ifecho demos "%{_examplesdir}/qt4-demos"
831 ifecho demos "%{_bindir}/qtdemo" >> demos.files
832 for f in `find $RPM_BUILD_ROOT%{_examplesdir}/qt4-demos -printf "%%P "`
833 do
834         ifecho demos %{_examplesdir}/qt4-demos/$f
835 done
836
837 %clean
838 rm -rf $RPM_BUILD_ROOT
839
840 %post   -n QtCore
841 /sbin/ldconfig
842 cat << EOF
843  *******************************************************
844  *                                                     *
845  *  NOTE:                                              *
846  *  With qt 4.0.0 the single threaded version was      *
847  *  removed. Also the library is modular now so be     *
848  *  sure to check that you have every module you need. *
849  *                                                     *
850  *******************************************************
851 EOF
852 %postun -n QtCore       -p /sbin/ldconfig
853
854 %post   -n QtGui        -p /sbin/ldconfig
855 %postun -n QtGui        -p /sbin/ldconfig
856
857 %post   -n QtNetwork    -p /sbin/ldconfig
858 %postun -n QtNetwork    -p /sbin/ldconfig
859
860 %post   -n QtOpenGL     -p /sbin/ldconfig
861 %postun -n QtOpenGL     -p /sbin/ldconfig
862
863 %post   -n QtSql        -p /sbin/ldconfig
864 %postun -n QtSql        -p /sbin/ldconfig
865
866 %post   -n QtXml        -p /sbin/ldconfig
867 %postun -n QtXml        -p /sbin/ldconfig
868
869 %post   -n Qt3Support   -p /sbin/ldconfig
870 %postun -n Qt3Support   -p /sbin/ldconfig
871
872 %post   assistant       -p /sbin/ldconfig
873 %postun assistant       -p /sbin/ldconfig
874
875 %post   designer-libs   -p /sbin/ldconfig
876 %postun designer-libs   -p /sbin/ldconfig
877
878 %files -n QtCore
879 %defattr(644,root,root,755)
880 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) 
881 %attr(755,root,root) %{_libdir}/libQtCore*.so.*
882 %dir %{_libdir}/qt4/plugins
883 %dir %{_libdir}/qt4/plugins/codecs
884 %dir %{_libdir}/qt4/plugins/crypto
885 %dir %{_libdir}/qt4/plugins/imageformats
886 %dir %{_libdir}/qt4/plugins/network
887 %dir %{_libdir}/qt4/plugins/sqldrivers
888 %dir %{_datadir}/qt4
889
890 %files -n QtGui
891 %defattr(644,root,root,755)
892 %attr(755,root,root) %{_libdir}/libQtGui*.so.*
893 %{_libdir}/qt4/plugins/codecs/*
894 %{_libdir}/qt4/plugins/imageformats/*
895
896 %files -n QtNetwork
897 %defattr(644,root,root,755)
898 %attr(755,root,root) %{_libdir}/libQtNetwork*.so.*
899
900 %files -n QtOpenGL
901 %defattr(644,root,root,755)
902 %attr(755,root,root) %{_libdir}/libQtOpenGL*.so.*
903
904 %files -n QtSql
905 %defattr(644,root,root,755)
906 %attr(755,root,root) %{_libdir}/libQtSql*.so.*
907
908 %if %{with mysql}
909 %files -n QtSql-mysql
910 %defattr(644,root,root,755)
911 %attr(755,root,root)  %{_libdir}/qt4/plugins/sqldrivers/libqsqlmysql*.so
912 %endif
913
914 %if %{with pgsql}
915 %files -n QtSql-pgsql
916 %defattr(644,root,root,755)
917 %attr(755,root,root) %{_libdir}/qt4/plugins/sqldrivers/libqsqlpsql*.so
918 %endif
919
920 %if %{with sqlite}
921 %files -n QtSql-sqlite
922 %defattr(644,root,root,755)
923 %attr(755,root,root) %{_libdir}/qt4/plugins/sqldrivers/libqsqlite2*.so
924 %endif
925
926 %if %{with sqlite3}
927 %files -n QtSql-sqlite3
928 %defattr(644,root,root,755)
929 %attr(755,root,root) %{_libdir}/qt4/plugins/sqldrivers/libqsqlite*.so
930 %endif
931
932 %if %{with ibase}
933 %files -n QtSql-ibase
934 %defattr(644,root,root,755)
935 %attr(755,root,root) %{_libdir}/qt4/plugins/sqldrivers/libqsqlibase*.so
936 %endif
937
938 %if %{with odbc}
939 %files -n QtSql-odbc
940 %defattr(644,root,root,755)
941 %attr(755,root,root) %{_libdir}/qt4/plugins/sqldrivers/libqsqlodbc*.so
942 %endif
943
944 %files -n QtXml
945 %defattr(644,root,root,755)
946 %attr(755,root,root) %{_libdir}/libQtXml*.so.*
947
948
949 %files -n Qt3Support
950 %defattr(644,root,root,755)
951 %attr(755,root,root) %{_bindir}/uic3
952 %attr(755,root,root) %{_libdir}/libQt3Support*.so.*
953
954 %files assistant
955 %defattr(644,root,root,755)
956 %attr(755,root,root) %{_bindir}/assistant
957 %attr(755,root,root) %{_libdir}/libQtAssistantClient*.so*
958 #%lang(de) %{_datadir}/locale/de/LC_MESSAGES/assistant.qm
959 #%lang(fr) %{_datadir}/locale/fr/LC_MESSAGES/assistant.qm
960 %{_desktopdir}/assistant.desktop
961 %{_pixmapsdir}/assistant.png
962
963 %files build
964 %defattr(644,root,root,755)
965 %attr(755,root,root) %{_bindir}/rcc
966 %attr(755,root,root) %{_bindir}/moc
967 %attr(755,root,root) %{_bindir}/qt3to4
968 %attr(755,root,root) %{_bindir}/uic
969 %{_datadir}/qt4/q3porting.xml
970
971 %if %{with designer}
972 %files designer-libs
973 %defattr(644,root,root,755)
974 %attr(755,root,root) %{_libdir}/libQtDesigner*.so.*.*.*
975 %attr(755,root,root) %{_libdir}/qt4/plugins/designer/*.so
976
977 %files designer
978 %defattr(644,root,root,755)
979 %attr(755,root,root) %{_bindir}/designer
980 #%dir %{_libdir}/%{name}/plugins-?t/designer
981 #%lang(de) %{_datadir}/locale/de/LC_MESSAGES/designer.qm
982 #%lang(fr) %{_datadir}/locale/fr/LC_MESSAGES/designer.qm
983 %{_desktopdir}/designer.desktop
984 %{_pixmapsdir}/designer.png
985 %endif
986
987 %files linguist
988 %defattr(644,root,root,755)
989 %attr(755,root,root) %{_bindir}/linguist
990 %attr(755,root,root) %{_bindir}/findtr
991 %attr(755,root,root) %{_bindir}/lrelease
992 %attr(755,root,root) %{_bindir}/lupdate
993 %attr(755,root,root) %{_bindir}/qm2ts
994 #%lang(de) %{_datadir}/locale/de/LC_MESSAGES/linguist.qm
995 #%lang(fr) %{_datadir}/locale/fr/LC_MESSAGES/linguist.qm
996 #%{_mandir}/man1/qm2ts.1*
997 #%{_mandir}/man1/lupdate*.1*
998 #%{_mandir}/man1/lrelease*.1*
999 %{_datadir}/qt4/phrasebooks
1000 %{_desktopdir}/linguist.desktop
1001 %{_pixmapsdir}/linguist.png
1002
1003 %files -n qmake
1004 %defattr(644,root,root,755)
1005 %attr(755,root,root) %{_bindir}/qmake
1006 %{_datadir}/qt4/mkspecs
1007
1008 %files -n qtconfig
1009 %defattr(644,root,root,755)
1010 %attr(755,root,root) %{_bindir}/qtconfig
1011 %{_desktopdir}/qtconfig.desktop
1012 %{_pixmapsdir}/qtconfig.png
1013
1014 %files -n qvfb
1015 %defattr(644,root,root,755)
1016 %attr(755,root,root) %{_bindir}/qvfb
1017
1018 %files doc
1019 %defattr(644,root,root,755)
1020 %{_docdir}/%{name}-doc
1021
1022 %files -n QtCore-devel -f QtCore-devel.files
1023 %files -n QtGui-devel -f QtGui-devel.files
1024 %files -n QtNetwork-devel -f QtNetwork-devel.files
1025 %files -n QtOpenGL-devel -f QtOpenGL-devel.files
1026 %files -n QtSql-devel -f QtSql-devel.files
1027 %files -n QtXml-devel -f QtXml-devel.files
1028 %files -n Qt3Support-devel -f Qt3Support-devel.files
1029
1030 %files demos -f demos.files
1031 %files examples -f examples.files
This page took 0.175889 seconds and 3 git commands to generate.