Changeset 1075
- Timestamp:
- Sep 11, 2011, 7:57:24 PM (14 years ago)
- Location:
- packaging
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
packaging/CreateRPMs.sh
r1068 r1075 12 12 # 13 13 14 qt_spec=qt.spec14 spec_file=qt.spec 15 15 16 16 # … … 31 31 local src_base="$1" 32 32 33 [ -d "$src_base" ] || die "'$src_base' is not a directory."34 35 33 run $env_cmd rpmbuild \ 36 34 -D "QT_SOURCE_TREE $src_base" \ 37 -ba $ qt_spec35 -ba $spec_file 38 36 } 39 37 … … 42 40 local src_base="$1" 43 41 44 [ -d "$src_base" ] || die "'$src_base' is not a directory." 42 run $env_cmd rpmbuild \ 43 -D "QT_SOURCE_TREE $src_base" \ 44 -D "skip_prep_export 1" -D "skip_prep_clean 1" \ 45 --short-circuit -bc $spec_file 46 } 47 48 cmd_install() 49 { 50 local src_base="$1" 45 51 46 52 run $env_cmd rpmbuild \ 47 -D "QT_SOURCE_TREE $src_base" -D "skip_prep_export 1" \ 48 -bc $qt_spec 53 -D "QT_SOURCE_TREE $src_base" \ 54 -D "skip_prep_export 1" -D "skip_prep_clean 1" \ 55 --short-circuit -bi $spec_file 49 56 } 50 57 51 58 cmd_rpm() 52 59 { 53 local inst_base="$1"54 55 [ -d "$inst_base" ] || die "'$inst_base' is not a directory."56 57 60 run $env_cmd rpmbuild \ 58 -D "QT_BUILD_TREE $inst_base" \ 59 --short-circuit -bi $qt_spec 61 -D "skip_prep_export 1" -D "skip_prep_clean 1" \ 62 -D "skip_build 1" -D "skip_install 1" \ 63 --short-circuit -bb $spec_file 60 64 } 61 65 … … 83 87 Usage: 84 88 $script_name all <srcdir> Do everything (RPM, SRPM, ZIP) 85 $script_name build <srcdir> Build product (shadow build) 86 $script_name rpm [<instdir>] Build RPMs only 89 $script_name build <srcdir> Build product (in BUILD/<product>) 90 $script_name install <srcdir> Install product (to BUILDROOT/<product>) 91 $script_name rpm Build RPMs only 87 92 88 93 Options: 89 94 <srcdir> Qt SVN source tree location 90 <instdir> Qt installation tree location91 (default: $HOME/rpmbuild/BUILDROOT/qt-X.Y.Z)92 95 " 93 96 } 94 97 95 98 case "$1" in 96 all|build )99 all|build|install) 97 100 if [ -n "$2" ]; then 101 [ -d "$2" ] || die "'$2' is not a directory." 98 102 cmd_$1 $(echo "$2" | tr '\\' '/') 99 103 else 100 104 cmd_help 101 105 fi;; 102 rpm) 103 if [ -n "$2" ]; then 104 cmd_rpm $(echo "$2" | tr '\\' '/') 105 else 106 cmd_rpm 107 fi;; 106 rpm) cmd_rpm;; 108 107 -h|-?|--help|*) cmd_help;; 109 108 esac -
packaging/env.tpl.cmd
r1068 r1075 22 22 'set MYSQL_ROOT=D:\Coding\mysql\mysql51' 23 23 'set MYSQL_INCLUDEPATH=%MYSQL_ROOT%\include' 24 'set MYSQL_LIBS=-L%MYSQL_ROOT%\lib -lmysqlclient_r - llibssl -llibcrypto -lpthread'24 'set MYSQL_LIBS=-L%MYSQL_ROOT%\lib -lmysqlclient_r -L%UNIXROOT%\usr\lib -llibssl -llibcrypto -lpthread' 25 25 26 26 /* PostgresSQL libraries */ 27 27 'set PSQL_ROOT=D:\Coding\pgsql\pgsql901' 28 28 'set PSQL_INCLUDEPATH=%PSQL_ROOT%\include' 29 'set PSQL_LIBS=-L%PSQL_ROOT%\lib -llibpq - llibssl -llibcrypto -lpthread'29 'set PSQL_LIBS=-L%PSQL_ROOT%\lib -llibpq -L%UNIXROOT%\usr\lib -llibssl -llibcrypto -lpthread' 30 30 31 31 /* Number of make jobs, normally # of CPUs + 1 */ -
packaging/qt.spec
r1071 r1075 59 59 %if "%{?QT_SOURCE_TREE}" == "" 60 60 %define QT_SOURCE_TREE . 61 %endif62 63 %if "%{?QT_BUILD_TREE}" != ""64 %define skip_prep 165 %define skip_build 166 %define skip_install 167 61 %endif 68 62 … … 86 80 %define qtM %{name}%{ver_major} 87 81 82 # disable lxlite compression (Qt EXEs and DLLs are already compressed) 83 %define __os_install_post %{nil} 84 88 85 #------------------------------------------------------------------------------ 89 86 # main package … … 337 334 %else 338 335 # use passed source tree as is (shadow build) 339 %setup -n "%{name}-%{version}" -T Dc336 %setup -n "%{name}-%{version}" -Tc%{?skip_prep_clean:D} 340 337 %endif 341 338 %else … … 364 361 check_var "PSQL_INCLUDEPATH" 365 362 check_var "PSQL_LIBS" 363 364 [ -z "$MAKE_JOBS" ] && MAKE_JOBS=1 366 365 367 366 # Qt links to some OS/2 DLLs directly (w/o import libs) … … 391 390 392 391 # make sure the right DLLs are used by the build (and in particular by qdoc 393 # in make install) in case if there is another Qt version installed392 # in make docs) in case if there is another Qt version installed 394 393 export PATH="$BUILDDIR_D\\bin\;$PATH" 395 394 export BEGINLIBPATH="$BUILDDIR_D\\bin\;$BEGINLIBPATH" 396 395 396 # temporarily reset UNIXROOT so that install targets will get only Qt prefixes 397 # w/o the UNIXROOT directory chain (if it's not at root) 398 UNIXROOT_OLD="$UNIXROOT" 399 export UNIXROOT= 400 397 401 cmd /c $QT_SOURCE_TREE_D\\configure.cmd $library_paths 398 402 403 make -j$MAKE_JOBS 404 405 # resture UNIXROOT 406 export UNIXROOT="$UNIXROOT_OLD" 407 408 %if !0%{?skip_build_docs} 399 409 # qdoc needs the qsqlite plugin but nothing is installed to target locations 400 410 # yet, so generate qt.conf to override paths … … 406 416 Demos = demos" \ 407 417 > "%{_builddir}/%{buildsubdir}/bin/qt.conf" 408 409 make -j$MAKE_JOBS410 411 %if !0%{?skip_build_docs}412 418 make docs -j$MAKE_JOBS 419 rm -f "%{_builddir}/%{buildsubdir}/bin/qt.conf" 413 420 %endif 414 421 … … 423 430 rm -rf %{buildroot} 424 431 425 make install INSTALL_ROOT=%{buildroot} 432 # Qt links to some OS/2 DLLs directly (w/o import libs) 433 export LIBRARY_PATH=%{os2_boot_drive}/OS2/DLL\;%{os2_boot_drive}/MPTN/DLL\;$LIBRARY_PATH 434 435 # CMD.EXE is required by the build process for now 436 export MAKESHELL=%{os2_boot_drive}\\OS2\\CMD.EXE 437 438 # exclude install_htmldocs from install targets 439 make install_subtargets install_qchdocs install_qmake install_mkspecs \ 440 INSTALL_ROOT=$(echo "%{buildroot}/@unixroot" | sed -re 's,/,\\,g') 426 441 427 442 # copy READMEs (make install doesn't do that) 428 cp %{QT_SOURCE_TREE}/LICENSE.* \ 429 %{QT_SOURCE_TREE}/LGPL_EXCEPTION.txt \ 430 %{QT_SOURCE_TREE}/README \ 431 %{QT_SOURCE_TREE}/changes-%{ver_major}.%{ver_minor}.%{ver_} \ 432 %{QT_SOURCE_TREE}/README.OS2 \ 433 %{QT_SOURCE_TREE}/CHANGES.OS2 \ 434 %{pkg_docdir}/ 443 mkdir -p %{buildroot}/%{pkg_docdir}/ 444 cp -dp \ 445 %{QT_SOURCE_TREE}/LICENSE.* \ 446 %{QT_SOURCE_TREE}/LGPL_EXCEPTION.txt \ 447 %{QT_SOURCE_TREE}/README \ 448 %{QT_SOURCE_TREE}/changes-%{ver_major}.%{ver_minor}.%{ver_patch} \ 449 %{QT_SOURCE_TREE}/README.OS2 \ 450 %{QT_SOURCE_TREE}/CHANGES.OS2 \ 451 %{buildroot}/%{pkg_docdir}/ 435 452 436 453 %endif # if !0%{?skip_install}
Note:
See TracChangeset
for help on using the changeset viewer.