I'm not sure how many people are interested in this but here it is... A guide on how to successfully compile the latest XBMC version from source and have it running on your Debian Squeeze machine.
Feel free to ask anything but bare in mind that I'm no Linux expert whatsoever. Something might be wrong, something might be missing or this whole procedure might not even work for you. Follow the guide below at your own risk, do not blame me if you screw up your system.
GUIDE
1) Make sure your '/etc/apt/sources.list' is something similar to this:
deb http://http.debian.net/debian/ squeeze main contrib non-free
deb-src http://http.debian.net/debian/ squeeze main contrib non-free
deb http://http.debian.net/debian/ squeeze-updates main contrib non-free
deb-src http://http.debian.net/debian/ squeeze-updates main contrib non-free
deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free
I also have OMV's repository defined in this file. You don't need to remove/comment it, but for every other repository, please do (you can restore them in the end).
2) Get the latest XBMC version from source:
2.1) In order to update the source (and clean old make files) and build a newer version:
3) Now we need to install all required dependencies to build XBMC from source, let's start. First update apt-get database and install the base dependencies:
sudo apt-get update
sudo apt-get install automake autopoint bison build-essential ccache cmake curl cvs default-jre fp-compiler gawk gdc gettext git-core gperf libasound2-dev libass-dev libavcodec-dev libavfilter-dev libavformat-dev libavutil-dev libbluetooth-dev libboost-dev libboost-thread-dev libbz2-dev libcap-dev libcdio-dev libcurl3 libcurl4-gnutls-dev libcurl4-gnutls-dev libcwiid-dev libcwiid1 libdbus-1-dev libenca-dev libflac-dev libfontconfig1-dev libfreetype6-dev libfribidi-dev libhal-dev libhal-storage-dev libiso9660-dev libjasper-dev libjpeg62-dev libltdl-dev liblzo2-dev libmad0-dev libmicrohttpd-dev libmodplug-dev libmpeg2-4-dev libmpeg3-dev libmysqlclient-dev libogg-dev libogg-dev libpcre3-dev libplist-dev libpng12-dev libpostproc-dev libsamplerate0-dev libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl1.2-dev libsmbclient-dev libsqlite3-dev libssh-dev libssl-dev libswscale-dev libtiff4-dev libtool libudev-dev libusb-dev libva-dev libva-x11-1=1.0.1-3 libva1=1.0.1-3 libvdpau-dev libvdpau1=0.4.1-2 libvorbisenc2 libx11-dev libxcb1-dev libxcb1=1.6-1+squeeze1 libxmu-dev libxrandr-dev libxrender-dev libxslt-dev libxt-dev libyajl-dev nasm pmount python-dev python-sqlite swig unzip yasm zip
3.1) Some required dependencies are too old in Squeeze repository so we need to backport them from Wheezy. Edit '/etc/apt/sources.list' and rename 'squeeze' to 'wheezy' for the following lines:
deb http://http.debian.net/debian/ squeeze main contrib non-free
deb-src http://http.debian.net/debian/ squeeze main contrib non-free
Then execute the following to install more dependencies:
sudo apt-get update
sudo apt-get install libglew-dev libpulse-dev libtinyxml-dev mesa-utils=8.0.1-2+b3
You should now restore '/etc/apt/sources.list' to the way it was, put back 'squeeze' instead of 'wheezy'. Don't forget to run 'sudo apt-get update' after any change to the 'sources.list' file.
3.2) We are not done with the required build dependencies, we still need a few more from different repositories. Edit '/etc/apt/sources.list' and add the following lines:
deb http://debian.oppserver.net/debian/ squeeze main contrib non-free
deb-src http://debian.oppserver.net/debian/ squeeze main contrib non-free
deb http://www.deb-multimedia.org/ squeeze main non-free
deb-src http://www.deb-multimedia.org/ squeeze main non-free
deb http://www.deb-multimedia.org/ squeeze-backports main
deb-src http://www.deb-multimedia.org/ squeeze-backports main
Then execute the following to install a few more dependencies:
sudo apt-get update
sudo apt-get install libbluray-dev libbluray1 libcec-dev libcec2 libcrystalhd-dev libcrystalhd3 libmp3lame-dev libnfs-dev libshairport-dev libva-egl1 libva-tpi1
Remove or comment out the lines just added to '/etc/apt/sources.list' if you wish. By this point, we are note going to change the 'sources.list' file anymore so make sure it looks exactly like it was before you started this guide. Don't forget to run 'sudo apt-get update' after any change to the 'sources.list' file.
4) We are still missing one last build dependency. This one however, will be build it from source. Just do this:
5) It's time to configure and compile XBMC...
Since we are building from source, these are unstable builds and debugging should probably be enabled if you need help. Personally, I've disabled debugging but it's your choice. To do that, just pass '--disable-debug' parameter to the configure command above. You can also enable/disable other settings here, look for the available options in the XBMC wiki or forums.
6) The only step missing is to install XBMC in our system. Just run the following:
This will install XBMC into '/usr/local/bin/xbmc'.
I don't have a graphical environment installed in my Debian Squeeze machine, only Xorg. I believe you can simply call 'xbmc' to run it but I personally do the following:
I've also added a new init script to autostart XBMC when the system boots. I've used the following method for this: http://wiki.xbmc.org/index.php…nux#Add_a_new_init_script
Done!
NOTES
- For now this seems to be working just fine. But bare in mind that Squeeze repository contains a lot of outdated packages, packages that are required to build XBMC from source (that's why we had to install some from Wheezy repository). If something does not work as expected or does not work at all, the culprit is probably an old package that needs to be updated in order to rebuild XBMC from source with the new dependency version.