Here's the xbmc-server.cpp, make_xbmc-server, make_xbmcVideoLibraryScan, and xbmcVideoLibraryScan.cpp from various posts in this thread. I believe all of it being vicbitter's work.
Hell, I've been meaning to post the exact process I use on my Debian Squeeze system so that others can benefit form the work all the devs here have done. All credit in this goes to vicbitter, Odin, joelones, manxam, and probably some others that I'm forgetting. I take no credit in this. Just organizing and throwing it in a single post so that others won't have to hunt for it.
My process: (anything in a code box is a command in your Linux terminal.) And this is from a scratch Debian Squeeze system and I'm logged in as root.
I found a way to install Java a bit easier. You need to be able to add Launchpad PPA's in Squeeze. I'm also adding any Launchpad PPA as Ubuntu Precise.
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4631BBEA
Add the Java JRE 7 PPA in your /etc/apt/sources.list
add at the bottom:
deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main
Now add the keyring for it.
gpg --keyserver pgpkeys.mit.edu --recv-key c2518248eea14886
gpg -a --export c2518248eea14886 | sudo apt-key add -
Install all packages needed to compile xbmc within Squeeze
sudo apt-get update && sudo apt-get -y install git-core build-essential gawk pmount libtool nasm yasm automake cmake gperf zip unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libfribidi-dev liblzo2-dev libfreetype6-dev libsqlite3-dev libogg-dev libasound2-dev python-sqlite libglew-dev libcurl3 libcurl4-gnutls-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbisenc2 libsmbclient-dev libmysqlclient-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libenca-dev libxt-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev libsamplerate-dev libmpeg3-dev libflac-dev libiso9660-dev libass-dev libssl-dev fp-compiler gdc libmpeg2-4-dev libmicrohttpd-dev libmodplug-dev libssh-dev gettext cvs python-dev libyajl-dev libboost-thread-dev libplist-dev libusb-dev libudev-dev libtinyxml-dev libcap-dev autopoint libltdl-dev swig libgtk2.0-bin doxygen oracle-java7-installer
Install taglib as per Odin's post
tar xzf taglib-1.8.tar.gz
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_RELEASE_TYPE=Release .
Clone the XBMC GIT repository
git clone git://github.com/xbmc/xbmc.git
At this point, I place vicbitter's sources in ~/xbmc/xbmc. Since I'm logged in as root, and I'm in the /root folder, my path for that would be /root/xbmc/xbmc.
Change directories to /root/xbmc and build it.
I had to make xbmc-xrandr so that I could install xbmc properly.
Copy libxbmc.so to /lib
cp libxbmc.so /lib
Now install xbmc
Change directories to /root/xbmc/xbmc and build xbmc-server and xbmcVideoLibraryScan. Then copy it to the correct location
make -f make_xbmcVideoLibraryScan
make -f make_xbmc-server
cp xbmc-server /usr/local/lib/xbmc/xbmc-server.bin
cp xbmcVideoLibraryScan /usr/local/lib/xbmc/
You're done if you don't want it to start up with your NAS. If you do, continue on.
Download the init script in the right place and make it executable and install it.
chmod 744 xbmc
update-rc.d xbmc defaults
Just start it and you're done
It' should start on boot every time now.