33
44set -ex
55
6+ arch=` dpkg --print-architecture`
7+
68eval " $( pyenv init --path) "
79eval " $( pyenv virtualenv-init -) "
810pip install -U pip
911pip install poetry
1012
1113# Setup poetry and install the dependencies
12- poetry install -E qt
14+ if [[ $arch == " amd64" ]]; then
15+ poetry install -E qt
16+ else
17+ poetry install
18+ fi
1319
1420# We also need to change the timestamps of all of the base library files
1521lib_dir=` pyenv root` /versions/3.9.7/lib/python3.9
@@ -18,8 +24,12 @@ TZ=UTC find ${lib_dir} -name '*.py' -type f -execdir touch -t "201901010000.00"
1824# Make the standalone binary
1925export PYTHONHASHSEED=42
2026poetry run pyinstaller hwi.spec
21- poetry run contrib/generate-ui.sh
22- poetry run pyinstaller hwi-qt.spec
27+
28+ if [[ $arch == " amd64" ]]; then
29+ poetry run contrib/generate-ui.sh
30+ poetry run pyinstaller hwi-qt.spec
31+ fi
32+
2333unset PYTHONHASHSEED
2434
2535# Make the final compressed package
@@ -29,13 +39,22 @@ OS=`uname | tr '[:upper:]' '[:lower:]'`
2939if [[ $OS == " darwin" ]]; then
3040 OS=" mac"
3141fi
32- target_tarfile=" hwi-${VERSION} -${OS} -amd64.tar.gz"
33- tar -czf $target_tarfile hwi hwi-qt
42+
43+ target_tarfile=" hwi-${VERSION} -${OS} -${arch} .tar.gz"
44+
45+ if [[ $arch == " amd64" ]]; then
46+ tar -czf $target_tarfile hwi hwi-qt
47+ else
48+ tar -czf $target_tarfile hwi
49+ fi
3450
3551# Copy the binaries to subdir for shasum
3652target_dir=" $target_tarfile .dir"
3753mkdir $target_dir
3854mv hwi $target_dir
39- mv hwi-qt $target_dir
55+
56+ if [[ $arch == " amd64" ]]; then
57+ mv hwi-qt $target_dir
58+ fi
4059
4160popd
0 commit comments