1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-12 01:16:27 +01:00
13 Clementine on Raspberry Pi
Andreas edited this page 2016-05-22 15:40:55 +02:00

This is a tutorial on how to build Clementine on the Raspberry Pi. I used a Raspberry Pi 3 and the Raspian OS.

Note: Building Clementine on the Pi 1 takes a lot of time, around 8 hours. Compiling on the Raspberry Pi 2 or 3 is significantly faster.

What you need

  • A Raspberry Pi obviously (Pi 2 or 3 recommended)
  • At least a 8GB flash card (16GB recommended)
  • Raspbian. Other distros might work as well.

Install prebuild version on Raspberry Pi

Install Clementine runtime dependencies

Raspbian doesn't have all necessary dependencies installed by default, so we have to do this now.

sudo apt-get install libcrypto++ libechonest2.1 libgpod4 liblastfm1 libprotobuf9 libqjson0 libqt4-opengl libqt4-sql gstreamer1.0-plugins-ugly gstreamer1.0-pulseaudio

Install

Download the precompiled version 1.3.1 from the GitHub releases:

wget https://github.com/clementine-player/Clementine/releases/download/1.3.1/clementine_1.3.1.jessie_armhf.deb
sudo dpkg -i clementine_1.3.1.jessie_armhf.deb

Setting up Clementine

Start Clementine with ./clementine. The first start takes quite long as Clementine has to setup the database. After you see the main window, you should disable moodbar generation and glowing. They take too many resources you need for playback.

Now you can add your music to your library and listen to it!

Note: Clementine is quite slow on the Raspberry Pi 1, so be patient when using it. Clementine Remote works very well on the Raspberry Pi. Perfomance on the Raspberry Pi 2 or 3 should be much better.

Spotify

Download and libspotify 12.1.103 beta from here

wget https://developer.spotify.com/download/libspotify/libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release.tar.gz
tar -xf libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release.tar.gz
cd libspotify-12.1.103-Linux-armv6-bcm2708hardfp-release/
sudo make install

Download the clementine-spotifyblob compiled for armhf from here and paste it to .config/Clementine/spotifyblob/version16-32bit/blob (blob is the filename)

mkdir -p .config/Clementine/spotifyblob/version16-32bit/
cp clementine-spotifyblob-armhf .config/Clementine/spotifyblob/version16-32bit/blob

Compile on Raspberry Pi

Dependencies

The same as on any linux distro:

sudo apt-get install liblastfm-dev libtag1-dev gettext libboost-dev \
    libboost-serialization-dev libqt4-dev qt4-dev-tools libqt4-opengl-dev \
    cmake libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
    libglew1.5-dev libqjson-dev libgpod-dev libplist-dev \
    libusbmuxd-dev libmtp-dev libcdio-dev \
    protobuf-compiler libprotobuf-dev libcrypto++-dev \
    libfftw3-dev libsparsehash-dev libsqlite3-dev libpulse-dev \
    libqtwebkit-dev libechonest-dev libchromaprint-dev libqca2-dev

Get the source

We will compile the stable 1.3.1 release. If you want to compile the master branch, don't execute git checkout release-1.3.

git clone https://github.com/clementine-player/Clementine.git && cd Clementine
git checkout release-1.3
cd bin

Preparing the build enviroment

If you still use an old Raspberry Pi 1 with 512MB ram, you have to enable swap to compile Clementine:

sudo dd if=/dev/zero of=swapfile bs=1M count=512
sudo mkswap swapfile
sudo swapon swapfile

Compile

cmake ..
make -j4

After compiling

A swap file on a flash memory is not healty, so we remove the created swap file after compiling.

sudo swapoff swapfile
sudo rm swapfile

Next steps

See Install prebuild version on Raspberry Pi