install-sigrok.sh (Source)

#!/bin/bash
#
# Install all dependencies, and then
#
# libserialport
# libsigrokdecode
# libsigrok
# sigrok-cli
# pulseview
# libsigrok-lafw
#
# Depending on which upstream Debian, or Debian distribution you
# are building for, and when, you need to pay attention to those
# packages in the apt-get install code below of the packages with version numbers.
#
# Package versions are not static.
#
(( EUID == 0 )) || {
    echo "Script must be run as root, try: sudo $0"
    exit 1
}
set -e
echo "Install all dependencies for sigrok..."
apt-get install -yq build-essential git autoconf automake autoconf-archive \
    libtool check default-jdk doxygen \
    libavahi-client-dev libftdi1-dev libglib2.0-dev \
    libglibmm-2.4-dev libieee1284-3-dev libusb-1.0-0-dev \
    libvisa-dev libzip-dev \
    nettle-dev pkg-config python3-dev \
    python-gi-dev python3-numpy python3-setuptools swig
# build and install libserialport from git
echo "Build and install libserialport from git..."
pushd /tmp
git clone --depth 1 git://sigrok.org/libserialport
pushd libserialport
./autogen.sh
./configure
make
make install
popd
# build and installlibsigrokdecode from git
echo "Build and install libsigrokdecode from git..."
git clone --depth 1 git://sigrok.org/libsigrokdecode
pushd libsigrokdecode
./autogen.sh
./configure
make
make install
popd
# build and install libsigrok from git
echo "Build and install libsigrok from git..."
git clone --depth 1 git://sigrok.org/libsigrok
pushd libsigrok
./autogen.sh
./configure
make
make install
popd
# build and install pulseview from git
echo "Build and install pulseview from git..."
git clone --depth 1 git://sigrok.org/pulseview
pushd pulseview
./autogen.sh
./configure
make
make install
popd
# build and install sigrok-cli from git
echo "Build and install sigrok-cli from git..."
git clone --depth 1 git://sigrok.org/sigrok-cli
pushd sigrok-cli
./autogen.sh
./configure
make
make install
popd
# build and install the fx2 chip logic analyzers firmware from git
echo "Build and install the fx2 chip logic analyzer firmware from git..."
git clone --depth 1 git://sigrok.org/sigrok-firmware-fx2lafw
pushd sigrok-firmware-fx2lafw
./autogen.sh
./configure
make
make install
popd
popd
echo "All done"
exit 0