Fri, 16 Jan 2009 10:58:21 +0100
Correct and improve code logic, buildconf, and packaging. In particular:
1. Use descriptive variable names <var>libs instead of just <var>.
2. Although Nokia states in all Qt builds that 'NOTE: When linking
against OpenSSL, you can override the default library names
through OPENSSL_LIBS.' and even gives an example, their own
configuration logic rejects such an attempt. Correct this by
hard coding the OpenSSL library string in the configure script.
3. Consistently use the whitespace substitution [\t ] throughout.
4. Patch the buggy INCPATH of SQL plugin Qmake project files.
5. Add the 'x11' configuration variable to the qtconfig Qmake
project using the src/gui/gui.pro file as a model. This is
needed for qtconfig although not in other tools, because
the qtconfig buildconf indirectly includes qt_x11_p.h which
is dependent on X11 headers.
6. Avoid 'ld.so: fatal: hardware capability unsupported: SSE2 AMD_3DNow'
on platforms for which the config.tests/unix/[3dnow|sse2] succeed
although unsopported at run time by testing for the x86-64
instruction set at build time and regulating hardware capabilities.
7. Correctly install the desinger plugin by explicitly building it.
8. Remove custom plugin installation logic which is unnecessary.
9. Correct removal of temporary paths from shared object files.
michael@1 | 1 | ## |
michael@1 | 2 | ## qt.spec -- OpenPKG RPM Specification |
michael@29 | 3 | ## Copyright (c) 2009 Michael Schloh von Bennewitz <michael@schloh.com> |
michael@1 | 4 | ## |
michael@1 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@1 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@1 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@1 | 8 | ## copies. |
michael@1 | 9 | ## |
michael@1 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@1 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@1 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@1 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@1 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@1 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@1 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@1 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@1 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@1 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@1 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@1 | 21 | ## SUCH DAMAGE. |
michael@1 | 22 | ## |
michael@1 | 23 | |
michael@86 | 24 | # FIXME: MSvB: It appears that bugs in current versions of binutils |
michael@86 | 25 | # FIXME: MSvB: fail to properly link Qt object code, resulting in |
michael@86 | 26 | # FIXME: MSvB: 'ld: libQt*.so: pthread_mutex...: invalid version 6 |
michael@86 | 27 | # FIXME: MSvB: libQt*.so: could not read symbols: Bad value' |
michael@86 | 28 | # FIXME: MSvB: The effects of these bugs are platform dependent. |
michael@86 | 29 | # FIXME: MSvB: Solaris 11 IA-32 builds fail while Linux 2.6.25.18 |
michael@86 | 30 | # FIXME: MSvB: AMD64 builds succeed. |
michael@86 | 31 | # FIXME: MSvB: |
michael@86 | 32 | # FIXME: MSvB: The webkit is flawed in Qt 4.4.3, and has been disabled |
michael@86 | 33 | # FIXME: MSvB: in this build until a new release corrects the problem. |
michael@1 | 34 | |
michael@1 | 35 | # package information |
michael@1 | 36 | Name: qt |
michael@1 | 37 | Summary: Cross-platform Application Framework |
michael@1 | 38 | URL: http://www.trolltech.com/products/qt/ |
michael@1 | 39 | Vendor: Nokia Corporation |
michael@1 | 40 | Packager: Michael Schloh von Bennewitz |
michael@1 | 41 | Distribution: MSvB Recherche Production |
michael@1 | 42 | Class: EVAL |
michael@1 | 43 | Group: Development |
michael@1 | 44 | License: GPL |
michael@1 | 45 | Version: 4.4.3 |
michael@65 | 46 | Release: 20090106 |
michael@1 | 47 | |
michael@1 | 48 | # build options |
michael@1 | 49 | %option with_tools yes |
michael@65 | 50 | %option with_mysql no |
michael@65 | 51 | %option with_pgsql no |
michael@1 | 52 | %option with_shared no |
michael@1 | 53 | %option with_examples no |
michael@1 | 54 | |
michael@1 | 55 | # list of sources |
michael@1 | 56 | Source0: ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-%{version}.tar.gz |
michael@1 | 57 | |
michael@1 | 58 | # build information |
michael@1 | 59 | Prefix: %{l_prefix} |
michael@1 | 60 | BuildRoot: %{l_buildroot} |
michael@4 | 61 | BuildPreReq: OpenPKG, openpkg >= 20050726, make, gcc, pkgconfig |
michael@1 | 62 | PreReq: OpenPKG, openpkg >= 20050726 |
michael@1 | 63 | BuildPreReq: X11, png, mng, jpeg, tiff, mesa, xrender |
michael@1 | 64 | PreReq: X11, png, mng, jpeg, tiff, mesa, xrender |
michael@3 | 65 | BuildPreReq: openssl, zlib, libiconv, sqlite, dbus |
michael@3 | 66 | PreReq: openssl, zlib, libiconv, sqlite, dbus |
michael@1 | 67 | BuildPreReq: fontconfig, freetype |
michael@1 | 68 | PreReq: fontconfig, freetype |
michael@65 | 69 | %if "%{with_mysql}" == "yes" |
michael@65 | 70 | BuildPreReq: mysql |
michael@65 | 71 | PreReq: mysql |
michael@65 | 72 | %endif |
michael@65 | 73 | %if "%{with_pgsql}" == "yes" |
michael@65 | 74 | BuildPreReq: postgresql |
michael@65 | 75 | PreReq: postgresql |
michael@65 | 76 | %endif |
michael@1 | 77 | AutoReq: no |
michael@1 | 78 | AutoReqProv: no |
michael@1 | 79 | Provides: QTSDK |
michael@1 | 80 | |
michael@1 | 81 | %description |
michael@3 | 82 | Qt is a comprehensive C++ framework for cross-platform application |
michael@3 | 83 | development. Using Qt, you can develop applications and user |
michael@3 | 84 | interfaces once, and deploy them across many desktop and embedded |
michael@86 | 85 | operating systems without rewriting the source code. This package |
michael@86 | 86 | distribution builds all modules of the Qt/X11 Open Source Edition. |
michael@1 | 87 | |
michael@1 | 88 | %track |
michael@1 | 89 | prog qt = { |
michael@1 | 90 | version = %{version} |
michael@1 | 91 | url = ftp://ftp.trolltech.com/qt/source/ |
michael@1 | 92 | regex = qt-x11-opensource-src-(__VER__)\.tar\.gz |
michael@1 | 93 | } |
michael@1 | 94 | |
michael@1 | 95 | %prep |
michael@1 | 96 | # announce exceptional build requirements |
michael@1 | 97 | ( echo "This package has exceptional storage requirements:" |
michael@1 | 98 | echo " qt-%{version}-root (2,5 Go)" |
michael@1 | 99 | echo " qt-x11-opensource-src-%{version} (4,5 Go)" |
michael@1 | 100 | echo " qt-%{version}-<date>.<arch>-<os>-<tag>.rpm (1 Go)" |
michael@1 | 101 | echo "Building with no options takes 0,5 hours on a dual core" |
michael@3 | 102 | echo "2 GHz CPU, or 2 hours with all build options enabled." |
michael@1 | 103 | ) | %{l_rpmtool} msg -b -t notice |
michael@1 | 104 | |
michael@1 | 105 | %setup -q -n qt-x11-opensource-src-%{version} |
michael@1 | 106 | x11_incdir=`%{l_rc} --query x11_incdir` |
michael@1 | 107 | x11_libdir=`%{l_rc} --query x11_libdir` |
michael@92 | 108 | fontconflibs=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig` |
michael@92 | 109 | openssllibs=`%{l_prefix}/bin/pkg-config --libs --static openssl` |
michael@92 | 110 | |
michael@1 | 111 | loclibs='' |
michael@1 | 112 | case "%{l_platform -t}" in |
michael@1 | 113 | *-sunos* ) |
michael@1 | 114 | loclibs='-lsocket -lnsl' |
michael@1 | 115 | ;; |
michael@1 | 116 | esac |
michael@1 | 117 | ( cd mkspecs/qws |
michael@1 | 118 | for plat in freebsd-generic-g++ macx-generic-g++ solaris-generic-g++; |
michael@1 | 119 | do |
michael@1 | 120 | ln -s $plat `echo $plat | %{l_shtool} subst -e 's;\(.*\)-generic-\(.*\);\1-x86-\2;'` |
michael@1 | 121 | done |
michael@1 | 122 | ) || exit $? |
michael@1 | 123 | %{l_shtool} subst \ |
michael@92 | 124 | -e 's;\(-z[\t ][\t ]*\)\([^\t \"][^\t \"]*\);\1"\2";g' \ |
michael@1 | 125 | configure |
michael@1 | 126 | %{l_shtool} subst \ |
michael@92 | 127 | -e "s;\(QMAKE_LIBS_X11.*\)-lfreetype -lfontconfig;\1$fontconflibs;" \ |
michael@92 | 128 | configure |
michael@92 | 129 | %{l_shtool} subst \ |
michael@92 | 130 | -e "s;\(OPENSSL_LIBS *=\) *-lssl -lcrypto;\1 $openssllibs;" \ |
michael@1 | 131 | configure |
michael@1 | 132 | %{l_shtool} subst \ |
michael@1 | 133 | -e 's;-silent|;-rpath|-silent|;' \ |
michael@1 | 134 | -e 's;\(RPATH_FLAGS="\)\\"\$QT_INSTALL_LIBS\\" \($RPATH_FLAGS"\);\1\2;' \ |
michael@1 | 135 | -e "s;\(echo.*QMAKE_RPATHDIR +=\).*\$QT_INSTALL_LIBS\\\\\"\\\";\1 $x11_libdir\";" \ |
michael@1 | 136 | configure |
michael@1 | 137 | %{l_shtool} subst \ |
michael@1 | 138 | -e 's;\(TRY_INCLUDEPATHS = \).*\(\$\$INCLUDEPATH\);\1\2;' \ |
michael@1 | 139 | -e 's;/freetype2;/freetype;' \ |
michael@1 | 140 | config.tests/unix/freetype/freetype.pri |
michael@1 | 141 | %{l_shtool} subst \ |
michael@92 | 142 | -e "s;^\(LIBS += \)-lfreetype -lfontconfig;\1$fontconflibs;" \ |
michael@1 | 143 | config.tests/x11/fontconfig/fontconfig.pro |
michael@1 | 144 | %{l_shtool} subst \ |
michael@1 | 145 | -e "s;\(LIBS += -lpq\);\1 -lssl -lcrypto $loclibs;" \ |
michael@1 | 146 | config.tests/unix/psql/psql.pro |
michael@1 | 147 | %{l_shtool} subst \ |
michael@1 | 148 | -e 's;^mac:\(LIBS\);\1;' \ |
michael@1 | 149 | config.tests/unix/iconv/iconv.pro |
michael@1 | 150 | %{l_shtool} subst \ |
michael@65 | 151 | -e 's;LIBS .*= -lpq$;LIBS += -lpq -lssl -lcrypto;' \ |
michael@65 | 152 | src/sql/drivers/drivers.pri |
michael@65 | 153 | %{l_shtool} subst \ |
michael@86 | 154 | -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" \ |
michael@86 | 155 | src/corelib/kernel/kernel.pri \ |
michael@86 | 156 | src/gui/kernel/kernel.pri |
michael@86 | 157 | %{l_shtool} subst \ |
michael@86 | 158 | -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_PSQL;INCPATH += `pg_config --includedir 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \ |
michael@86 | 159 | -e "s;QMAKE_CXXFLAGS \*= \$\$QT_CFLAGS_MYSQL;INCPATH += `mysql_config --include 2>/dev/null | %{l_shtool} subst -e 's;-I;;g'`;g" \ |
michael@86 | 160 | -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" \ |
michael@92 | 161 | src/plugins/sqldrivers/mysql/mysql.pro \ |
michael@92 | 162 | src/plugins/sqldrivers/psql/psql.pro \ |
michael@92 | 163 | src/plugins/sqldrivers/sqlite/sqlite.pro \ |
michael@86 | 164 | src/sql/drivers/drivers.pri |
michael@86 | 165 | %{l_shtool} subst \ |
michael@86 | 166 | -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" \ |
michael@86 | 167 | src/dbus/dbus.pro |
michael@86 | 168 | %{l_shtool} subst \ |
michael@1 | 169 | -e 's;^\(QMAKE_INCDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/include;' \ |
michael@1 | 170 | -e 's;^\(QMAKE_LIBDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/lib;' \ |
michael@1 | 171 | -e "s;^\(QMAKE_INCDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/include \2;" \ |
michael@86 | 172 | -e "s;^\(QMAKE_LIBDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/lib \2;" \ |
michael@1 | 173 | -e 's;^\(QMAKE_LFLAGS_RELEASE.*\);\1 -s;' \ |
michael@1 | 174 | mkspecs/qws/*/qmake.conf \ |
michael@1 | 175 | mkspecs/*/*.conf |
michael@1 | 176 | %{l_shtool} subst \ |
michael@3 | 177 | -e 's;^\(QMAKE_LIBS +=.*\);\1 -liconv;' \ |
michael@3 | 178 | src/corelib/corelib.pro |
michael@3 | 179 | %{l_shtool} subst \ |
michael@86 | 180 | -e "s;^\(QMAKE_INCDIR_X11[^=]*=\).*;\1 %{l_prefix}/include $x11_incdir;" \ |
michael@86 | 181 | -e "s;^\(QMAKE_LIBDIR_X11[^=]*=\).*;\1 %{l_prefix}/lib $x11_libdir;" \ |
michael@1 | 182 | mkspecs/qws/solaris*/qmake.conf \ |
michael@1 | 183 | mkspecs/solaris*/qmake.conf |
michael@1 | 184 | %{l_shtool} subst \ |
michael@1 | 185 | -e 's; *\.\./3rdparty/freetype/.*;;g' \ |
michael@1 | 186 | -e 's;^\( *contains(QT_CONFIG, freetype) {\);\1 LIBS += -lfreetype;' \ |
michael@1 | 187 | src/gui/text/text.pri |
michael@1 | 188 | %{l_shtool} subst \ |
michael@1 | 189 | -e 's;\(#include *"\)\(tiffio.h"\);\1tiff/\2;' \ |
michael@1 | 190 | src/plugins/imageformats/tiff/qtiffhandler.cpp |
michael@92 | 191 | %{l_shtool} subst \ |
michael@92 | 192 | -e 's;\(CONFIG[\t ]*+=[\t ]*qt\);\1 x11;' \ |
michael@92 | 193 | tools/qtconfig/qtconfig.pro |
michael@1 | 194 | # for projfile in `find examples/ -name '*.pro' -print`; do |
michael@1 | 195 | # echo 'CONFIG += release' >>$projfile |
michael@1 | 196 | # done |
michael@1 | 197 | |
michael@1 | 198 | %build |
michael@1 | 199 | # protect against sloppy code inclusion of all unused subprojects |
michael@1 | 200 | rm -rf src/3rdparty/[^cdhmsw]* src/3rdparty/sql* src/3rdparty/win* |
michael@1 | 201 | |
michael@92 | 202 | # detect which platform for which to build |
michael@1 | 203 | case "%{l_platform -t}" in |
michael@86 | 204 | sun4[uv]-sunos* | amd64-sunos* ) platcomp="solaris-g++-64" ;; |
michael@86 | 205 | i?86-sunos* ) platcomp="solaris-g++" ;; |
michael@86 | 206 | amd64-linux* ) platcomp="linux-g++-64" ;; |
michael@86 | 207 | i?86-linux* ) platcomp="linux-g++" ;; |
michael@86 | 208 | amd64-freebsd* | i?86-freebsd* ) platcomp="freebsd-g++" ;; |
michael@86 | 209 | *-aix* ) platcomp="aix-g++" ;; |
michael@86 | 210 | *-darwin* ) platcomp="macx-g++" ;; |
michael@86 | 211 | *-hpux* ) platcomp="hpux-g++" ;; |
michael@86 | 212 | *-irix* ) platcomp="irix-g++" ;; |
michael@86 | 213 | * ) echo "Platform '%{l_platform -t}' is not supported." 2>&1; exit 1 ;; |
michael@1 | 214 | esac |
michael@1 | 215 | |
michael@92 | 216 | # detect which architecture extensions are available |
michael@92 | 217 | archflags='' |
michael@92 | 218 | case "%{l_platform -t}" in |
michael@92 | 219 | amd64-* ) |
michael@92 | 220 | break |
michael@92 | 221 | ;; |
michael@92 | 222 | * ) |
michael@92 | 223 | archflags='-no-sse2 -no-3dnow' |
michael@92 | 224 | ;; |
michael@92 | 225 | esac |
michael@92 | 226 | |
michael@1 | 227 | %if "%{with_shared}" == "yes" |
michael@1 | 228 | # optional shared build (precedes mandatory static build) |
michael@1 | 229 | echo 'yes' | ./configure \ |
michael@92 | 230 | $archflags \ |
michael@1 | 231 | -prefix %{l_prefix} \ |
michael@1 | 232 | -bindir %{l_prefix}/bin \ |
michael@1 | 233 | -libdir %{l_prefix}/lib/qt \ |
michael@1 | 234 | -docdir %{l_prefix}/share/qt/doc \ |
michael@1 | 235 | -headerdir %{l_prefix}/include \ |
michael@86 | 236 | -plugindir %{l_prefix}/lib/qt/plugins \ |
michael@1 | 237 | -datadir %{l_prefix}/share/qt \ |
michael@1 | 238 | -translationdir %{l_prefix}/share/qt/translations \ |
michael@1 | 239 | -sysconfdir %{l_prefix}/etc/qt \ |
michael@1 | 240 | -examplesdir %{l_prefix}/share/qt/examples \ |
michael@1 | 241 | -demosdir %{l_prefix}/share/qt/demos \ |
michael@1 | 242 | -release \ |
michael@1 | 243 | -shared \ |
michael@1 | 244 | -platform $platcomp \ |
michael@1 | 245 | -no-sql-ibase \ |
michael@65 | 246 | %if "%{with_mysql}" == "yes" |
michael@3 | 247 | -qt-sql-mysql \ |
michael@86 | 248 | -plugin-sql-mysql \ |
michael@65 | 249 | %else |
michael@65 | 250 | -no-sql-mysql \ |
michael@65 | 251 | %endif |
michael@65 | 252 | %if "%{with_pgsql}" == "yes" |
michael@65 | 253 | -qt-sql-psql \ |
michael@86 | 254 | -plugin-sql-psql \ |
michael@65 | 255 | %else |
michael@65 | 256 | -no-sql-psql \ |
michael@65 | 257 | %endif |
michael@1 | 258 | -no-sql-odbc \ |
michael@65 | 259 | -system-sqlite \ |
michael@65 | 260 | -qt-sql-sqlite \ |
michael@86 | 261 | -plugin-sql-sqlite \ |
michael@1 | 262 | -no-sql-sqlite2 \ |
michael@3 | 263 | -openssl-linked \ |
michael@1 | 264 | -xmlpatterns \ |
michael@1 | 265 | -svg \ |
michael@1 | 266 | -no-webkit \ |
michael@1 | 267 | -system-zlib \ |
michael@1 | 268 | -qt-gif \ |
michael@1 | 269 | -system-libpng \ |
michael@1 | 270 | -system-libmng \ |
michael@1 | 271 | -system-libjpeg \ |
michael@1 | 272 | -system-libtiff \ |
michael@1 | 273 | -rpath \ |
michael@1 | 274 | -no-cups \ |
michael@1 | 275 | -iconv \ |
michael@1 | 276 | -pch \ |
michael@1 | 277 | -dbus-linked \ |
michael@1 | 278 | -opengl \ |
michael@1 | 279 | -xrender \ |
michael@1 | 280 | -fontconfig \ |
michael@1 | 281 | -freetype \ |
michael@3 | 282 | -no-glib |
michael@1 | 283 | |
michael@86 | 284 | # default options are implicitly used, for example... |
michael@1 | 285 | #-no-fast -exceptions -accessibility -stl -qt3support -nis |
michael@1 | 286 | #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb |
michael@1 | 287 | |
michael@1 | 288 | # carry out shared build procedure |
michael@1 | 289 | ( cd src |
michael@1 | 290 | %{l_make} %{l_mflags -O} \ |
michael@1 | 291 | sub-moc sub-rcc sub-uic |
michael@1 | 292 | %{l_make} %{l_mflags -O} \ |
michael@1 | 293 | sub-corelib sub-xml sub-network sub-gui sub-sql \ |
michael@1 | 294 | sub-script sub-testlib sub-qt3support sub-dbus \ |
michael@1 | 295 | sub-opengl sub-xmlpatterns sub-svg sub-plugins |
michael@1 | 296 | ) || exit $? |
michael@92 | 297 | ( cd demos |
michael@92 | 298 | %{l_make} %{l_mflags -O} sub-arthurplugin |
michael@92 | 299 | ) || exit $? |
michael@1 | 300 | |
michael@1 | 301 | # cache shared libs and initialize the build configuration, which |
michael@1 | 302 | # would otherwise still contain references to our shared libs build |
michael@1 | 303 | %{l_shtool} mkdir -f -p -m 755 dynamic |
michael@1 | 304 | mv lib/* dynamic/ |
michael@1 | 305 | ( cd qmake |
michael@1 | 306 | %{l_make} %{l_mflags} distclean |
michael@1 | 307 | ) || exit $? |
michael@1 | 308 | rm -f .qmake.cache |
michael@1 | 309 | %endif |
michael@1 | 310 | |
michael@1 | 311 | # mandatory static build (follows optional shared build) |
michael@1 | 312 | echo 'yes' | ./configure \ |
michael@92 | 313 | $archflags \ |
michael@1 | 314 | -prefix %{l_prefix} \ |
michael@1 | 315 | -bindir %{l_prefix}/bin \ |
michael@1 | 316 | -libdir %{l_prefix}/lib \ |
michael@1 | 317 | -docdir %{l_prefix}/share/qt/doc \ |
michael@1 | 318 | -headerdir %{l_prefix}/include \ |
michael@86 | 319 | -plugindir %{l_prefix}/lib/qt/plugins \ |
michael@1 | 320 | -datadir %{l_prefix}/share/qt \ |
michael@1 | 321 | -translationdir %{l_prefix}/share/qt/translations \ |
michael@1 | 322 | -sysconfdir %{l_prefix}/etc/qt \ |
michael@1 | 323 | -examplesdir %{l_prefix}/share/qt/examples \ |
michael@1 | 324 | -demosdir %{l_prefix}/share/qt/demos \ |
michael@1 | 325 | -release \ |
michael@1 | 326 | -static \ |
michael@1 | 327 | -platform $platcomp \ |
michael@1 | 328 | -no-sql-ibase \ |
michael@65 | 329 | %if "%{with_mysql}" == "yes" |
michael@3 | 330 | -qt-sql-mysql \ |
michael@65 | 331 | %else |
michael@65 | 332 | -no-sql-mysql \ |
michael@65 | 333 | %endif |
michael@65 | 334 | %if "%{with_pgsql}" == "yes" |
michael@65 | 335 | -qt-sql-psql \ |
michael@65 | 336 | %else |
michael@65 | 337 | -no-sql-psql \ |
michael@65 | 338 | %endif |
michael@1 | 339 | -no-sql-odbc \ |
michael@65 | 340 | -system-sqlite \ |
michael@65 | 341 | -qt-sql-sqlite \ |
michael@1 | 342 | -no-sql-sqlite2 \ |
michael@3 | 343 | -openssl-linked \ |
michael@1 | 344 | -xmlpatterns \ |
michael@1 | 345 | -svg \ |
michael@1 | 346 | -no-webkit \ |
michael@1 | 347 | -system-zlib \ |
michael@1 | 348 | -qt-gif \ |
michael@1 | 349 | -system-libpng \ |
michael@1 | 350 | -system-libmng \ |
michael@1 | 351 | -system-libjpeg \ |
michael@1 | 352 | -system-libtiff \ |
michael@1 | 353 | -rpath \ |
michael@1 | 354 | -no-cups \ |
michael@1 | 355 | -iconv \ |
michael@1 | 356 | -pch \ |
michael@1 | 357 | -dbus-linked \ |
michael@1 | 358 | -opengl \ |
michael@1 | 359 | -xrender \ |
michael@1 | 360 | -fontconfig \ |
michael@1 | 361 | -freetype \ |
michael@3 | 362 | -no-glib |
michael@1 | 363 | |
michael@86 | 364 | # default options are implicitly used, for example... |
michael@1 | 365 | #-no-fast -exceptions -accessibility -stl -qt3support -nis |
michael@1 | 366 | #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb |
michael@1 | 367 | |
michael@1 | 368 | # carry out static build procedure |
michael@1 | 369 | %{l_make} %{l_mflags -O} sub-src |
michael@1 | 370 | %if "%{with_tools}" == "yes" |
michael@1 | 371 | %{l_make} %{l_mflags -O} sub-tools |
michael@1 | 372 | %endif |
michael@1 | 373 | %if "%{with_examples}" == "yes" |
michael@1 | 374 | %{l_make} %{l_mflags -O} \ |
michael@1 | 375 | sub-demos-make_default-ordered \ |
michael@1 | 376 | sub-examples-make_default-ordered |
michael@1 | 377 | %endif |
michael@1 | 378 | |
michael@1 | 379 | %install |
michael@1 | 380 | rm -rf $RPM_BUILD_ROOT |
michael@1 | 381 | |
michael@1 | 382 | # carry out installation procedure |
michael@1 | 383 | targets="sub-moc-install_subtargets-ordered \ |
michael@1 | 384 | sub-rcc-install_subtargets-ordered \ |
michael@1 | 385 | sub-uic-install_subtargets-ordered \ |
michael@1 | 386 | sub-corelib-install_subtargets-ordered \ |
michael@1 | 387 | sub-xml-install_subtargets-ordered \ |
michael@1 | 388 | sub-network-install_subtargets-ordered \ |
michael@1 | 389 | sub-gui-install_subtargets-ordered \ |
michael@1 | 390 | sub-sql-install_subtargets-ordered \ |
michael@1 | 391 | sub-script-install_subtargets-ordered \ |
michael@1 | 392 | sub-testlib-install_subtargets-ordered \ |
michael@1 | 393 | sub-qt3support-install_subtargets-ordered \ |
michael@1 | 394 | sub-dbus-install_subtargets-ordered \ |
michael@1 | 395 | sub-uic3-install_subtargets-ordered \ |
michael@1 | 396 | sub-opengl-install_subtargets-ordered \ |
michael@1 | 397 | sub-xmlpatterns-install_subtargets-ordered \ |
michael@1 | 398 | sub-svg-install_subtargets-ordered \ |
michael@1 | 399 | sub-plugins-install_subtargets-ordered" |
michael@1 | 400 | %if "%{with_tools}" == "yes" |
michael@1 | 401 | targets="$targets sub-tools-install_subtargets-ordered" |
michael@1 | 402 | %endif |
michael@1 | 403 | %if "%{with_examples}" == "yes" |
michael@1 | 404 | targets="$targets sub-demos-install_subtargets-ordered sub-examples-install_subtargets-ordered" |
michael@1 | 405 | %endif |
michael@3 | 406 | targets="$targets install_htmldocs install_qchdocs install_docimages install_translations install_qmake install_mkspecs" |
michael@1 | 407 | %{l_make} %{l_mflags} $targets INSTALL_ROOT="$RPM_BUILD_ROOT" |
michael@1 | 408 | |
michael@1 | 409 | %if "%{with_shared}" == "yes" |
michael@1 | 410 | # install shared libs and symlinks |
michael@1 | 411 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@1 | 412 | $RPM_BUILD_ROOT%{l_prefix}/lib/qt |
michael@1 | 413 | %{l_tar} cf - dynamic | %{l_tar} xf - -C $RPM_BUILD_ROOT%{l_prefix}/lib/qt |
michael@1 | 414 | |
michael@86 | 415 | # offer limited support of pkg-config(1) for shared libs |
michael@87 | 416 | # substitution unfortunately only handles paths with no whitespace |
michael@86 | 417 | %{l_shtool} subst \ |
michael@92 | 418 | -e "s;[^\t ][^\t ]*qt-x11-opensource-src-%{version};%{l_prefix};g" \ |
michael@87 | 419 | $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/pkgconfig/* |
michael@86 | 420 | |
michael@1 | 421 | # explain nonstandard shared library placement |
michael@86 | 422 | ( echo "This OpenPKG Qt build is using the with_shared option." |
michael@86 | 423 | echo "" |
michael@86 | 424 | echo "This directory contains optional shared libraries as" |
michael@1 | 425 | echo "defined by the OpenPKG build specification. Although" |
michael@86 | 426 | echo "shared libraries have been optionally built (see the" |
michael@1 | 427 | echo "build time 'with_shared yes' option), static libraries" |
michael@86 | 428 | echo "were built by default as usual, and installed in the" |
michael@86 | 429 | echo "standard library directory %{l_prefix}/lib." |
michael@86 | 430 | echo "" |
michael@86 | 431 | echo "To build applications using shared libraries instead," |
michael@86 | 432 | echo "please direct pkg-config(1) to use the properdefinitions" |
michael@86 | 433 | echo "by setting the environment variable PKG_CONFIG_PATH to " |
michael@86 | 434 | echo "%{l_prefix}/lib/qt/dynamic/pkgconfig." |
michael@1 | 435 | ) >$RPM_BUILD_ROOT%{l_prefix}/lib/qt/README |
michael@1 | 436 | |
michael@1 | 437 | # remove temporary dynamic link paths |
michael@1 | 438 | %{l_shtool} subst \ |
michael@92 | 439 | -e "s;-L\([\t ]*\)[^\t ][^\t ]*qt-x11-opensource-src-%{version}\(/[^\t ][^\t ]*\);-L\1%{l_prefix}\2;g" \ |
michael@92 | 440 | -e "s;\([\t ][\t ]*\)[^\t ][^\t ]*\(qt-x11-opensource-src-%{version}.*\);\1/tmp/\2;" \ |
michael@92 | 441 | $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.prl \ |
michael@92 | 442 | $RPM_BUILD_ROOT%{l_prefix}/lib/qt/dynamic/*.la |
michael@1 | 443 | %endif |
michael@1 | 444 | |
michael@1 | 445 | # determine internal file listing |
michael@1 | 446 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
michael@1 | 447 | %{l_files_std} \ |
michael@86 | 448 | '%doc %{l_prefix}/share/qt/doc/*/*' \ |
michael@1 | 449 | '%not %dir %{l_prefix}/lib/pkgconfig' |
michael@1 | 450 | |
michael@1 | 451 | %files -f files |
michael@1 | 452 | |
michael@1 | 453 | %clean |
michael@1 | 454 | rm -rf $RPM_BUILD_ROOT |
michael@1 | 455 |