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