Skip to content

Commit

Permalink
CI: Fix build_debpackage.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Dec 24, 2024
1 parent 19c52ff commit 086a2ad
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down
29 changes: 24 additions & 5 deletions build_debpackage.sh
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 086a2ad

Please sign in to comment.