Building Transmission from source
31 Oct 2015 |
4 min. |
Transmission1 is a open-source, cross-platform bittorrent client. There are multiple remote clients you can use to connect to a running transmission daemon (through its RPC API) to manage your downloads.
Our goal, compile and create a snap package for the latest stable release of Transmission (2.84), particularly, its daemon.
To build Transmission (written in C) we will need a few tools installed first; there are also some dependencies/libraries that we have to compile in order to get the final binaries. We will need to provide those compiled libraries in our snap package too (because our application will run isolated in Ubuntu Core).
I will be running all this building steps in my host computer, running Ubuntu 64 bits. This means I’ll be getting amd64 binaries as a result (which means, after packaging we will have an amd64 snap package, runnable in our Snappy VM). In a future post I will hopefully describe how to build Transmission for ARM, and how to package it in a multi-architecture snap.
Installing required tools
Getting dependencies and Transmission sources
To build Transmission we will need the following libraries:
The latest versions of each should work too.
I created a directory where I’m going to download sources (deps), and another where compiled libraries will be installed:
Let’s download and compile dependencies:
(note we compile against our recently compiled zlib library)
(note we compile against our recently compiled zlib and openssl libraries)
We will compile Transmission, daemon only, against our just compiled libraries.
If everything went ok, you should have your Transmission binaries in the build/transmission/bin directory.
To give it a try you could do:
And that’s it, we have transmission daemon compiled and running, completely isolated from system dependencies. Next steps will be:
- Manually snap packaging Transmission
- Build Transmission for ARM
- Build multi-architecture snap package
- Build Transmission using snapcraft