Sat, 16 Oct 2010 17:18:32 +0200
Correct assistant buildconf, unrelated to flawless webkit buildconf.
1 ##
2 ## qt.spec -- OpenPKG RPM Specification
3 ## Copyright (c) 2010 Michael Schloh von Bennewitz <michael@schloh.com>
4 ##
5 ## Permission to use, copy, modify, and distribute this software for
6 ## any purpose with or without fee is hereby granted, provided that
7 ## the above copyright notice and this permission notice appear in all
8 ## copies.
9 ##
10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21 ## SUCH DAMAGE.
22 ##
24 # FIXME: MSvB: It appears that bugs in current versions of binutils
25 # FIXME: MSvB: fail to properly link Qt object code, resulting in
26 # FIXME: MSvB: 'ld: libQt*.so: pthread_mutex...: invalid version 6
27 # FIXME: MSvB: libQt*.so: could not read symbols: Bad value'
28 # FIXME: MSvB: The effects of these bugs are platform dependent.
29 # FIXME: MSvB: Solaris 11 IA-32 builds fail while Linux 2.6.25.18
30 # FIXME: MSvB: AMD64 builds succeed.
32 # package information
33 Name: qt
34 Summary: Cross Platform Application Framework
35 URL: http://www.trolltech.com/products/qt/
36 Vendor: Nokia Corporation
37 Packager: Michael Schloh von Bennewitz
38 Distribution: MSvB Recherche Production
39 Class: EVAL
40 Group: Development
41 License: GPL
42 Version: 4.7.0
43 Release: 20101015
45 # build options
46 %option with_tools yes
47 %option with_mysql no
48 %option with_pgsql no
49 %option with_shared no
50 %option with_examples no
52 # list of sources
53 Source0: ftp://ftp.qt.nokia.com/qt/source/qt-everywhere-opensource-src-%{version}.tar.gz
55 # build information
56 Prefix: %{l_prefix}
57 BuildRoot: %{l_buildroot}
58 BuildPreReq: OpenPKG, openpkg >= 20050726, make, gcc, pkgconfig
59 PreReq: OpenPKG, openpkg >= 20050726
60 BuildPreReq: X11, png, mng, jpeg, tiff, mesa, xrender
61 PreReq: X11, png, mng, jpeg, tiff, mesa, xrender
62 BuildPreReq: openssl, zlib, libiconv, sqlite, dbus
63 PreReq: openssl, zlib, libiconv, sqlite, dbus
64 BuildPreReq: fontconfig, freetype
65 PreReq: fontconfig, freetype
66 %if "%{with_mysql}" == "yes"
67 BuildPreReq: mysql
68 PreReq: mysql
69 %endif
70 %if "%{with_pgsql}" == "yes"
71 BuildPreReq: postgresql
72 PreReq: postgresql
73 %endif
74 AutoReq: no
75 AutoReqProv: no
76 Provides: QTSDK
78 %description
79 Qt is a comprehensive C++ framework for cross-platform application
80 development. Using Qt, you can develop applications and user
81 interfaces once, and deploy them across many desktop and embedded
82 operating systems without rewriting the source code. This package
83 distribution builds all modules of the Qt/X11 Open Source Edition.
85 %track
86 prog qt = {
87 version = %{version}
88 url = ftp://ftp.qt.nokia.com/qt/source/
89 regex = qt-everywhere-opensource-src-(__VER__)\.tar\.gz
90 }
92 %prep
93 # announce exceptional build requirements
94 ( echo "This package has exceptional build requirements:"
95 echo " qt-%{version}-root (4,5 Go)"
96 echo " qt-everywhere-opensource-src-%{version} (5,5 Go)"
97 echo " qt-%{version}-<date>.<arch>-<os>-<tag>.rpm (2 Go)"
98 echo "Building with no options takes 2,0 hours on a dual core"
99 echo "2 GHz CPU, or 5 hours with all build options enabled."
100 ) | %{l_rpmtool} msg -b -t notice
102 %setup -q -n qt-everywhere-opensource-src-%{version}
103 x11_incdir=`%{l_rc} --query x11_incdir`
104 x11_libdir=`%{l_rc} --query x11_libdir`
105 fontconflibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig`
106 lcmslibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static lcms`
107 openssllibs=`%{l_prefix}/bin/pkg-config --libs --static openssl`
109 loclibs=''
110 case "%{l_platform -t}" in
111 *-sunos* )
112 loclibs='-lsocket -lnsl'
113 ;;
114 esac
115 ( cd mkspecs/qws
116 for plat in freebsd-generic-g++ macx-generic-g++ solaris-generic-g++;
117 do
118 ln -s $plat `echo $plat | %{l_shtool} subst -e 's;\(.*\)-generic-\(.*\);\1-x86-\2;'`
119 done
120 ) || exit $?
121 %{l_shtool} subst \
122 -e 's;\(-z[\t ][\t ]*\)\([^\t \"][^\t \"]*\);\1"\2";g' \
123 configure
124 %{l_shtool} subst \
125 -e 's;\(RPATH_FLAGS\)=.*\$QT_INSTALL_LIBS.*\(\$RPATH_FLAGS\)";\1="%{l_prefix}/lib/qt/dynamic \2";' \
126 -e 's;\(QMAKE_RPATHDIR +=\) \\"\$QT_INSTALL_LIBS\\";\1 %{l_prefix}/lib/qt/dynamic;' \
127 configure
128 %{l_shtool} subst \
129 -e 's; *QMakeVar set QMAKE_CFLAGS_X11.*QT_CFLAGS_FONTCONFIG.*;;' \
130 -e 's; *QMakeVar set QMAKE_LIBS_X11.*QT_LIBS_FONTCONFIG.*;;' \
131 configure
132 %{l_shtool} subst \
133 -e "s;\(OPENSSL_LIBS *=\) *-lssl -lcrypto;\1 $openssllibs;" \
134 configure
135 # yes this is needed several times to catch nested occurences of '--cflags'
136 %{l_shtool} subst \
137 -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \
138 -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \
139 configure
140 %{l_shtool} subst \
141 -e 's;\(TRY_INCLUDEPATHS = \).*\(\$\$INCLUDEPATH\);\1\2;' \
142 -e 's;/freetype2;/freetype;' \
143 config.tests/unix/freetype/freetype.pri
144 %{l_shtool} subst \
145 -e "s;\(LIBS.*=.*-lmng\);\1 $lcmslibs;" \
146 src/gui/image/qmnghandler.pri
147 %{l_shtool} subst \
148 -e "s;^\(LIBS += \)-lfreetype -lfontconfig;\1$fontconflibs;" \
149 config.tests/x11/fontconfig/fontconfig.pro
150 echo 'INCLUDEPATH += /usr/include/wacomcfg' \
151 >>src/gui/kernel/x11.pri
152 echo "contains(QT_CONFIG, fontconfig) { LIBS += $fontconflibs }" \
153 >>src/gui/kernel/x11.pri
154 echo "contains(QT_CONFIG, fontconfig) { LIBS += $fontconflibs }" \
155 >>src/gui/text/text.pri
156 echo "INCLUDEPATH = `%{l_prefix}/bin/pkg-config --cflags-only-I dbus-1 | %{l_shtool} subst -e 's;\-I;;g'`" \
157 >>config.tests/unix/dbus/dbus.pro
158 echo "LIBS = `%{l_prefix}/bin/pkg-config --libs-only-l --static dbus-1`" \
159 >>config.tests/unix/dbus/dbus.pro
160 %{l_shtool} subst \
161 -e "s;\(LIBS.*= -lpq\);\1 `%{l_prefix}/bin/pg_config --libs` $loclibs;" \
162 config.tests/unix/psql/psql.pro
163 %{l_shtool} subst \
164 -e 's;^mac[^:][^:]*:\(LIBS\);\1;' \
165 config.tests/unix/iconv/iconv.pro
166 uiclibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig lcms`
167 %{l_shtool} subst \
168 -e 's;LIBS .*= -lpq$;LIBS += -lpq -lssl -lcrypto;' \
169 src/sql/drivers/drivers.pri
170 %{l_shtool} subst \
171 -e "s;QMAKE_CXXFLAGS += \$\$QT_CFLAGS_GLIB;INCPATH += `pkg-config --cflags-only-I glib-2.0 gthread-2.0 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \
172 src/corelib/kernel/kernel.pri \
173 src/gui/kernel/kernel.pri
174 %{l_shtool} subst \
175 -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_PSQL;INCPATH += `pg_config --includedir 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \
176 -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_MYSQL;INCPATH += `mysql_config --include 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \
177 -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_SQLITE;INCPATH += `pkg-config --cflags-only-I sqlite3 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \
178 -e 's;!static:\(!isEmpty(QT_LFLAGS_PSQL)\);\1;' \
179 -e 's;!static:\(LIBS \*= \$\$QT_LFLAGS_PSQL\);\1;' \
180 src/plugins/sqldrivers/mysql/mysql.pro \
181 src/plugins/sqldrivers/psql/psql.pro \
182 src/plugins/sqldrivers/sqlite/sqlite.pro \
183 src/sql/drivers/drivers.pri
184 %{l_shtool} subst \
185 -e "s;QMAKE_CXXFLAGS += \$\$QT_CFLAGS_DBUS;INCPATH += `pkg-config --cflags-only-I dbus-1 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \
186 src/dbus/dbus.pro
187 %{l_shtool} subst \
188 -e 's;^\(QMAKE_INCDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/include;' \
189 -e 's;^\(QMAKE_LIBDIR[^a-zA-Z0-9=]*=\).*;\1;' \
190 -e "s;^\(QMAKE_INCDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/include \2;" \
191 -e "s;^\(QMAKE_LIBDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/lib \2;" \
192 -e 's;^\(QMAKE_LFLAGS_RELEASE.*\);\1 -s;' \
193 mkspecs/qws/*/qmake.conf \
194 mkspecs/*/*.conf
195 %{l_shtool} subst \
196 -e 's;^\(QMAKE_LIBS +=.*\);\1 -liconv;' \
197 src/corelib/corelib.pro
198 %{l_shtool} subst \
199 -e "s;^\(QMAKE_INCDIR_X11[^=]*=\).*;\1 %{l_prefix}/include $x11_incdir;" \
200 -e "s;^\(QMAKE_LIBDIR_X11[^=]*=\).*;\1 %{l_prefix}/lib $x11_libdir;" \
201 mkspecs/qws/solaris*/qmake.conf \
202 mkspecs/solaris*/qmake.conf
203 echo "QMAKE_LIBDIR += %{l_prefix}/lib/qt/dynamic" \
204 >>mkspecs/features/shared.prf
205 %{l_shtool} subst \
206 -e 's; *\.\./3rdparty/freetype/.*;;g' \
207 -e 's;^\( *contains(QT_CONFIG, freetype) {\);\1 LIBS += -lfreetype;' \
208 src/gui/text/text.pri
209 %{l_shtool} subst \
210 -e 's;\(#include *"\)\(tiffio.h"\);\1tiff/\2;' \
211 src/gui/image/qtiffhandler.cpp
212 %{l_shtool} subst \
213 -e 's;\(CONFIG[\t ]*+=[\t ]*qt\);\1 x11;' \
214 tools/qtconfig/qtconfig.pro
215 %{l_shtool} subst \
216 -e 's;webkit;web-broken-kit;g' \
217 tools/assistant/tools/assistant/assistant.pro
218 echo "DEFINES += QT_NO_WEBKIT" \
219 >>tools/assistant/tools/assistant/assistant.pro
220 %{l_shtool} subst \
221 -e "s;Qt.s Classes;All Classes;" \
222 tools/assistant/tools/assistant/doc/assistant.qdoc \
223 tools/qdoc3/doc/qdoc-manual.qdoc \
224 tools/qdoc3/doc/files/qt.qdocconf \
225 tools/qdoc3/test/qt-build-docs.qdocconf \
226 tools/qdoc3/test/qt.qdocconf
228 %build
229 # protect against sloppy code inclusion of all unused subprojects
230 (cd src/3rdparty && rm -rf [^cdehjmswxz]* sql* win* zlib zlib.pri) || exit $?
232 # detect which platform for which to build
233 case "%{l_platform -t}" in
234 sun4[uv]-sunos* | amd64-sunos* ) platcomp="solaris-g++-64" ;;
235 i?86-sunos* ) platcomp="solaris-g++" ;;
236 amd64-linux* ) platcomp="linux-g++-64" ;;
237 i?86-linux* ) platcomp="linux-g++" ;;
238 amd64-freebsd* | i?86-freebsd* ) platcomp="freebsd-g++" ;;
239 *-aix* ) platcomp="aix-g++" ;;
240 *-darwin* ) platcomp="macx-g++" ;;
241 *-hpux* ) platcomp="hpux-g++" ;;
242 *-irix* ) platcomp="irix-g++" ;;
243 * ) echo "Platform '%{l_platform -t}' is not supported." 2>&1; exit 1 ;;
244 esac
246 # detect which architecture extensions are available
247 archflags=''
248 case "%{l_platform -t}" in
249 amd64-* )
250 break
251 ;;
252 * )
253 archflags='-no-sse2 -no-3dnow'
254 ;;
255 esac
257 %if "%{with_shared}" == "yes"
258 # optional shared build (precedes mandatory static build)
259 echo 'yes' | ./configure \
260 $archflags \
261 -opensource \
262 -prefix %{l_prefix} \
263 -bindir %{l_prefix}/bin \
264 -libdir %{l_prefix}/lib/qt/dynamic \
265 -docdir %{l_prefix}/share/qt/doc \
266 -headerdir %{l_prefix}/include \
267 -plugindir %{l_prefix}/lib/qt/plugins \
268 -datadir %{l_prefix}/share/qt \
269 -translationdir %{l_prefix}/share/qt/translations \
270 -sysconfdir %{l_prefix}/etc/qt \
271 -examplesdir %{l_prefix}/share/qt/examples \
272 -demosdir %{l_prefix}/share/qt/demos \
273 -release \
274 -shared \
275 -platform $platcomp \
276 -no-sql-ibase \
277 %if "%{with_mysql}" == "yes"
278 -qt-sql-mysql \
279 -plugin-sql-mysql \
280 %else
281 -no-sql-mysql \
282 %endif
283 %if "%{with_pgsql}" == "yes"
284 -qt-sql-psql \
285 -plugin-sql-psql \
286 %else
287 -no-sql-psql \
288 %endif
289 -no-sql-odbc \
290 -system-sqlite \
291 -qt-sql-sqlite \
292 -plugin-sql-sqlite \
293 -no-sql-sqlite2 \
294 -openssl-linked \
295 -xmlpatterns \
296 -svg \
297 -webkit \
298 -system-zlib \
299 -qt-gif \
300 -system-libpng \
301 -system-libmng \
302 -system-libjpeg \
303 -system-libtiff \
304 -rpath \
305 -no-cups \
306 -iconv \
307 -pch \
308 -dbus-linked \
309 -opengl \
310 -xrender \
311 -fontconfig \
312 -freetype \
313 -no-glib
315 # default options are implicitly used, for example...
316 #-no-fast -exceptions -accessibility -stl -qt3support -nis
317 #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb
319 # carry out shared build procedure
320 ( cd src
321 %{l_make} %{l_mflags -O} \
322 sub-moc sub-rcc sub-uic sub-uic3
323 ) || exit $?
324 %{l_make} %{l_mflags -O} \
325 sub-corelib-make_default-ordered \
326 sub-xml-make_default-ordered \
327 sub-network-make_default-ordered \
328 sub-sql-make_default-ordered \
329 sub-testlib-make_default-ordered \
330 sub-dbus-make_default-ordered \
331 sub-gui-make_default-ordered \
332 sub-qt3support-make_default-ordered \
333 sub-opengl-make_default-ordered \
334 sub-xmlpatterns-make_default-ordered \
335 sub-multimedia-make_default-ordered \
336 sub-svg-make_default-ordered \
337 sub-script-make_default-ordered \
338 sub-declarative-make_default-ordered \
339 sub-javascriptcore-make_default-ordered \
340 sub-webkit-make_default-ordered \
341 sub-scripttools-make_default-ordered \
342 sub-plugins-make_default-ordered \
343 sub-imports-make_default-ordered \
344 sub-webkitdeclarative-make_default-ordered \
345 sub-translations-make_default-ordered
347 # arthur plugin requires libQtDesigner
348 ( cd demos
349 ( cd ../tools/designer/src/lib
350 %{l_make} %{l_mflags -O}
351 ) || exit $?
352 %{l_make} %{l_mflags -O} sub-arthurplugin
353 ) || exit $?
355 # cache shared libs and initialize the build configuration, which
356 # would otherwise still contain references to our shared libs build
357 %{l_shtool} mkdir -f -p -m 755 sharbuild/dynamic
358 mv lib/* sharbuild/dynamic/
359 mv plugins sharbuild/
360 %{l_make} %{l_mflags} confclean
361 %endif
363 # mandatory static build (follows optional shared build)
364 echo 'yes' | ./configure \
365 $archflags \
366 -opensource \
367 -prefix %{l_prefix} \
368 -bindir %{l_prefix}/bin \
369 -libdir %{l_prefix}/lib \
370 -docdir %{l_prefix}/share/qt/doc \
371 -headerdir %{l_prefix}/include \
372 -plugindir %{l_prefix}/lib/qt/plugins \
373 -datadir %{l_prefix}/share/qt \
374 -translationdir %{l_prefix}/share/qt/translations \
375 -sysconfdir %{l_prefix}/etc/qt \
376 -examplesdir %{l_prefix}/share/qt/examples \
377 -demosdir %{l_prefix}/share/qt/demos \
378 -release \
379 -static \
380 -platform $platcomp \
381 -no-sql-ibase \
382 %if "%{with_mysql}" == "yes"
383 -qt-sql-mysql \
384 %else
385 -no-sql-mysql \
386 %endif
387 %if "%{with_pgsql}" == "yes"
388 -qt-sql-psql \
389 %else
390 -no-sql-psql \
391 %endif
392 -no-sql-odbc \
393 -system-sqlite \
394 -qt-sql-sqlite \
395 -no-sql-sqlite2 \
396 -openssl-linked \
397 -xmlpatterns \
398 -svg \
399 -webkit \
400 -system-zlib \
401 -qt-gif \
402 -system-libpng \
403 -system-libmng \
404 -system-libjpeg \
405 -system-libtiff \
406 -rpath \
407 -no-cups \
408 -iconv \
409 -pch \
410 -dbus-linked \
411 -opengl \
412 -xrender \
413 -fontconfig \
414 -freetype \
415 -no-glib
417 # default options are implicitly used, for example...
418 #-no-fast -exceptions -accessibility -stl -qt3support -nis
419 #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb
421 # carry out static build procedure
422 %{l_make} %{l_mflags -O} sub-src
423 %if "%{with_tools}" == "yes"
424 %{l_make} %{l_mflags -O} \
425 sub-tools-make_default-ordered sub-translations-make_default-ordered
426 %endif
427 %if "%{with_examples}" == "yes"
428 %{l_make} %{l_mflags -O} \
429 sub-demos-make_default-ordered \
430 sub-examples-make_default-ordered
431 %endif
432 %if "%{with_tools}" == "yes"
433 %{l_make} %{l_mflags -O} docs
434 %else
435 %if "%{with_examples}" == "yes"
436 %{l_make} %{l_mflags -O} docs
437 %endif
438 %endif
440 %install
441 rm -rf $RPM_BUILD_ROOT
443 # carry out installation procedure
444 targets="sub-tools-bootstrap-install_subtargets-ordered \
445 sub-moc-install_subtargets-ordered \
446 sub-rcc-install_subtargets-ordered \
447 sub-uic-install_subtargets-ordered \
448 sub-corelib-install_subtargets-ordered \
449 sub-xml-install_subtargets-ordered \
450 sub-network-install_subtargets-ordered \
451 sub-sql-install_subtargets-ordered \
452 sub-testlib-install_subtargets-ordered \
453 sub-dbus-install_subtargets-ordered \
454 sub-gui-install_subtargets-ordered \
455 sub-qt3support-install_subtargets-ordered \
456 sub-uic3-install_subtargets-ordered \
457 sub-opengl-install_subtargets-ordered \
458 sub-xmlpatterns-install_subtargets-ordered \
459 sub-multimedia-install_subtargets-ordered \
460 sub-svg-install_subtargets-ordered \
461 sub-script-install_subtargets-ordered \
462 sub-declarative-install_subtargets-ordered \
463 sub-scripttools-install_subtargets-ordered \
464 sub-imports-install_subtargets-ordered \
465 sub-translations-install_subtargets-ordered"
467 %if "%{with_tools}" == "yes"
468 targets="$targets sub-tools-install_subtargets-ordered install_htmldocs install_qchdocs install_docimages"
469 %endif
470 %if "%{with_examples}" == "yes"
471 targets="$targets sub-demos-install_subtargets-ordered sub-examples-install_subtargets-ordered install_htmldocs install_qchdocs install_docimages"
472 %endif
473 targets="$targets install_qmake install_mkspecs"
474 %{l_make} %{l_mflags} $targets INSTALL_ROOT="$RPM_BUILD_ROOT"
476 # only install static or shared plugins according to user choice
477 %if "%{with_shared}" != "yes"
478 %{l_make} %{l_mflags} sub-plugins-install_subtargets-ordered INSTALL_ROOT="$RPM_BUILD_ROOT"
479 %else
480 %{l_tar} cf - -C sharbuild plugins | %{l_tar} xf - -C $RPM_BUILD_ROOT%{l_prefix}/lib/qt
481 %endif
483 %if "%{with_shared}" == "yes"
484 # install shared libs and symlinks
485 %{l_shtool} mkdir -f -p -m 755 \
486 $RPM_BUILD_ROOT%{l_prefix}/lib/qt
487 %{l_tar} cf - -C sharbuild dynamic | %{l_tar} xf - -C $RPM_BUILD_ROOT%{l_prefix}/lib/qt
489 # offer limited support of pkg-config(1) for shared libs
490 # substitution unfortunately only handles paths with no whitespace
491 %{l_shtool} subst \
492 -e "s;-L[^\t ][^\t ]*qt-everywhere-opensource-src-%{version};-L%{l_prefix};g" \
493 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/pkgconfig/*
495 # explain nonstandard shared library placement
496 ( echo "This OpenPKG Qt build is using the with_shared option."
497 echo ""
498 echo "The directory %{l_prefix}/lib/qt/dynamic contains the"
499 echo "requested shared libraries. Although shared libraries"
500 echo "have been optionally built (see the build time"
501 echo "'with_shared yes' option), static libraries were"
502 echo "built by default as usual, and installed in the"
503 echo "standard library directory %{l_prefix}/lib."
504 echo ""
505 echo "To build applications using shared libraries instead,"
506 echo "please direct pkg-config(1) to use the proper definitions"
507 echo "by setting the environment variable PKG_CONFIG_PATH to "
508 echo "%{l_prefix}/lib/qt/dynamic/pkgconfig."
509 echo ""
510 echo "Note: If building via qmake(1), please append"
511 echo " either 'static' or 'shared' to the line"
512 echo " 'CONFIG +=' in the project file (name.pro)."
513 echo " Then execute %{l_prefix}/bin/qmake on this file."
514 ) >$RPM_BUILD_ROOT%{l_prefix}/lib/qt/README
515 %endif
517 # correct temporary runtime link paths (static libs)
518 %{l_shtool} subst \
519 -e "s;\(QMAKE_PRL_BUILD_DIR[\t ][\t ]*=\).*;\1 /.../qt-everywhere-opensource-src-%{version};" \
520 -e "s;-L\([\t ]*\)[^\t ][^\t ]*qt-everywhere-opensource-src-%{version}\(/[^\t ][^\t ]*\);-L\1%{l_prefix}\2;g" \
521 $RPM_BUILD_ROOT%{l_prefix}/lib/*.prl \
522 $RPM_BUILD_ROOT%{l_prefix}/lib/*.la
523 %if "%{with_shared}" == "yes"
524 # correct temporary runtime link paths (dynamic libs)
525 %{l_shtool} subst \
526 -e "s;\(QMAKE_PRL_BUILD_DIR[\t ][\t ]*=\).*;\1 /.../qt-everywhere-opensource-src-%{version};" \
527 -e "s;-L\([\t ]*\)[^\t ][^\t ]*qt-everywhere-opensource-src-%{version}/lib;-L\1%{l_prefix}/lib/qt/dynamic;g" \
528 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.prl \
529 $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.la
530 %endif
532 ## Doesn't work as expected, because RPM reads the --[in|ex]cludedocs
533 ## argument only when installing binary packages, rather than building.
534 #%define _excludedocs 0
535 #%define _includedocs 1
536 # echo %{_excludedocs}
537 # echo %{_includedocs}
538 #
539 ## Doesn't work as expected, because it seems that OpenPKG too mercilessly
540 ## removes RPM readi1ng of the %docdir keyword in rpm.patch.feature.
541 # %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
542 # %{l_files_std} \
543 # '%docdir %{l_prefix}/share/pkg/doc'
544 #
545 ## Doesn't work as expected, because the rpmtool(1) marks
546 ## only einzeln files as documents, skipping directories
547 # %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
548 # %{l_files_std} \
549 # '%doc %{l_prefix}/share/pkg/doc/doc.txt'
550 #
551 # determine internal file listing
552 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
553 %{l_files_std} \
554 '%not %dir %{l_prefix}/lib/pkgconfig'
556 %files -f files
558 %clean
559 rm -rf $RPM_BUILD_ROOT