jasonwryan.com

Miscellaneous ephemera…

Building rtorrent on Debian Squeeze

image

After setting up my server, I wanted to use it as a torrent box. The version of rtorrent in the Debian stable repositories is 0.8.6, which is unfortunate as support for magnet links was introduced in 0.8.7.

To remedy this, I decided to build the current stable version of rtorrent, 0.8.9. At the same time—seeing as I was getting my hands dirty anyway—I thought I’d patch in colour support.

This is a straightforward two-step process. First, build the current version of libtorrent, 0.12.9:

1
2
3
4
5
wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.12.9.tar.gz
tar -xvf libtorrent-0.12.9.tar.gz
cd libtorrent-0.12.9/
./configure && make
sudo checkinstall

Once libtorrent is successfully built and installed, you can begin the rtorrent build:

1
2
3
wget http://rtorrent.rakshasa.no/downloads/rtorrent-0.8.9.tar.gz
tar -xvf rtorrent-0.8.9.tar.gz
cd rtorrent-0.8.9/

Then, if you want colour support, you need the patch. I used the version in the AUR, but you can also grab a copy from a paste site:

1
2
3
wget -O canvas_colour.patch http://paste.geekosphere.org/twy7
mv canvas_colour.patch src/
patch -uNp1 -i canvas_colour.patch

The patch should apply cleanly. Then specify where libtorrent is installed to ensure that it is linked during the rtorrent build:

1
2
3
./configure --libdir=/usr/local/lib
make
sudo checkinstall

Once again, this should compile cleanly and you will now have rtorrent with colour and magnet link support installed in /usr/local/bin/rtorrent.

Notes

I prefer to use checkinstall so that self-installed applications are tracked by Apt.

Comments