Changeset 1075


Ignore:
Timestamp:
Sep 11, 2011, 7:57:24 PM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

packaging: Fixed install script.

Location:
packaging
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • packaging/CreateRPMs.sh

    r1068 r1075  
    1212#
    1313
    14 qt_spec=qt.spec
     14spec_file=qt.spec
    1515
    1616#
     
    3131    local src_base="$1"
    3232
    33     [ -d "$src_base" ] || die "'$src_base' is not a directory."
    34 
    3533    run $env_cmd rpmbuild \
    3634        -D "QT_SOURCE_TREE $src_base" \
    37         -ba $qt_spec
     35        -ba $spec_file
    3836}
    3937
     
    4240    local src_base="$1"
    4341
    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
     48cmd_install()
     49{
     50    local src_base="$1"
    4551
    4652    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
    4956}
    5057
    5158cmd_rpm()
    5259{
    53     local inst_base="$1"
    54 
    55     [ -d "$inst_base" ] || die "'$inst_base' is not a directory."
    56 
    5760    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
    6064}
    6165
     
    8387Usage:
    8488  $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
    8792
    8893Options:
    8994  <srcdir>      Qt SVN source tree location
    90   <instdir>     Qt installation tree location
    91                 (default: $HOME/rpmbuild/BUILDROOT/qt-X.Y.Z)
    9295"
    9396}
    9497
    9598case "$1" in
    96     all|build)
     99    all|build|install)
    97100        if [ -n "$2" ]; then
     101            [ -d "$2" ] || die "'$2' is not a directory."
    98102            cmd_$1 $(echo "$2" | tr '\\' '/')
    99103        else
    100104            cmd_help
    101105        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;;
    108107    -h|-?|--help|*) cmd_help;;
    109108esac
  • packaging/env.tpl.cmd

    r1068 r1075  
    2222'set MYSQL_ROOT=D:\Coding\mysql\mysql51'
    2323'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'
    2525
    2626/* PostgresSQL libraries */
    2727'set PSQL_ROOT=D:\Coding\pgsql\pgsql901'
    2828'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'
    3030
    3131/* Number of make jobs, normally # of CPUs + 1 */
  • packaging/qt.spec

    r1071 r1075  
    5959%if "%{?QT_SOURCE_TREE}" == ""
    6060%define QT_SOURCE_TREE .
    61 %endif
    62 
    63 %if "%{?QT_BUILD_TREE}" != ""
    64 %define skip_prep 1
    65 %define skip_build 1
    66 %define skip_install 1
    6761%endif
    6862
     
    8680%define qtM                 %{name}%{ver_major}
    8781
     82# disable lxlite compression (Qt EXEs and DLLs are already compressed)
     83%define __os_install_post       %{nil}
     84
    8885#------------------------------------------------------------------------------
    8986# main package
     
    337334%else
    338335# use passed source tree as is (shadow build)
    339 %setup -n "%{name}-%{version}" -TDc
     336%setup -n "%{name}-%{version}" -Tc%{?skip_prep_clean:D}
    340337%endif
    341338%else
     
    364361check_var "PSQL_INCLUDEPATH"
    365362check_var "PSQL_LIBS"
     363
     364[ -z "$MAKE_JOBS" ] && MAKE_JOBS=1
    366365
    367366# Qt links to some OS/2 DLLs directly (w/o import libs)
     
    391390
    392391# 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 installed
     392# in make docs) in case if there is another Qt version installed
    394393export PATH="$BUILDDIR_D\\bin\;$PATH"
    395394export BEGINLIBPATH="$BUILDDIR_D\\bin\;$BEGINLIBPATH"
    396395
     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)
     398UNIXROOT_OLD="$UNIXROOT"
     399export UNIXROOT=
     400
    397401cmd /c $QT_SOURCE_TREE_D\\configure.cmd $library_paths
    398402
     403make -j$MAKE_JOBS
     404
     405# resture UNIXROOT
     406export UNIXROOT="$UNIXROOT_OLD"
     407
     408%if !0%{?skip_build_docs}
    399409# qdoc needs the qsqlite plugin but nothing is installed to target locations
    400410# yet, so generate qt.conf to override paths
     
    406416Demos = demos" \
    407417> "%{_builddir}/%{buildsubdir}/bin/qt.conf"
    408 
    409 make -j$MAKE_JOBS
    410 
    411 %if !0%{?skip_build_docs}
    412418make docs -j$MAKE_JOBS
     419rm -f "%{_builddir}/%{buildsubdir}/bin/qt.conf"
    413420%endif
    414421
     
    423430rm -rf %{buildroot}
    424431
    425 make install INSTALL_ROOT=%{buildroot}
     432# Qt links to some OS/2 DLLs directly (w/o import libs)
     433export 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
     436export MAKESHELL=%{os2_boot_drive}\\OS2\\CMD.EXE
     437
     438# exclude install_htmldocs from install targets
     439make install_subtargets install_qchdocs install_qmake install_mkspecs \
     440    INSTALL_ROOT=$(echo "%{buildroot}/@unixroot" | sed -re 's,/,\\,g')
    426441
    427442# 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}/
     443mkdir -p %{buildroot}/%{pkg_docdir}/
     444cp -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}/
    435452
    436453%endif # if !0%{?skip_install}
Note: See TracChangeset for help on using the changeset viewer.