Command line interface for audio streaming to AirPlay 2 devices
Based on owntones (all rights reserved).
Pre-built binaries for Linux (x86_64 and ARM64) and macOS (Intel and Apple Silicon) are automatically built via GitHub Actions and available as build artifacts on the repository.
Note that Linux binaries are currently built for Debian Bookworm and rely on use of shared libraries. If you are running a different Debian version, you will need to build your own binary using the instructions below. If you experience issues with missing shared libraries on either Debian or macOS platforms, please install packages using sudo apt-get install for Debian or brew install for macOS as per below. If you still have issues after doing so, you will need to build your own binary using the insturctions below.
Install required tools and libraries:
sudo apt-get install \
build-essential git autotools-dev autoconf automake libtool pkgconf gettext gawk gperf flex bison \
uuid-dev zlib1g-dev libcurl4-openssl-dev libsodium-dev \
libconfuse-dev libunistring-dev libxml2-dev libevent-dev \
libjson-c-dev libplist-dev libgcrypt20-dev libgpg-error-dev \
libavfilter-devThen run the following:
git clone https://github.com/music-assistant/cliairplay.git
cd cliairplay
git submodule update --init
autoreconf -fi
./configure
makeBelow are instructions for preparing macOS (Intel or Apple Silicon) to build this project using Homebrew.
- Install Xcode Command Line Tools (if not already installed):
xcode-select --install- Install Homebrew (if you don't have it):
Visit https://brew.sh/ and follow the instructions. Alternatively run the installer shown on the website.
- Install required Homebrew packages. This installs the closest macOS equivalents to the Debian packages listed above:
brew install git autoconf automake libtool pkgconf gettext gawk \
confuse libunistring ffmpeg libxml2 libgcrypt zlib libevent libplist \
libiconv libsodium json-c curl openssl@3 protobuf-c bisonNotes:
- OpenSSL 3 is recommended as OpenSSL 1.1 reached end-of-life in September 2023.
- Bison from Homebrew is required as macOS ships with an outdated version (2.3).
- macOS uses CoreAudio instead of ALSA (
libasound2-dev). The project should detect and skip ALSA on macOS; if it doesn't, look for a configure flag to disable ALSA support.
- Export Homebrew paths so
./configurefinds libraries (portable for Intel/Apple Silicon):
export BREW_PREFIX="$(brew --prefix)"
export OPENSSL_PREFIX="$(brew --prefix openssl@3)"
export LIBXML2_PREFIX="$(brew --prefix libxml2)"
export ZLIB_PREFIX="$(brew --prefix zlib)"
export LIBGCRYPT_PREFIX="$(brew --prefix libgcrypt)"
export LIBGPG_ERROR_PREFIX="$(brew --prefix libgpg-error)"
export LIBUNISTRING_PREFIX="$(brew --prefix libunistring)"
export LIBICONV_PREFIX="$(brew --prefix libiconv)"
export PKG_CONFIG_PATH="$LIBXML2_PREFIX/lib/pkgconfig:$ZLIB_PREFIX/lib/pkgconfig:$LIBGCRYPT_PREFIX/lib/pkgconfig:$LIBGPG_ERROR_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
export LDFLAGS="-L$LIBXML2_PREFIX/lib -L$ZLIB_PREFIX/lib -L$LIBGCRYPT_PREFIX/lib -L$LIBGPG_ERROR_PREFIX/lib -L$LIBICONV_PREFIX/lib"
export CPPFLAGS="-I$OPENSSL_PREFIX/include -I$LIBXML2_PREFIX/include -I$ZLIB_PREFIX/include -I$LIBGCRYPT_PREFIX/include -I$LIBGPG_ERROR_PREFIX/include -I$LIBICONV_PREFIX/include"
export LIBUNISTRING_CFLAGS="-I$LIBUNISTRING_PREFIX/include"
export LIBUNISTRING_LIBS="-L$LIBUNISTRING_PREFIX/lib -lunistring -L$LIBICONV_PREFIX/lib -liconv"
export PATH="$BREW_PREFIX/opt/bison/bin:$PATH"
export ACLOCAL_PATH="$BREW_PREFIX/share/gettext/m4"
export LIBS="$OPENSSL_PREFIX/lib/libssl.a $OPENSSL_PREFIX/lib/libcrypto.a"- Clone the repo and build the project
git clone https://github.com/music-assistant/cliairplay.git
cd cliairplay
git submodule update --init
autoreconf -fi
./configure
makeThe binary will be created at src/cliap2.
If ./configure fails to find libraries, check the PKG_CONFIG_PATH and the --with-... flags in ./configure --help and point them to the Homebrew prefixes above.
Troubleshooting:
- If the build fails complaining about ALSA, there should be an option to disable ALSA in the configure script; macOS does not use ALSA.
- Use
brew info <formula>to find the prefix of any formula. Use those prefixes inPKG_CONFIG_PATH,LDFLAGSandCPPFLAGS. - On Apple Silicon, Homebrew is usually installed under
/opt/homebrew. The$(brew --prefix)calls above handle that automatically.