Transmission is a lightweight Bittorrent Client that I installed on my plug computer to manage my downloads remotely, by using the web interface provided.
As I said in my previous entry, only the Jaunty release of Ubuntu can run on the SheevaPlug, and transmission is only available in version 1.51 Jaunty repositories. As this version is quite young (Chrome not properly supported, incomplete download directory not used...), I decided to follow this great guide to build version 2.04 of Transmission, which is the one available in Maverick, the current stable release of Ubuntu.
Though my method was a little bit different and I would like to explain it.
Setting up a "minimal" build environment
If we look at the Transmission wiki, we see that a lot of packages are required to build it. As the SheevaPlug itself is really limited in terms of system storage (512MB), I wanted to get the minimal dependancies required to build Transmission without the GUI, which is totally useless as we install it on a headless box.
First, I downloaded the sources from here and extracted the Tarball.
Then I used the following command, that checks the build environment for a headless install:
./configure –disable-gtk
As soon as a missing lib or package is detected, an error is raised. So I proceeded in an iterative manner, installing the needed packages one at a time. Here is the list of what I had to install:
- build-essential
- libcurl4-openssl-dev
- intltool
- libevent-dev
apt-get install build-essentials libcurl4-openssl-dev intltool
Building and installing libevent-dev
I downloaded the sources from Maverick repository. They are available here. The version is 1.4.13 so it matches the ./configure requirements. Extract, and rename the directory to libevent-dev-1.4.13 (I'll explain why).
To check that build requirements are met on your system run:
./configure
Then build and install (apt-get install checkinstall if you don't have it):
make
checkinstall
If checkinstall asks you for some additional information, juste leave everything by default and spam the enter key.
Why checkinstall instead of make install? Because checkinstall includes the make install, and will also create a package for this lib, that will be recognized by the ./configure of Transmission. The reason why we renamed the libevent-dev folder is that the package will be named correctly and recognized by the configure.
Building and installing Transmission
Go back to your Transmission folder and run again:
./configure -disable-gtk
Now everything should be OK, and we are ready to build! Just make sure to make a copy of your settings.json if you already used Transmission before.
Remove the old Transmission if any:
aptitude purge transmission-daemon
Then build and install:
make
make install
Now we have to make an init.d script by following these instructions. Also create a transmission user without password as explained. The settings.json should be located here:
/home/transmission/.config/transmission-daemon/settings.json
If you made a backup of this file, I recommend to merge your settings manually as the format of the file may have changed.
Run !
/etc/init.d/transmission-daemon start
Conclusion
I wanted to see how much disk space I gained with this "iterative method". After having completed the build of Transmission, I simply ran the following command:
apt-get install build-essential automake autoconf libtool pkg-config libcurl4-openssl-dev intltool libxml2-dev libgtk2.0-dev libnotify-dev libglib2.0-dev
The result speaks for itself:
0 upgraded, 145 newly installed, 0 to remove and 0 not upgraded.
Need to get 33.0MB of archives.
After this operation, 130MB of additional disk space will be used.
Need to get 33.0MB of archives.
After this operation, 130MB of additional disk space will be used.