Sat, 10 Jan 2009 08:57:33 +0100
Correct PostgreSQL build logic and make MySQL and PostgreSQL optional.
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@1 | 24 | |
michael@1 | 25 | # package information |
michael@1 | 26 | Name: qt |
michael@1 | 27 | Summary: Cross-platform Application Framework |
michael@1 | 28 | URL: http://www.trolltech.com/products/qt/ |
michael@1 | 29 | Vendor: Nokia Corporation |
michael@1 | 30 | Packager: Michael Schloh von Bennewitz |
michael@1 | 31 | Distribution: MSvB Recherche Production |
michael@1 | 32 | Class: EVAL |
michael@1 | 33 | Group: Development |
michael@1 | 34 | License: GPL |
michael@1 | 35 | Version: 4.4.3 |
michael@65 | 36 | Release: 20090106 |
michael@1 | 37 | |
michael@1 | 38 | # build options |
michael@1 | 39 | %option with_tools yes |
michael@65 | 40 | %option with_mysql no |
michael@65 | 41 | %option with_pgsql no |
michael@1 | 42 | %option with_shared no |
michael@1 | 43 | %option with_examples no |
michael@1 | 44 | |
michael@1 | 45 | # list of sources |
michael@1 | 46 | Source0: ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-%{version}.tar.gz |
michael@1 | 47 | |
michael@1 | 48 | # build information |
michael@1 | 49 | Prefix: %{l_prefix} |
michael@1 | 50 | BuildRoot: %{l_buildroot} |
michael@4 | 51 | BuildPreReq: OpenPKG, openpkg >= 20050726, make, gcc, pkgconfig |
michael@1 | 52 | PreReq: OpenPKG, openpkg >= 20050726 |
michael@1 | 53 | BuildPreReq: X11, png, mng, jpeg, tiff, mesa, xrender |
michael@1 | 54 | PreReq: X11, png, mng, jpeg, tiff, mesa, xrender |
michael@3 | 55 | BuildPreReq: openssl, zlib, libiconv, sqlite, dbus |
michael@3 | 56 | PreReq: openssl, zlib, libiconv, sqlite, dbus |
michael@1 | 57 | BuildPreReq: fontconfig, freetype |
michael@1 | 58 | PreReq: fontconfig, freetype |
michael@65 | 59 | %if "%{with_mysql}" == "yes" |
michael@65 | 60 | BuildPreReq: mysql |
michael@65 | 61 | PreReq: mysql |
michael@65 | 62 | %endif |
michael@65 | 63 | %if "%{with_pgsql}" == "yes" |
michael@65 | 64 | BuildPreReq: postgresql |
michael@65 | 65 | PreReq: postgresql |
michael@65 | 66 | %endif |
michael@1 | 67 | AutoReq: no |
michael@1 | 68 | AutoReqProv: no |
michael@1 | 69 | Provides: QTSDK |
michael@1 | 70 | |
michael@1 | 71 | %description |
michael@3 | 72 | Qt is a comprehensive C++ framework for cross-platform application |
michael@3 | 73 | development. Using Qt, you can develop applications and user |
michael@3 | 74 | interfaces once, and deploy them across many desktop and embedded |
michael@3 | 75 | operating systems without rewriting the source code. |
michael@1 | 76 | |
michael@1 | 77 | %track |
michael@1 | 78 | prog qt = { |
michael@1 | 79 | version = %{version} |
michael@1 | 80 | url = ftp://ftp.trolltech.com/qt/source/ |
michael@1 | 81 | regex = qt-x11-opensource-src-(__VER__)\.tar\.gz |
michael@1 | 82 | } |
michael@1 | 83 | |
michael@1 | 84 | %prep |
michael@1 | 85 | # announce exceptional build requirements |
michael@1 | 86 | ( echo "This package has exceptional storage requirements:" |
michael@1 | 87 | echo " qt-%{version}-root (2,5 Go)" |
michael@1 | 88 | echo " qt-x11-opensource-src-%{version} (4,5 Go)" |
michael@1 | 89 | echo " qt-%{version}-<date>.<arch>-<os>-<tag>.rpm (1 Go)" |
michael@1 | 90 | echo "Building with no options takes 0,5 hours on a dual core" |
michael@3 | 91 | echo "2 GHz CPU, or 2 hours with all build options enabled." |
michael@1 | 92 | ) | %{l_rpmtool} msg -b -t notice |
michael@1 | 93 | |
michael@1 | 94 | %setup -q -n qt-x11-opensource-src-%{version} |
michael@1 | 95 | x11_incdir=`%{l_rc} --query x11_incdir` |
michael@1 | 96 | x11_libdir=`%{l_rc} --query x11_libdir` |
michael@1 | 97 | fontconf=`%{l_prefix}/bin/pkg-config --libs-only-l --static fontconfig` |
michael@1 | 98 | loclibs='' |
michael@1 | 99 | x11_supdir='' |
michael@1 | 100 | case "%{l_platform -t}" in |
michael@1 | 101 | *-sunos* ) |
michael@1 | 102 | loclibs='-lsocket -lnsl' |
michael@1 | 103 | [ -d /usr/X/sfw/lib ] && x11_supdir=/usr/X/sfw/lib |
michael@1 | 104 | ;; |
michael@1 | 105 | esac |
michael@1 | 106 | ( cd mkspecs/qws |
michael@1 | 107 | for plat in freebsd-generic-g++ macx-generic-g++ solaris-generic-g++; |
michael@1 | 108 | do |
michael@1 | 109 | ln -s $plat `echo $plat | %{l_shtool} subst -e 's;\(.*\)-generic-\(.*\);\1-x86-\2;'` |
michael@1 | 110 | done |
michael@1 | 111 | ) || exit $? |
michael@1 | 112 | %{l_shtool} subst \ |
michael@1 | 113 | -e 's;\(-z[ \t][ \t]*\)\([^ \t\"][^ \t\"]*\);\1"\2";g' \ |
michael@1 | 114 | configure |
michael@1 | 115 | %{l_shtool} subst \ |
michael@1 | 116 | -e "s;\(QMAKE_LIBS_X11.*\)-lfreetype -lfontconfig;\1$fontconf;" \ |
michael@1 | 117 | configure |
michael@1 | 118 | %{l_shtool} subst \ |
michael@1 | 119 | -e 's;-silent|;-rpath|-silent|;' \ |
michael@1 | 120 | -e 's;\(RPATH_FLAGS="\)\\"\$QT_INSTALL_LIBS\\" \($RPATH_FLAGS"\);\1\2;' \ |
michael@1 | 121 | -e "s;\(echo.*QMAKE_RPATHDIR +=\).*\$QT_INSTALL_LIBS\\\\\"\\\";\1 $x11_libdir\";" \ |
michael@1 | 122 | configure |
michael@1 | 123 | if [ ".$x11_supdir" != . -a -d "$x11_supdir" ]; then |
michael@1 | 124 | %{l_shtool} subst \ |
michael@1 | 125 | -e "s;\(echo.*QMAKE_RPATHDIR += \)\($x11_libdir\\\"\)\( >> \\\"\$QTCONFIG\.tmp\\\"\);\1\2\3 \&\& \1$x11_supdir\"\3;" \ |
michael@1 | 126 | configure |
michael@1 | 127 | fi |
michael@1 | 128 | %{l_shtool} subst \ |
michael@1 | 129 | -e 's;\(TRY_INCLUDEPATHS = \).*\(\$\$INCLUDEPATH\);\1\2;' \ |
michael@1 | 130 | -e 's;/freetype2;/freetype;' \ |
michael@1 | 131 | config.tests/unix/freetype/freetype.pri |
michael@1 | 132 | %{l_shtool} subst \ |
michael@1 | 133 | -e "s;^\(LIBS += \)-lfreetype -lfontconfig;\1$fontconf;" \ |
michael@1 | 134 | config.tests/x11/fontconfig/fontconfig.pro |
michael@1 | 135 | %{l_shtool} subst \ |
michael@1 | 136 | -e "s;\(LIBS += -lpq\);\1 -lssl -lcrypto $loclibs;" \ |
michael@1 | 137 | config.tests/unix/psql/psql.pro |
michael@1 | 138 | %{l_shtool} subst \ |
michael@1 | 139 | -e 's;^mac:\(LIBS\);\1;' \ |
michael@1 | 140 | config.tests/unix/iconv/iconv.pro |
michael@1 | 141 | %{l_shtool} subst \ |
michael@65 | 142 | -e 's;LIBS .*= -lpq$;LIBS += -lpq -lssl -lcrypto;' \ |
michael@65 | 143 | src/sql/drivers/drivers.pri |
michael@65 | 144 | %{l_shtool} subst \ |
michael@1 | 145 | -e 's;^\(QMAKE_INCDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/include;' \ |
michael@1 | 146 | -e 's;^\(QMAKE_LIBDIR[^a-zA-Z0-9=]*=\).*;\1 %{l_prefix}/lib;' \ |
michael@1 | 147 | -e "s;^\(QMAKE_INCDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/include \2;" \ |
michael@1 | 148 | -e "s;^\(QMAKE_LIBDIR_OPENGL[^=]*=\) *\(.*\);\1 %{l_prefix}/lib \2 $x11_supdir;" \ |
michael@1 | 149 | -e 's;^\(QMAKE_LFLAGS_RELEASE.*\);\1 -s;' \ |
michael@1 | 150 | mkspecs/qws/*/qmake.conf \ |
michael@1 | 151 | mkspecs/*/*.conf |
michael@1 | 152 | %{l_shtool} subst \ |
michael@3 | 153 | -e 's;^\(QMAKE_LIBS +=.*\);\1 -liconv;' \ |
michael@3 | 154 | src/corelib/corelib.pro |
michael@3 | 155 | %{l_shtool} subst \ |
michael@1 | 156 | -e "s;^\(QMAKE_INCDIR_X11[^=]*=\) *\(.*\);\1 %{l_prefix}/include \2;" \ |
michael@1 | 157 | -e "s;^\(QMAKE_LIBDIR_X11[^=]*=\) *\(.*\);\1 %{l_prefix}/lib \2 $x11_supdir;" \ |
michael@1 | 158 | mkspecs/qws/solaris*/qmake.conf \ |
michael@1 | 159 | mkspecs/solaris*/qmake.conf |
michael@1 | 160 | %{l_shtool} subst \ |
michael@1 | 161 | -e 's; *\.\./3rdparty/freetype/.*;;g' \ |
michael@1 | 162 | -e 's;^\( *contains(QT_CONFIG, freetype) {\);\1 LIBS += -lfreetype;' \ |
michael@1 | 163 | src/gui/text/text.pri |
michael@1 | 164 | %{l_shtool} subst \ |
michael@1 | 165 | -e 's;\(#include *"\)\(tiffio.h"\);\1tiff/\2;' \ |
michael@1 | 166 | src/plugins/imageformats/tiff/qtiffhandler.cpp |
michael@1 | 167 | # for projfile in `find examples/ -name '*.pro' -print`; do |
michael@1 | 168 | # echo 'CONFIG += release' >>$projfile |
michael@1 | 169 | # done |
michael@1 | 170 | |
michael@1 | 171 | %build |
michael@1 | 172 | # protect against sloppy code inclusion of all unused subprojects |
michael@1 | 173 | rm -rf src/3rdparty/[^cdhmsw]* src/3rdparty/sql* src/3rdparty/win* |
michael@1 | 174 | |
michael@1 | 175 | case "%{l_platform -t}" in |
michael@3 | 176 | *-aix* ) platcomp="aix-g++" ;; |
michael@3 | 177 | *-freebsd* ) platcomp="freebsd-g++" ;; |
michael@3 | 178 | *-hpux* ) platcomp="hpux-g++" ;; |
michael@3 | 179 | *-irix* ) platcomp="irix-g++" ;; |
michael@3 | 180 | *64-linux* ) platcomp="linux-g++-64" ;; |
michael@3 | 181 | *-linux* ) platcomp="linux-g++" ;; |
michael@3 | 182 | *-darwin* ) platcomp="macx-g++" ;; |
michael@3 | 183 | *-sunos* ) platcomp="solaris-g++" ;; |
michael@1 | 184 | * ) echo "Platform '%{l_platform -t}' is not supported." 2>&1; exit 1 ;; |
michael@1 | 185 | esac |
michael@1 | 186 | |
michael@1 | 187 | %if "%{with_shared}" == "yes" |
michael@1 | 188 | # optional shared build (precedes mandatory static build) |
michael@1 | 189 | echo 'yes' | ./configure \ |
michael@1 | 190 | -prefix %{l_prefix} \ |
michael@1 | 191 | -bindir %{l_prefix}/bin \ |
michael@1 | 192 | -libdir %{l_prefix}/lib/qt \ |
michael@1 | 193 | -docdir %{l_prefix}/share/qt/doc \ |
michael@1 | 194 | -headerdir %{l_prefix}/include \ |
michael@1 | 195 | -plugindir %{l_prefix}/share/qt/plugins \ |
michael@1 | 196 | -datadir %{l_prefix}/share/qt \ |
michael@1 | 197 | -translationdir %{l_prefix}/share/qt/translations \ |
michael@1 | 198 | -sysconfdir %{l_prefix}/etc/qt \ |
michael@1 | 199 | -examplesdir %{l_prefix}/share/qt/examples \ |
michael@1 | 200 | -demosdir %{l_prefix}/share/qt/demos \ |
michael@1 | 201 | -release \ |
michael@1 | 202 | -shared \ |
michael@1 | 203 | -platform $platcomp \ |
michael@1 | 204 | -no-sql-ibase \ |
michael@65 | 205 | %if "%{with_mysql}" == "yes" |
michael@3 | 206 | -qt-sql-mysql \ |
michael@65 | 207 | %else |
michael@65 | 208 | -no-sql-mysql \ |
michael@65 | 209 | %endif |
michael@65 | 210 | %if "%{with_pgsql}" == "yes" |
michael@65 | 211 | -qt-sql-psql \ |
michael@65 | 212 | %else |
michael@65 | 213 | -no-sql-psql \ |
michael@65 | 214 | %endif |
michael@1 | 215 | -no-sql-odbc \ |
michael@65 | 216 | -system-sqlite \ |
michael@65 | 217 | -qt-sql-sqlite \ |
michael@1 | 218 | -no-sql-sqlite2 \ |
michael@3 | 219 | -openssl-linked \ |
michael@1 | 220 | -xmlpatterns \ |
michael@1 | 221 | -svg \ |
michael@1 | 222 | -no-webkit \ |
michael@1 | 223 | -system-zlib \ |
michael@1 | 224 | -qt-gif \ |
michael@1 | 225 | -system-libpng \ |
michael@1 | 226 | -system-libmng \ |
michael@1 | 227 | -system-libjpeg \ |
michael@1 | 228 | -system-libtiff \ |
michael@1 | 229 | -rpath \ |
michael@1 | 230 | -no-cups \ |
michael@1 | 231 | -iconv \ |
michael@1 | 232 | -pch \ |
michael@1 | 233 | -dbus-linked \ |
michael@1 | 234 | -opengl \ |
michael@1 | 235 | -xrender \ |
michael@1 | 236 | -fontconfig \ |
michael@1 | 237 | -freetype \ |
michael@3 | 238 | -no-glib |
michael@1 | 239 | |
michael@4 | 240 | # sadly, the webkit is broken in Qt 4.4.3. |
michael@1 | 241 | # default options are implicitly used, und zwar... |
michael@1 | 242 | #-no-fast -exceptions -accessibility -stl -qt3support -nis |
michael@1 | 243 | #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb |
michael@1 | 244 | |
michael@1 | 245 | # carry out shared build procedure |
michael@1 | 246 | ( cd src |
michael@1 | 247 | %{l_make} %{l_mflags -O} \ |
michael@1 | 248 | sub-moc sub-rcc sub-uic |
michael@1 | 249 | %{l_make} %{l_mflags -O} \ |
michael@1 | 250 | sub-corelib sub-xml sub-network sub-gui sub-sql \ |
michael@1 | 251 | sub-script sub-testlib sub-qt3support sub-dbus \ |
michael@1 | 252 | sub-opengl sub-xmlpatterns sub-svg sub-plugins |
michael@1 | 253 | ) || exit $? |
michael@1 | 254 | |
michael@1 | 255 | # cache shared libs and initialize the build configuration, which |
michael@1 | 256 | # would otherwise still contain references to our shared libs build |
michael@1 | 257 | %{l_shtool} mkdir -f -p -m 755 dynamic |
michael@1 | 258 | mv lib/* dynamic/ |
michael@1 | 259 | ( cd qmake |
michael@1 | 260 | %{l_make} %{l_mflags} distclean |
michael@1 | 261 | ) || exit $? |
michael@1 | 262 | rm -f .qmake.cache |
michael@1 | 263 | %endif |
michael@1 | 264 | |
michael@1 | 265 | # mandatory static build (follows optional shared build) |
michael@1 | 266 | echo 'yes' | ./configure \ |
michael@1 | 267 | -prefix %{l_prefix} \ |
michael@1 | 268 | -bindir %{l_prefix}/bin \ |
michael@1 | 269 | -libdir %{l_prefix}/lib \ |
michael@1 | 270 | -docdir %{l_prefix}/share/qt/doc \ |
michael@1 | 271 | -headerdir %{l_prefix}/include \ |
michael@1 | 272 | -plugindir %{l_prefix}/share/qt/plugins \ |
michael@1 | 273 | -datadir %{l_prefix}/share/qt \ |
michael@1 | 274 | -translationdir %{l_prefix}/share/qt/translations \ |
michael@1 | 275 | -sysconfdir %{l_prefix}/etc/qt \ |
michael@1 | 276 | -examplesdir %{l_prefix}/share/qt/examples \ |
michael@1 | 277 | -demosdir %{l_prefix}/share/qt/demos \ |
michael@1 | 278 | -release \ |
michael@1 | 279 | -static \ |
michael@1 | 280 | -platform $platcomp \ |
michael@1 | 281 | -no-sql-ibase \ |
michael@65 | 282 | %if "%{with_mysql}" == "yes" |
michael@3 | 283 | -qt-sql-mysql \ |
michael@65 | 284 | %else |
michael@65 | 285 | -no-sql-mysql \ |
michael@65 | 286 | %endif |
michael@65 | 287 | %if "%{with_pgsql}" == "yes" |
michael@65 | 288 | -qt-sql-psql \ |
michael@65 | 289 | %else |
michael@65 | 290 | -no-sql-psql \ |
michael@65 | 291 | %endif |
michael@1 | 292 | -no-sql-odbc \ |
michael@65 | 293 | -system-sqlite \ |
michael@65 | 294 | -qt-sql-sqlite \ |
michael@1 | 295 | -no-sql-sqlite2 \ |
michael@3 | 296 | -openssl-linked \ |
michael@1 | 297 | -xmlpatterns \ |
michael@1 | 298 | -svg \ |
michael@1 | 299 | -no-webkit \ |
michael@1 | 300 | -system-zlib \ |
michael@1 | 301 | -qt-gif \ |
michael@1 | 302 | -system-libpng \ |
michael@1 | 303 | -system-libmng \ |
michael@1 | 304 | -system-libjpeg \ |
michael@1 | 305 | -system-libtiff \ |
michael@1 | 306 | -rpath \ |
michael@1 | 307 | -no-cups \ |
michael@1 | 308 | -iconv \ |
michael@1 | 309 | -pch \ |
michael@1 | 310 | -dbus-linked \ |
michael@1 | 311 | -opengl \ |
michael@1 | 312 | -xrender \ |
michael@1 | 313 | -fontconfig \ |
michael@1 | 314 | -freetype \ |
michael@3 | 315 | -no-glib |
michael@1 | 316 | |
michael@1 | 317 | # default options are implicitly used, und zwar... |
michael@1 | 318 | #-no-fast -exceptions -accessibility -stl -qt3support -nis |
michael@1 | 319 | #-sm -xshape -xinerama -xcursor -xfixes -xrandr -tablet -xkb |
michael@1 | 320 | |
michael@1 | 321 | # carry out static build procedure |
michael@1 | 322 | %{l_make} %{l_mflags -O} sub-src |
michael@1 | 323 | %if "%{with_tools}" == "yes" |
michael@1 | 324 | %{l_make} %{l_mflags -O} sub-tools |
michael@1 | 325 | %endif |
michael@1 | 326 | %if "%{with_examples}" == "yes" |
michael@1 | 327 | %{l_make} %{l_mflags -O} \ |
michael@1 | 328 | sub-demos-make_default-ordered \ |
michael@1 | 329 | sub-examples-make_default-ordered |
michael@1 | 330 | %endif |
michael@1 | 331 | |
michael@1 | 332 | %install |
michael@1 | 333 | rm -rf $RPM_BUILD_ROOT |
michael@1 | 334 | |
michael@1 | 335 | # carry out installation procedure |
michael@1 | 336 | targets="sub-moc-install_subtargets-ordered \ |
michael@1 | 337 | sub-rcc-install_subtargets-ordered \ |
michael@1 | 338 | sub-uic-install_subtargets-ordered \ |
michael@1 | 339 | sub-corelib-install_subtargets-ordered \ |
michael@1 | 340 | sub-xml-install_subtargets-ordered \ |
michael@1 | 341 | sub-network-install_subtargets-ordered \ |
michael@1 | 342 | sub-gui-install_subtargets-ordered \ |
michael@1 | 343 | sub-sql-install_subtargets-ordered \ |
michael@1 | 344 | sub-script-install_subtargets-ordered \ |
michael@1 | 345 | sub-testlib-install_subtargets-ordered \ |
michael@1 | 346 | sub-qt3support-install_subtargets-ordered \ |
michael@1 | 347 | sub-dbus-install_subtargets-ordered \ |
michael@1 | 348 | sub-uic3-install_subtargets-ordered \ |
michael@1 | 349 | sub-opengl-install_subtargets-ordered \ |
michael@1 | 350 | sub-xmlpatterns-install_subtargets-ordered \ |
michael@1 | 351 | sub-svg-install_subtargets-ordered \ |
michael@1 | 352 | sub-plugins-install_subtargets-ordered" |
michael@1 | 353 | %if "%{with_tools}" == "yes" |
michael@1 | 354 | targets="$targets sub-tools-install_subtargets-ordered" |
michael@1 | 355 | %endif |
michael@1 | 356 | %if "%{with_examples}" == "yes" |
michael@1 | 357 | targets="$targets sub-demos-install_subtargets-ordered sub-examples-install_subtargets-ordered" |
michael@1 | 358 | %endif |
michael@3 | 359 | targets="$targets install_htmldocs install_qchdocs install_docimages install_translations install_qmake install_mkspecs" |
michael@1 | 360 | %{l_make} %{l_mflags} $targets INSTALL_ROOT="$RPM_BUILD_ROOT" |
michael@1 | 361 | |
michael@1 | 362 | %if "%{with_shared}" == "yes" |
michael@1 | 363 | # install shared libs and symlinks |
michael@1 | 364 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@1 | 365 | $RPM_BUILD_ROOT%{l_prefix}/lib/qt |
michael@1 | 366 | %{l_tar} cf - dynamic | %{l_tar} xf - -C $RPM_BUILD_ROOT%{l_prefix}/lib/qt |
michael@1 | 367 | |
michael@1 | 368 | # explain nonstandard shared library placement |
michael@1 | 369 | ( echo "This directory contains optional shared libraries as" |
michael@1 | 370 | echo "defined by the OpenPKG build specification. Although" |
michael@1 | 371 | echo "shared libraries are only optionally built (see the" |
michael@1 | 372 | echo "build time 'with_shared yes' option), static libraries" |
michael@1 | 373 | echo "are built and installed in the parent 'lib' directory." |
michael@1 | 374 | ) >$RPM_BUILD_ROOT%{l_prefix}/lib/qt/README |
michael@1 | 375 | |
michael@1 | 376 | # do not support pkg-config(1) with shared libs |
michael@1 | 377 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/qt/pkgconfig |
michael@1 | 378 | |
michael@1 | 379 | # remove temporary dynamic link paths |
michael@1 | 380 | %{l_shtool} subst \ |
michael@1 | 381 | -e 's;\(QMAKE_PRL_BUILD_DIR[^=][^=]*=\).*\(qt-x11-opensource-src.*\);\1 /tmp/\2;' \ |
michael@1 | 382 | $RPM_BUILD_ROOT%{l_prefix}/lib/*.prl |
michael@1 | 383 | %endif |
michael@1 | 384 | |
michael@1 | 385 | # determine internal file listing |
michael@1 | 386 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
michael@1 | 387 | %{l_files_std} \ |
michael@1 | 388 | '%doc %{l_prefix}/share/qt/doc/*' \ |
michael@1 | 389 | '%not %dir %{l_prefix}/lib/pkgconfig' |
michael@1 | 390 | |
michael@1 | 391 | %files -f files |
michael@1 | 392 | |
michael@1 | 393 | %clean |
michael@1 | 394 | rm -rf $RPM_BUILD_ROOT |
michael@1 | 395 |