qt/qt.spec

Sat, 09 Oct 2010 11:28:53 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 09 Oct 2010 11:28:53 +0200
changeset 258
85dc84aeb23f
parent 257
00697b799711
child 259
a6252f20c559
permissions
-rw-r--r--

Correct logic to build and install docs and translations.

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

mercurial