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 over the network 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 (./debian/rules):

ENABLE_DOCUMENTATION=-Ddocumentation=enabled -Dmanpages=true -Dhtml_manual=false
# Client support
ENABLE_CLIENTS=-Dipv6=enabled \
                -Dtcp=true \
                -Dlocal_socket=true
ENABLE_NETFS=-Dnfs=enabled -Dneighbor=true -Dsmbclient=disabled
SLIM_OPTIONS=--auto-features=disabled ${ENABLE_DOCUMENTATION} \
                ${ENABLE_NETFS} \
                ${ENABLE_CLIENTS} -Dlibmpdclient=enabled \
                -Dflac=enabled -Dopus=enabled -Dmad=enabled \
                -Dlibsamplerate=enabled -Dsqlite=enabled -Dsyslog=enabled \
                -Dlame=enabled \
                -Dpcre=enabled \
                -Did3tag=enabled \
                -Dhttpd=true -Dpipe=true -Dpulse=enabled \
                -Dexpat=enabled \
                -Dshout=enabled \
                -Dsoxr=enabled \
                -Dcurl=enabled

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

Result

The final binary package is not that much smaller but it links against much less libraries. The main gain lies then in the installation itself.

I got the numbers from a Debian/buster installation (amd64 arch., no desktop, server minimal).
Once running a regular install apt-get install --assume-no and another with --no-install-recommends option.

apt: w/ recommends mpd mpd-slim
nb. packages 179 50
download size [MB] 66 15
install size [MB] 410 50


apt: no recommends mpd mpd-slim
nb. packages 143 50
download size [MB] 38 15
install size [MB] 135 50

Packages

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:

Use apt install ./mpd-slim_….deb to install directly from file.

Happy listening!

page last updated: Thu 10 Dec 2020