MPD slim build

Running MPD on raspberry I decided to build a lighter version of MPD rather than using the vanilla Debian build.

build options

My setup is quite common, a NAS exposes my music library on the network (via cifs) and a raspberry runs MPD with a satellite setup.

My music library contains only vorbis, mp3 and flac files and I’m playing sound on the raspberry (HiFiBerry Digi+), hence alsa.

Then I only need a subset of decoder plugins and functionalities enabled in the official Debian package.

Here are the build options used:

# Client support
ENABLE_CLIENTS=-Dipv6=enabled -Dtcp=true -Dlocal_socket=true
# Slim build
SLIM_OPTIONS=--auto-features=disabled \
        -Dnfs=enabled -Dneighbor=true -Dsmbclient=disabled \
        ${ENABLE_CLIENTS} -Dlibmpdclient=enabled \
        -Dflac=enabled -Dmpg123=enabled -Dopus=enabled \
        -Dlibsamplerate=enabled -Dsqlite=enabled -Dsyslog=enabled \
        -Dpcre=enabled -Did3tag=enabled \
        -Dhttpd=true -Dpipe=true -Dpulse=enabled \
        -Dcurl=enabled -Dsystemd=enabled -Dalsa=enabled

Get the Debian source packages for the details (cf. below).


The final binary is not that much smaller, 382KB vs. 567KB, but it links against much less libraries. The main gain lies then in the installation itself in my opinion.

I got the numbers from a plain debian:buster docker container.
Once running a regular install apt-get install --assume-no and another with --no-install-recommends option.

apt: w/ recommends mpd mpd-slim
# packages 238 85
download size [MB] 87 21
install size [MB] 490 78
apt: no recommends mpd mpd-slim
# packages 191 76
download size [MB] 59 20
install size [MB] 206 70


Packages, binary and source, are available for Debian/Raspbian stable in my backports repo.
Please refer the dedicated page to setup your repositories.

Packages might be available directly in the repo itself:

Happy listening!