qt/qt.spec

Fri, 08 Oct 2010 23:24:07 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 08 Oct 2010 23:24:07 +0200
changeset 257
00697b799711
parent 216
0aa08e4b2ef4
child 258
85dc84aeb23f
permissions
-rw-r--r--

Update major version and adjust build configuration accordingly.

     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.
    31 #   FIXME: MSvB:
    32 #   FIXME: MSvB: -no-webkit added to broken static buildconf
    34 #   package information
    35 Name:         qt
    36 Summary:      Cross Platform Application Framework
    37 URL:          http://www.trolltech.com/products/qt/
    38 Vendor:       Nokia Corporation
    39 Packager:     Michael Schloh von Bennewitz
    40 Distribution: MSvB Recherche Production
    41 Class:        EVAL
    42 Group:        Development
    43 License:      GPL
    44 Version:      4.7.0
    45 Release:      20101008
    47 #   build options
    48 %option       with_tools     yes
    49 %option       with_mysql     no
    50 %option       with_pgsql     no
    51 %option       with_shared    no
    52 %option       with_examples  no
    54 #   list of sources
    55 Source0:      ftp://ftp.qt.nokia.com/qt/source/qt-everywhere-opensource-src-%{version}.tar.gz
    57 #   build information
    58 Prefix:       %{l_prefix}
    59 BuildRoot:    %{l_buildroot}
    60 BuildPreReq:  OpenPKG, openpkg >= 20050726, make, gcc, pkgconfig
    61 PreReq:       OpenPKG, openpkg >= 20050726
    62 BuildPreReq:  X11, png, mng, jpeg, tiff, mesa, xrender
    63 PreReq:       X11, png, mng, jpeg, tiff, mesa, xrender
    64 BuildPreReq:  openssl, zlib, libiconv, sqlite, dbus
    65 PreReq:       openssl, zlib, libiconv, sqlite, dbus
    66 BuildPreReq:  fontconfig, freetype
    67 PreReq:       fontconfig, freetype
    68 %if "%{with_mysql}" == "yes"
    69 BuildPreReq:  mysql
    70 PreReq:       mysql
    71 %endif
    72 %if "%{with_pgsql}" == "yes"
    73 BuildPreReq:  postgresql
    74 PreReq:       postgresql
    75 %endif
    76 AutoReq:      no
    77 AutoReqProv:  no
    78 Provides:     QTSDK
    80 %description
    81     Qt is a comprehensive C++ framework for cross-platform application
    82     development. Using Qt, you can develop applications and user
    83     interfaces once, and deploy them across many desktop and embedded
    84     operating systems without rewriting the source code. This package
    85     distribution builds all modules of the Qt/X11 Open Source Edition.
    87 %track
    88     prog qt = {
    89         version   = %{version}
    90         url       = ftp://ftp.trolltech.com/qt/source/
    91         regex     = qt-everywhere-opensource-src-(__VER__)\.tar\.gz
    92     }
    94 %prep
    95     #   announce exceptional build requirements
    96     ( echo "This package has exceptional build requirements:"
    97       echo "  qt-%{version}-root (2,5 Go)"
    98       echo "  qt-everywhere-opensource-src-%{version} (4,5 Go)"
    99       echo "  qt-%{version}-<date>.<arch>-<os>-<tag>.rpm (1 Go)"
   100       echo "Building with no options takes 0,5 hours on a dual core"
   101       echo "2 GHz CPU, or 2 hours with all build options enabled."
   102     ) | %{l_rpmtool} msg -b -t notice
   104     %setup -q -n qt-everywhere-opensource-src-%{version}
   105     x11_incdir=`%{l_rc} --query x11_incdir`
   106     x11_libdir=`%{l_rc} --query x11_libdir`
   107     fontconflibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig`
   108     lcmslibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static lcms`
   109     openssllibs=`%{l_prefix}/bin/pkg-config --libs --static openssl`
   111     loclibs=''
   112     case "%{l_platform -t}" in
   113         *-sunos* )
   114             loclibs='-lsocket -lnsl'
   115             ;;
   116     esac
   117     ( cd mkspecs/qws
   118       for plat in freebsd-generic-g++ macx-generic-g++ solaris-generic-g++;
   119       do 
   120           ln -s $plat `echo $plat | %{l_shtool} subst -e 's;\(.*\)-generic-\(.*\);\1-x86-\2;'`
   121       done
   122     ) || exit $?
   123     %{l_shtool} subst \
   124         -e 's;\(-z[\t ][\t ]*\)\([^\t \"][^\t \"]*\);\1"\2";g' \
   125         configure
   126     %{l_shtool} subst \
   127         -e 's; *QMakeVar set QMAKE_CFLAGS_X11.*QT_CFLAGS_FONTCONFIG.*;;' \
   128         -e 's; *QMakeVar set QMAKE_LIBS_X11.*QT_LIBS_FONTCONFIG.*;;' \
   129         configure
   130     %{l_shtool} subst \
   131         -e "s;\(OPENSSL_LIBS *=\) *-lssl -lcrypto;\1 $openssllibs;" \
   132         configure
   133     %{l_shtool} subst \
   134         -e 's;-silent|;-rpath|-silent|;' \
   135         -e 's;\(RPATH_FLAGS="\)\\"\$QT_INSTALL_LIBS\\" \($RPATH_FLAGS"\);\1\2;' \
   136         -e "s;\(echo.*QMAKE_RPATHDIR +=\).*\$QT_INSTALL_LIBS\\\\\"\\\";\1 $x11_libdir\";" \
   137         configure
   138     #   yes this is needed several times to catch nested occurences of '--cflags'
   139     %{l_shtool} subst \
   140         -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \
   141         -e 's;\(QT_CFLAGS_[^=][^=]*=.*PKG_CONFIG.*\) --cflags ;\1 --cflags-only-other ;g' \
   142         configure
   143     %{l_shtool} subst \
   144         -e 's;\(TRY_INCLUDEPATHS = \).*\(\$\$INCLUDEPATH\);\1\2;' \
   145         -e 's;/freetype2;/freetype;' \
   146         config.tests/unix/freetype/freetype.pri
   147     %{l_shtool} subst \
   148         -e "s;\(LIBS.*=.*-lmng\);\1 $lcmslibs;" \
   149         src/gui/image/qmnghandler.pri
   150     %{l_shtool} subst \
   151         -e "s;^\(LIBS += \)-lfreetype -lfontconfig;\1$fontconflibs;" \
   152         config.tests/x11/fontconfig/fontconfig.pro
   153     echo 'INCLUDEPATH += /usr/include/wacomcfg' \
   154         >>src/gui/kernel/x11.pri
   155     echo "contains(QT_CONFIG, fontconfig) { LIBS += $fontconflibs }" \
   156         >>src/gui/kernel/x11.pri
   157     echo "contains(QT_CONFIG, fontconfig) { LIBS += $fontconflibs }" \
   158         >>src/gui/text/text.pri
   159     echo "INCLUDEPATH = `%{l_prefix}/bin/pkg-config --cflags-only-I dbus-1 | %{l_shtool} subst -e 's;\-I;;g'`" \
   160         >>config.tests/unix/dbus/dbus.pro
   161     echo "LIBS = `%{l_prefix}/bin/pkg-config --libs-only-l --static dbus-1`" \
   162         >>config.tests/unix/dbus/dbus.pro
   163     %{l_shtool} subst \
   164         -e "s;\(LIBS.*= -lpq\);\1 `%{l_prefix}/bin/pg_config --libs` $loclibs;" \
   165         config.tests/unix/psql/psql.pro
   166     %{l_shtool} subst \
   167         -e 's;^mac[^:][^:]*:\(LIBS\);\1;' \
   168         config.tests/unix/iconv/iconv.pro
   169     uiclibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig lcms`
   170     %{l_shtool} subst \
   171         -e 's;LIBS .*= -lpq$;LIBS += -lpq -lssl -lcrypto;' \
   172         src/sql/drivers/drivers.pri
   173     %{l_shtool} subst \
   174         -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" \
   175         src/corelib/kernel/kernel.pri \
   176         src/gui/kernel/kernel.pri
   177     %{l_shtool} subst \
   178         -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_PSQL;INCPATH += `pg_config --includedir 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \
   179         -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_MYSQL;INCPATH += `mysql_config --include 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \
   180         -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" \
   181         -e 's;!static:\(!isEmpty(QT_LFLAGS_PSQL)\);\1;' \
   182         -e 's;!static:\(LIBS \*= \$\$QT_LFLAGS_PSQL\);\1;' \
   183         src/plugins/sqldrivers/mysql/mysql.pro \
   184         src/plugins/sqldrivers/psql/psql.pro \
   185         src/plugins/sqldrivers/sqlite/sqlite.pro \
   186         src/sql/drivers/drivers.pri
   187     %{l_shtool} subst \
   188         -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" \
   189         src/dbus/dbus.pro
   190     %{l_shtool} subst \
   191         -e 's;^\(QMAKE_INCDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/include;' \
   192         -e 's;^\(QMAKE_LIBDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/lib;' \
   193         -e "s;^\(QMAKE_INCDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/include \2;" \
   194         -e "s;^\(QMAKE_LIBDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/lib \2;" \
   195         -e 's;^\(QMAKE_LFLAGS_RELEASE.*\);\1 -s;' \
   196         mkspecs/qws/*/qmake.conf \
   197         mkspecs/*/*.conf
   198     %{l_shtool} subst \
   199         -e 's;^\(QMAKE_LIBS +=.*\);\1 -liconv;' \
   200         src/corelib/corelib.pro
   201     %{l_shtool} subst \
   202         -e "s;^\(QMAKE_INCDIR_X11[^=]*=\).*;\1 %{l_prefix}/include $x11_incdir;" \
   203         -e "s;^\(QMAKE_LIBDIR_X11[^=]*=\).*;\1 %{l_prefix}/lib $x11_libdir;" \
   204         mkspecs/qws/solaris*/qmake.conf \
   205         mkspecs/solaris*/qmake.conf
   206     %{l_shtool} subst \
   207         -e 's; *\.\./3rdparty/freetype/.*;;g' \
   208         -e 's;^\( *contains(QT_CONFIG, freetype) {\);\1 LIBS += -lfreetype;' \
   209         src/gui/text/text.pri
   210     %{l_shtool} subst \
   211         -e 's;\(#include  *"\)\(tiffio.h"\);\1tiff/\2;' \
   212         src/gui/image/qtiffhandler.cpp
   213     %{l_shtool} subst \
   214         -e 's;\(CONFIG[\t ]*+=[\t ]*qt\);\1 x11;' \
   215         tools/qtconfig/qtconfig.pro
   216 #    for projfile in `find examples/ -name '*.pro' -print`; do
   217 #        echo 'CONFIG += release' >>$projfile
   218 #    done
   220 %build
   221     #   protect against sloppy code inclusion of all unused subprojects
   222     (cd src/3rdparty && rm -rf [^cdehjmswxz]* sql* win* zlib zlib.pri) || exit $?
   224     #   detect which platform for which to build
   225     case "%{l_platform -t}" in
   226         sun4[uv]-sunos* | amd64-sunos*  ) platcomp="solaris-g++-64" ;;
   227         i?86-sunos*                     ) platcomp="solaris-g++"    ;;
   228         amd64-linux*                    ) platcomp="linux-g++-64"   ;;
   229         i?86-linux*                     ) platcomp="linux-g++"      ;;
   230         amd64-freebsd* | i?86-freebsd*  ) platcomp="freebsd-g++"    ;;
   231         *-aix*                          ) platcomp="aix-g++"        ;;
   232         *-darwin*                       ) platcomp="macx-g++"       ;;
   233         *-hpux*                         ) platcomp="hpux-g++"       ;;
   234         *-irix*                         ) platcomp="irix-g++"       ;;
   235         *                               ) echo "Platform '%{l_platform -t}' is not supported." 2>&1; exit 1 ;;
   236     esac
   238     #   detect which architecture extensions are available
   239     archflags=''
   240     case "%{l_platform -t}" in
   241         amd64-* )
   242             break
   243             ;;
   244         * )
   245             archflags='-no-sse2 -no-3dnow'
   246             ;;
   247     esac
   249 %if "%{with_shared}" == "yes"
   250     #   optional shared build (precedes mandatory static build)
   251     echo 'yes' | ./configure \
   252         $archflags \
   253         -opensource \
   254         -prefix %{l_prefix} \
   255         -bindir %{l_prefix}/bin \
   256         -libdir %{l_prefix}/lib/qt \
   257         -docdir %{l_prefix}/share/qt/doc \
   258         -headerdir %{l_prefix}/include \
   259         -plugindir %{l_prefix}/lib/qt/plugins \
   260         -datadir %{l_prefix}/share/qt \
   261         -translationdir %{l_prefix}/share/qt/translations \
   262         -sysconfdir %{l_prefix}/etc/qt \
   263         -examplesdir %{l_prefix}/share/qt/examples \
   264         -demosdir %{l_prefix}/share/qt/demos \
   265         -release \
   266         -shared \
   267         -platform $platcomp \
   268         -no-sql-ibase \
   269 %if "%{with_mysql}" == "yes"
   270         -qt-sql-mysql \
   271         -plugin-sql-mysql \
   272 %else
   273         -no-sql-mysql \
   274 %endif
   275 %if "%{with_pgsql}" == "yes"
   276         -qt-sql-psql \
   277         -plugin-sql-psql \
   278 %else
   279         -no-sql-psql \
   280 %endif
   281         -no-sql-odbc \
   282         -system-sqlite \
   283         -qt-sql-sqlite \
   284         -plugin-sql-sqlite \
   285         -no-sql-sqlite2 \
   286         -openssl-linked \
   287         -xmlpatterns \
   288         -svg \
   289         -webkit \
   290         -system-zlib \
   291         -qt-gif \
   292         -system-libpng \
   293         -system-libmng \
   294         -system-libjpeg \
   295         -system-libtiff \
   296         -rpath \
   297         -no-cups \
   298         -iconv \
   299         -pch \
   300         -dbus-linked \
   301         -opengl \
   302         -xrender \
   303         -fontconfig \
   304         -freetype \
   305         -no-glib
   307     #   default options are implicitly used, for example...
   308     #-no-fast -exceptions -accessibility -stl -qt3support -nis
   309     #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb
   311     #   carry out shared build procedure
   312     ( cd src
   313       %{l_make} %{l_mflags -O} \
   314           sub-moc sub-rcc sub-uic sub-uic3
   315     ) || exit $?
   316     %{l_make} %{l_mflags -O} \
   317         sub-corelib-make_default-ordered \
   318         sub-xml-make_default-ordered \
   319         sub-network-make_default-ordered \
   320         sub-sql-make_default-ordered \
   321         sub-testlib-make_default-ordered \
   322         sub-dbus-make_default-ordered \
   323         sub-gui-make_default-ordered \
   324         sub-qt3support-make_default-ordered \
   325         sub-opengl-make_default-ordered \
   326         sub-xmlpatterns-make_default-ordered \
   327         sub-multimedia-make_default-ordered \
   328         sub-svg-make_default-ordered \
   329         sub-script-make_default-ordered \
   330         sub-declarative-make_default-ordered \
   331         sub-javascriptcore-make_default-ordered \
   332         sub-webkit-make_default-ordered \
   333         sub-scripttools-make_default-ordered \
   334         sub-plugins-make_default-ordered \
   335         sub-imports-make_default-ordered \
   336         sub-webkitdeclarative-make_default-ordered \
   337         sub-translations-make_default-ordered
   339     #   arthur plugin requires libQtDesigner
   340     ( cd demos
   341       ( cd ../tools/designer/src/lib
   342         %{l_make} %{l_mflags -O} staticlib
   343       ) || exit $?
   344       %{l_make} %{l_mflags -O} sub-arthurplugin
   345       ( cd ../tools/designer/src/lib
   346         %{l_make} %{l_mflags -O} distclean
   347       ) || exit $?
   348     ) || exit $?
   350     #   cache shared libs and initialize the build configuration, which
   351     #   would otherwise still contain references to our shared libs build
   352     %{l_shtool} mkdir -f -p -m 755 dynamic
   353     mv lib/* dynamic/
   354     %{l_make} %{l_mflags} confclean
   355 %endif
   357     #   mandatory static build (follows optional shared build)
   358     echo 'yes' | ./configure \
   359         $archflags \
   360         -opensource \
   361         -prefix %{l_prefix} \
   362         -bindir %{l_prefix}/bin \
   363         -libdir %{l_prefix}/lib \
   364         -docdir %{l_prefix}/share/qt/doc \
   365         -headerdir %{l_prefix}/include \
   366         -plugindir %{l_prefix}/lib/qt/plugins \
   367         -datadir %{l_prefix}/share/qt \
   368         -translationdir %{l_prefix}/share/qt/translations \
   369         -sysconfdir %{l_prefix}/etc/qt \
   370         -examplesdir %{l_prefix}/share/qt/examples \
   371         -demosdir %{l_prefix}/share/qt/demos \
   372         -release \
   373         -static \
   374         -platform $platcomp \
   375         -no-sql-ibase \
   376 %if "%{with_mysql}" == "yes"
   377         -qt-sql-mysql \
   378 %else
   379         -no-sql-mysql \
   380 %endif
   381 %if "%{with_pgsql}" == "yes"
   382         -qt-sql-psql \
   383 %else
   384         -no-sql-psql \
   385 %endif
   386         -no-sql-odbc \
   387         -system-sqlite \
   388         -qt-sql-sqlite \
   389         -no-sql-sqlite2 \
   390         -openssl-linked \
   391         -xmlpatterns \
   392         -svg \
   393         -no-webkit \
   394         -system-zlib \
   395         -qt-gif \
   396         -system-libpng \
   397         -system-libmng \
   398         -system-libjpeg \
   399         -system-libtiff \
   400         -rpath \
   401         -no-cups \
   402         -iconv \
   403         -pch \
   404         -dbus-linked \
   405         -opengl \
   406         -xrender \
   407         -fontconfig \
   408         -freetype \
   409         -no-glib
   411     #   default options are implicitly used, for example...
   412     #-no-fast -exceptions -accessibility -stl -qt3support -nis
   413     #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb
   415     #   carry out static build procedure
   416     %{l_make} %{l_mflags -O} sub-src sub-translations
   417 %if "%{with_tools}" == "yes"
   418     %{l_make} %{l_mflags -O} sub-tools-make_default-ordered
   419 %endif
   420 %if "%{with_examples}" == "yes"
   421     %{l_make} %{l_mflags -O} \
   422         sub-demos-make_default-ordered \
   423         sub-examples-make_default-ordered
   424 %endif
   426 %install
   427     rm -rf $RPM_BUILD_ROOT
   429     #   carry out installation procedure
   430     targets="sub-tools-bootstrap-install_subtargets-ordered \
   431             sub-moc-install_subtargets-ordered \
   432             sub-rcc-install_subtargets-ordered \
   433             sub-uic-install_subtargets-ordered \
   434             sub-corelib-install_subtargets-ordered \
   435             sub-xml-install_subtargets-ordered \
   436             sub-network-install_subtargets-ordered \
   437             sub-sql-install_subtargets-ordered \
   438             sub-testlib-install_subtargets-ordered \
   439             sub-dbus-install_subtargets-ordered \
   440             sub-gui-install_subtargets-ordered \
   441             sub-qt3support-install_subtargets-ordered \
   442             sub-uic3-install_subtargets-ordered \
   443             sub-opengl-install_subtargets-ordered \
   444             sub-xmlpatterns-install_subtargets-ordered \
   445             sub-multimedia-install_subtargets-ordered \
   446             sub-svg-install_subtargets-ordered \
   447             sub-script-install_subtargets-ordered \
   448             sub-declarative-install_subtargets-ordered \
   449             sub-scripttools-install_subtargets-ordered \
   450             sub-plugins-install_subtargets-ordered \
   451             sub-imports-install_subtargets-ordered \
   452             sub-translations-install_subtargets-ordered"
   454 %if "%{with_tools}" == "yes"
   455     targets="$targets sub-tools-install_subtargets-ordered sub-tools-qdoc3-install_subtargets-ordered"
   456 %endif
   457 %if "%{with_examples}" == "yes"
   458     targets="$targets sub-demos-install_subtargets-ordered sub-examples-install_subtargets-ordered"
   459 %endif
   460     targets="$targets install_htmldocs install_qchdocs install_docimages install_qmake install_mkspecs"
   461     %{l_make} %{l_mflags} $targets INSTALL_ROOT="$RPM_BUILD_ROOT"
   463 %if "%{with_shared}" == "yes"
   464 #    #   install components only built against shared libs
   465 #    targets="$targets irgend-was-webkit_subtargets-ordered"
   467     #   install shared libs and symlinks
   468     %{l_shtool} mkdir -f -p -m 755 \
   469         $RPM_BUILD_ROOT%{l_prefix}/lib/qt
   470     %{l_tar} cf - dynamic | %{l_tar} xf - -C $RPM_BUILD_ROOT%{l_prefix}/lib/qt
   472     #   offer limited support of pkg-config(1) for shared libs
   473     #   substitution unfortunately only handles paths with no whitespace
   474     %{l_shtool} subst \
   475         -e "s;-L[^\t ][^\t ]*qt-everywhere-opensource-src-%{version};-L%{l_prefix};g" \
   476         $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/pkgconfig/*
   478     #   explain nonstandard shared library placement
   479     ( echo "This OpenPKG Qt build is using the with_shared option."
   480       echo ""
   481       echo "This directory contains optional shared libraries as"
   482       echo "defined by the OpenPKG build specification. Although"
   483       echo "shared libraries have been optionally built (see the"
   484       echo "build time 'with_shared yes' option), static libraries"
   485       echo "were built by default as usual, and installed in the"
   486       echo "standard library directory %{l_prefix}/lib."
   487       echo ""
   488       echo "To build applications using shared libraries instead,"
   489       echo "please direct pkg-config(1) to use the properdefinitions"
   490       echo "by setting the environment variable PKG_CONFIG_PATH to "
   491       echo "%{l_prefix}/lib/qt/dynamic/pkgconfig."
   492     ) >$RPM_BUILD_ROOT%{l_prefix}/lib/qt/README
   494     #   remove temporary dynamic link paths
   495     %{l_shtool} subst \
   496         -e "s;-L\([\t ]*\)[^\t ][^\t ]*qt-everywhere-opensource-src-%{version}\(/[^\t ][^\t ]*\);-L\1%{l_prefix}\2;g" \
   497         -e "s;\([\t ][\t ]*\)[^\t ][^\t ]*\(qt-everywhere-opensource-src-%{version}.*\);\1/tmp/\2;" \
   498         $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.prl \
   499         $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.la
   500 %endif
   502     #   determine internal file listing
   503     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   504         %{l_files_std} \
   505         '%doc %{l_prefix}/share/qt/doc/*/*' \
   506         '%not %dir %{l_prefix}/lib/pkgconfig'
   508 %files -f files
   510 %clean
   511     rm -rf $RPM_BUILD_ROOT

mercurial