Skip to content

Instantly share code, notes, and snippets.

@sultanqasim
Last active July 1, 2024 21:03
Show Gist options
  • Select an option

  • Save sultanqasim/c7997eac6683fc1bf8a5385f59c8ea04 to your computer and use it in GitHub Desktop.

Select an option

Save sultanqasim/c7997eac6683fc1bf8a5385f59c8ea04 to your computer and use it in GitHub Desktop.
Simple (non-deployable) build script for SigDigger on Mac (including Apple Silicon)
#!/bin/sh
#
set -eux
BREW_PREFIX="$(brew --prefix)"
CPU_COUNT="$(sysctl -n hw.ncpu)"
# Homebrew dependencies
brew update
brew install volk fftw libsndfile libxml2 portaudio qt@6
brew tap pothosware/homebrew-pothos
#brew install pothossoapy soapyairspyhf soapyplutosdr # broken build
brew install soapyrtlsdr soapyhackrf soapybladerf soapyairspy soapyredpitaya soapyiris limesuite
brew install --head soapyuhd # avoiding C++14 compilation issue, as fix hasn't yet been tagged in a release
# get the code
if [ ! -e sigutils ]; then
git clone -b develop --recurse-submodules https://github.com/sultanqasim/sigutils.git
fi
if [ ! -e suscan ]; then
git clone -b develop --recurse-submodules https://github.com/sultanqasim/suscan.git
fi
if [ ! -e SuWidgets ]; then
git clone -b develop https://github.com/sultanqasim/SuWidgets
fi
if [ ! -e SigDigger ]; then
git clone -b develop https://github.com/sultanqasim/SigDigger.git
fi
# prepare the deploy path
DEPLOYROOT="$(pwd)/deploy-root"
rm -rf "$DEPLOYROOT"
mkdir -p "$DEPLOYROOT"
export PKG_CONFIG_PATH="$DEPLOYROOT/usr/lib/pkgconfig"
# build the source dependencies
(
cd sigutils
rm -rf build
mkdir -p build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX="$DEPLOYROOT/usr" -DCMAKE_SKIP_RPATH=ON -DCMAKE_SKIP_INSTALL_RPATH=ON -DCMAKE_BUILD_TYPE=Release
make -j${CPU_COUNT}
make install
)
(
cd suscan
rm -rf build
mkdir -p build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX="$DEPLOYROOT/usr" -DCMAKE_SKIP_RPATH=ON -DCMAKE_SKIP_INSTALL_RPATH=ON -DCMAKE_PREFIX_PATH="$DEPLOYROOT/usr" -DCMAKE_BUILD_TYPE=Release
make -j${CPU_COUNT}
make install
)
(
cd SuWidgets
qmake SuWidgetsLib.pro PREFIX="$DEPLOYROOT/usr" "CONFIG += release"
make clean
make -j${CPU_COUNT}
make install
)
# build SigDigger (not as dmg for now)
(
cd SigDigger
qmake SigDigger.pro PREFIX="$DEPLOYROOT/usr" SUWIDGETS_PREFIX="$DEPLOYROOT/usr" "CONFIG += release"
make clean
make -j${CPU_COUNT}
make install
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment