NSLU2-Linux
view · edit · print · history

Intro

MPD is the Music Player Daemon. Debian has packages for almost all, but it makes no sense to use the default MPD package because it's not optimised for non-floating-point hardware.

2009-10-01: Actually, I just updated to Debian lenny 5.03 and after setting up mpd.conf to its ALSA default, it plays an 112 kbps ogg nicely at less than 30 % CPU (two threads?).

There are two ways to install your own version of MPD. The first is to build and install MPD from source. The second is to build your own MPD .deb-packages and install those.

Installation from source

You have to install the following packages to get mpd working with mp3 and ogg vorbis support:

apt-get install binutils gcc make subversion autoconf automake1.9 autotools-dev libtool pkg-config libasound2-dev libid3-dev libmad0-dev libaudiofile-dev libid3tag0-dev libvorbis-dev libogg-dev

Ok, let's start. I'll install MPD in /opt/mpd, so it doesn't conflict with the Debian packages. It simply can be removed by rm -fr /opt/mpd.

  1. svn co http://svn.xiph.org/tags/tremor_public_release_1_0/Tremor(approve sites) (This can be done on the host if you don't want to install Subversion on your Slug.)
  2. cd Tremor
  3. ./autogen.sh --prefix=/usr
  4. make (if you're getting libtool-errors, try to change V_LIB_AGE=2 to V_LIB_AGE=1 in configure.in and rerun autogen.sh)
  5. make install
  6. mkdir /usr/includes/tremor && cp config_types.h ivorbiscodec.h ivorbisfile.h ogg.h os_types.h /usr/includes/tremor
  7. wget http://www.musicpd.org/uploads/files/mpd-0.12.0rc2.tar.bz2 (should work with newer versions too, see http://www.musicpd.org)
  8. tar xjf mpd_0.12.0rc2.tar.bz2 (apt-get install bzip2 if you haven't done this yet)
  9. ./configure --prefix=/opt/mpd --with-tremor
  10. make
  11. make install

That's it. Copy the sample configuration file to /etc and adjust it. You have to adjust the directories at the start and you probably want to comment out a audio output option. I use ALSA. The user which runs MPD must be added to the "audio" group.

Now install the init script

  1. su
  2. cd /etc/init.d
  3. wget http://www.bwalle.de/temp/mpd
  4. chmod 755 mpd
  5. mkdir -p /opt/mpd/share/mpd/conflib/
  6. cd /opt/mpd/share/mpd/conflib/
  7. wget http://www.bwalle.de/temp/libmpdconf
  8. apt-get install rcconf
  9. rcconf -> adjust to start MPD
  10. /etc/init.d/mpd start

That's it.

Build your own MPD package

You have to install quite a few development packages. I do not remember them all. Please install further packages on the way as needed.

  1. Install needed packages
    apt-get install build-essential dpkg-dev autotools-dev debhelper devscripts gawk automake autoconf libtool cdbs libaudiofile-dev libflac-dev libogg-dev libshout3-devibvorbis-dev libasound2-dev libao-dev libmad0-dev libid3tag0-dev libmikmod2-dev libmpcdec-dev zlib1g-dev
  2. Checkout and build Tremor
    1. svn co http://svn.xiph.org/trunk/Tremor/ (do this elsewhere and copy over if you don't want to install subversion)
    2. cd Tremor
    3. ./autogen.sh (I got an error message and had to comment out the call to autoheader in autogen.sh line 113 and rerun ./autogen.sh)
    4. dpkg-buildpackage -us -uc as root or install fakeroot and fakeroot dpkg-buildpackage -us -uc as user
      • I had a syntax error in debian/rules with an commented if but uncommented body and fi and had to comment out lines 87f and rerun.
    5. dpkg -i ../libvorbisidec*.deb as root
  3. Download and build mpd 0.12.
    1. apt-get source mpd
    2. cd mpd*
    3. DEB_CONFIGURE_USER_FLAGS=--with-tremor fakeroot dpkg-buildpackage -us -uc (or as root without fakeroot)
    4. dpkg -i ../mpd_*.deb
  4. Configure MPD in /etc/mpd.conf
  5. If you don't want newer MPD versions from Debian to overwrite your custom package you can put it on hold: echo mpd hold | dpkg --set-selections
view · edit · print · history · Last edited by none.
Based on work by hs, Carsten, and bwalle.
Originally by bwalle.
Page last modified on October 02, 2009, at 02:01 AM