Compiling Last.fm client/scrobbler on Fedora 17

From Nearline Storage
Jump to: navigation, search
#  Download latest version from http://www.last.fm/download
#  Download latest version of ffmpeg from http://ffmpeg.org/releases

#  Make sure that you have the prerqs
sudo yum install qt4 qt4-devel fftw3 fftw3-devel libsamplerate libsamplerate-devel ffmpeg ffmpeg-devel libgpod libgpod-devel phonon phonon-devel qtwebkit qtwebkit-devel yasm

#  Update ffmpeg to later release
cd ~/src
tar -jxvf ffmpeg-1.1.2.tar.bz2
cd ffmpeg-1.1.2
../ffmpeg.config.command
make
sudo rpm -e --nodeps ffmpeg ffmpeg-devel
sudo make install

#  Make sure that ld.so.conf includes /usr/local/lib64 and /usr/local/lib and run
sudo ldconfig

export PKG_CONFIG_PATH+="/usr/local/lib/pkgconfig/"

cd ~/src
mkdir lastfm
cd lastfm
tar -jxvf Last.fm-2.1.30.tar.bz2
cd liblastfm-1.0.5/
mkdir _build
cd _build
cmake ..
sudo make install
cd ../lastfm-desktop-2.1.30/

#  Apply patches
--- admin/qmake/1stparty.pro.inc.old    2013-02-21 10:18:44.614983221 -0500
+++ admin/qmake/1stparty.pro.inc        2013-02-21 09:48:24.153642500 -0500
@@ -17,7 +17,7 @@
 }
 CONFIG( lastfm ) {
     QT += core network xml
-    LIBS += -llastfm
+    LIBS += -llastfm -lbz2
     win32 {
         CONFIG += link_pkgconfig
         PKGCONFIG += lastfm
--- app/client/MediaDevices/IpodDevice_linux.cpp.old    2013-02-21 10:17:12.498383390 -0500
+++ app/client/MediaDevices/IpodDevice_linux.cpp        2013-02-21 09:47:28.933082493 -0500
@@ -34,7 +34,7 @@
 extern "C"
 {
     #include <gpod/itdb.h>
-    #include <glib/glist.h>
+    #include <glib.h>
 }

qmake-qt4 -recursive
make
sudo cp _bin/Last.fm /usr/local/bin/
sudo cp _bin/lib* /usr/local/lib64/

#  Make sure that ld.so.conf includes /usr/local/lib64 and /usr/local/lib and run
sudo ldconfig

Last.fm

#  To update
#  make clean && git pull