diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index e236cc3d..6ffe833e 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -108,7 +108,7 @@ jobs: - name: Make deb package run: | git clean -xdf - export QT_ROOT=/usr/lib/`uname -a`-linux-gnu/cmake/Qt6 + export QT_ROOT=/usr/lib/`uname -m`-linux-gnu/cmake/Qt6 ./build_debpackage.sh cp ../rabbitcommon*.deb . diff --git a/build_debpackage.sh b/build_debpackage.sh index a4bf40d3..5383035f 100755 --- a/build_debpackage.sh +++ b/build_debpackage.sh @@ -1,19 +1,38 @@ #!/bin/bash -if [ -f /usr/lib/`uname -a`-linux-gnu/cmake/Qt6 -a -z "$QT_ROOT" ]; then - QT_ROOT=/usr/lib/`uname -a`-linux-gnu/cmake/Qt6 +if [ -n "$1" -a -z "$QT_ROOT" ]; then + QT_ROOT=$1 fi -if [ -n "$1" ]; then - QT_ROOT=$1 +if [ -d "/usr/lib/`uname -m`-linux-gnu" -a -z "$QT_ROOT" ]; then + QT_ROOT="/usr/lib/`uname -m`-linux-gnu" fi if [ -z "$QT_ROOT" ]; then - echo "$0 QT_ROOT" + echo "QT_ROOT=$QT_ROOT" + echo "$0 QT_ROOT RabbitCommon_DIR" + exit -1 +fi + +if [ -n "$2" -a -z "$RabbitCommon_DIR" ]; then + RabbitCommon_DIR=$2 +fi + +if [ -z "$RabbitCommon_DIR" ]; then + RabbitCommon_DIR=`pwd`/../RabbitCommon + echo "RabbitCommon_DIR=$RabbitCommon_DIR" +fi + +if [ ! -d "$RabbitCommon_DIR" ]; then + echo "QT_ROOT=$QT_ROOT" + echo "RabbitCommon_DIR=$RabbitCommon_DIR" + echo "$0 QT_ROOT RabbitCommon_DIR" exit -1 fi export QT_ROOT=$QT_ROOT +export RabbitCommon_DIR=$RabbitCommon_DIR +export PATH=$QT_ROOT/bin:$PATH #fakeroot debian/rules binary