--- /dev/null
+#!/bin/sh
+##
+## This file is part of the sigrok-util project.
+##
+## Copyright (C) 2013-2018 Uwe Hermann <uwe@hermann-uwe.de>
+## Copyright (C) 2018-2023 Frank Stettner <frank-stettner@gmx.net>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, see <http://www.gnu.org/licenses/>.
+##
+
+set -e
+
+mkdir -p "$INSTALL_DIR"
+
+BUILD_DIR=./build
+mkdir -p $BUILD_DIR
+cd $BUILD_DIR
+
+# libserialport
+$GIT_CLONE $LIBSERIALPORT_REPO libserialport
+cd libserialport
+./autogen.sh
+./configure $C $L
+make $PARALLEL $V
+make install $V
+cd ..
+
+# libsigrok
+$GIT_CLONE -b ${LIBSIGROK_BRANCH:-master} $LIBSIGROK_REPO libsigrok
+cd libsigrok
+./autogen.sh
+PKG_CONFIG_PATH=$P ./configure $C $L
+make $PARALLEL $V
+make install $V
+cd ..
+
+# libsigrokdecode
+$GIT_CLONE $LIBSIGROKDECODE_REPO libsigrokdecode
+cd libsigrokdecode
+./autogen.sh
+PKG_CONFIG_PATH=$P ./configure $C $L
+make $PARALLEL $V
+make install $V
+cd ..
+
+# sigrok-firmware
+$GIT_CLONE $SIGROK_FIRMWARE_REPO sigrok-firmware
+cd sigrok-firmware
+./autogen.sh
+# Nothing gets cross-compiled here, we just need 'make install' basically.
+PKG_CONFIG_PATH=$P ./configure --prefix="$INSTALL_DIR"
+make install $V
+cd ..
+
+# sigrok-firmware-fx2lafw
+$GIT_CLONE $SIGROK_FIRMWARE_FX2LAFW_REPO sigrok-firmware-fx2lafw
+cd sigrok-firmware-fx2lafw
+./autogen.sh
+# We're building the fx2lafw firmware on the host, no need to cross-compile.
+PKG_CONFIG_PATH=$P ./configure --prefix="$INSTALL_DIR"
+make $PARALLEL $V
+make install $V
+cd ..
+
+# sigrok-dumps
+$GIT_CLONE $SIGROK_DUMPS_REPO sigrok-dumps
+cd sigrok-dumps
+make install PREFIX="$INSTALL_DIR" $V
+cd ..
+
--- /dev/null
+#!/bin/sh
+##
+## This file is part of the sigrok-util project.
+##
+## Copyright (C) 2023 Frank Stettner <frank-stettner@gmx.net>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, see <http://www.gnu.org/licenses/>.
+##
+
+set -e
+
+# Generate AppRun.sh scrip
+cat > "$INSTALL_DIR"/AppRun.sh << EOF
+#! /bin/bash
+
+export PYTHONHOME="\$APPDIR"/usr/share/pyshared
+export PYTHONPATH="\$APPDIR"/usr/share/pyshared
+export SIGROK_FIRMWARE_PATH="\$SIGROK_FIRMWARE_PATH":"\$APPDIR"/usr/share/sigrok-firmware
+export SIGROKDECODE_PATH="\$SIGROKDECODE_PATH":"\$APPDIR"/usr/share/libsigrokdecode/decoders
+
+exec "\$APPDIR"/usr/bin/$ARTIFACT_BIN_NAME "\$@"
+EOF
+chmod +x "$INSTALL_DIR"/AppRun.sh
+
+# Copy decoders stuff
+cp -r "$INSTALL_DIR"/share/libsigrokdecode "$APP_DIR"/usr/share
+
+# Copy sigrok-firmware
+cp -r "$INSTALL_DIR"/share/sigrok-firmware "$APP_DIR"/usr/share
+
+# Copy extra Python files
+mkdir -p "$APP_DIR"/usr/share/pyshared
+cp -r /usr/lib/python3.6/* "$APP_DIR"/usr/share/pyshared
+
+# AppImage build dir
+mkdir -p appimage-build
+cd appimage-build
+
+# Environment variables
+export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":"$INSTALL_DIR"/lib
+
+# Fetch linuxdeploy
+wget -c https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-$ARCH.AppImage
+chmod +x linuxdeploy-$ARCH.AppImage
+
+PLUGINS=""
+if [ "$ARTIFACT_BIN_NAME" = "pulseview" ]; then
+ # Fetch qt plugin
+ wget -c https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-$ARCH.AppImage
+ chmod +x linuxdeploy-plugin-qt-$ARCH.AppImage
+ PLUGINS="--plugin qt"
+fi
+
+export OUTPUT="$ARTIFACT_TITLE-$ARTIFACT_VERSION-$TARGET.AppImage"
+./linuxdeploy-$ARCH.AppImage --appdir "$APP_DIR" --output appimage $PLUGINS --custom-apprun "$INSTALL_DIR"/AppRun.sh
+
--- /dev/null
+#!/bin/sh
+##
+## This file is part of the sigrok-util project.
+##
+## Copyright (C) 2013-2018 Uwe Hermann <uwe@hermann-uwe.de>
+## Copyright (C) 2018-2023 Frank Stettner <frank-stettner@gmx.net>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, see <http://www.gnu.org/licenses/>.
+##
+
+set -e
+
+export PARALLEL="-j$(nproc)"
+
+export P="$INSTALL_DIR/lib/pkgconfig"
+export C="$C --prefix=$INSTALL_DIR"
+export L="$L"
+#export V="V=1 VERBOSE=1"
+