/
/
/
1# Shairport-Sync Binaries
2
3This directory should contain the shairport-sync binaries for different platforms.
4
5## Required Binaries
6
7- `shairport-sync-macos-arm64` - macOS Apple Silicon
8- `shairport-sync-linux-x86_64` - Linux x86_64
9- `shairport-sync-linux-aarch64` - Linux ARM64 (Raspberry Pi, etc.)
10
11## Installation Options
12
13### Option 1: System Package Manager (Recommended)
14
15The easiest way to use this plugin is to install shairport-sync via your system's package manager:
16
17**Debian/Ubuntu:**
18```bash
19apt-get update
20apt-get install -y shairport-sync
21```
22
23**macOS (Homebrew):**
24```bash
25brew install shairport-sync
26```
27
28**Arch Linux:**
29```bash
30pacman -S shairport-sync
31```
32
33### Option 2: Build Static Binaries
34
35If you want to include pre-built binaries with Music Assistant, you'll need to build them yourself. See `build_binaries.sh` for a script that helps with this process.
36
37## Building Shairport-Sync
38
39### Prerequisites
40
41Shairport-sync requires several dependencies:
42- OpenSSL
43- Avahi (for mDNS/Bonjour)
44- ALSA (Linux only)
45- libpopt
46- libconfig
47- libsndfile
48- libsoxr (optional, for resampling)
49
50### Build Instructions
51
52#### Linux (Static Build with musl)
53
54```bash
55# Install dependencies
56apk add --no-cache \
57 build-base \
58 git \
59 autoconf \
60 automake \
61 libtool \
62 alsa-lib-dev \
63 libconfig-dev \
64 popt-dev \
65 openssl-dev \
66 avahi-dev \
67 libsndfile-dev \
68 libsoxr-dev
69
70# Clone and build
71git clone https://github.com/mikebrady/shairport-sync.git
72cd shairport-sync
73git checkout tags/4.3.7 # Use latest stable version
74autoreconf -fi
75./configure \
76 --with-pipe \
77 --with-metadata \
78 --with-avahi \
79 --with-ssl=openssl \
80 --with-stdout \
81 --with-soxr \
82 LDFLAGS="-static"
83make
84strip shairport-sync
85
86# Copy to provider bin directory
87cp shairport-sync ../music_assistant/providers/airplay_receiver/bin/shairport-sync-linux-$(uname -m)
88```
89
90#### macOS
91
92```bash
93# Install dependencies
94brew install autoconf automake libtool pkg-config openssl libsodium libsoxr popt libconfig
95
96# Clone and build
97git clone https://github.com/mikebrady/shairport-sync.git
98cd shairport-sync
99git checkout tags/4.3.7
100autoreconf -fi
101./configure \
102 --with-pipe \
103 --with-metadata \
104 --with-ssl=openssl \
105 --with-stdout \
106 --with-soxr \
107 PKG_CONFIG_PATH="/opt/homebrew/opt/openssl/lib/pkgconfig"
108make
109strip shairport-sync
110
111# Copy to provider bin directory
112cp shairport-sync ../music_assistant/providers/airplay_receiver/bin/shairport-sync-macos-$(uname -m)
113```
114
115## Docker Integration
116
117For Docker deployments, it's recommended to add shairport-sync to the Music Assistant base Docker image (`Dockerfile.base`) instead of bundling binaries:
118
119```dockerfile
120# Add to Dockerfile.base runtime stage
121RUN apk add --no-cache \
122 shairport-sync
123```
124
125Alternatively, build from source in the Docker image for the latest version.
126
127## Bundled Binaries
128
129This directory contains pre-built shairport-sync binaries for **local development only**.
130
131### macOS Binary
132- **shairport-sync-macos-arm64** (~262 KB)
133
134â ï¸ **Important**: The macOS binary requires Homebrew libraries to be installed:
135```bash
136brew install openssl libdaemon libconfig popt libao pulseaudio libsoxr
137```
138
139For macOS development, it's easier to just install shairport-sync via Homebrew:
140```bash
141brew install shairport-sync
142```
143
144### Linux Binaries (Alpine/musl)
145- **shairport-sync-linux-x86_64** (~225 KB)
146- **shairport-sync-linux-aarch64** (~261 KB)
147
148These binaries are built with Alpine Linux (musl libc). While musl binaries CAN technically run on glibc systems (Debian/Ubuntu), they require the musl interpreter and musl versions of their dependencies to be installed.
149
150**Recommendation:** For simplest deployment, install shairport-sync via your system's package manager instead of using these binaries.
151
152**If using bundled binaries on Debian/Ubuntu:**
153The plugin's helper will use these binaries if found, but they may require additional packages. If you encounter issues, install shairport-sync via apt instead:
154```bash
155sudo apt-get install shairport-sync
156```
157
158**For local Linux development:**
159```bash
160# Debian/Ubuntu (recommended)
161sudo apt-get install shairport-sync
162
163# Arch Linux
164sudo pacman -S shairport-sync
165
166# Fedora
167sudo dnf install shairport-sync
168```
169
170## Notes
171
172- The helper code in `helpers.py` will automatically:
173 1. Check for bundled binaries in this directory first (macOS only)
174 2. Fall back to system-installed shairport-sync in PATH
175- For production deployments, always use the system package manager
176- Static linking is not feasible due to shairport-sync's numerous dependencies (avahi, openssl, etc.)
177