Tuesday, June 10, 2008

Compiling Pidgin MTN

This post explains how to compile Pidgin from source, but not the stable Pidgin releases available for download on the website; instead, I'm talking about the latest development Pidgin version (often called "Pidgin MTN"), available via Monotone (a distributed version control system). See this post regarding compiling Monotone from source.

Step 1. Install Monotone version 0.36 or newer. If this version is not already available in your distro repositories, you must compile it from source.

Step 2. Think of a place you'll save the Pidgin Monotone database in.

mkdir /root/mtn_dbs
cd /root/mtn_dbs

Step 3. Fetch the Pidgin MTN database archive and unpack it.

wget http://developer.pidgin.im/static/pidgin.mtn.bz2
bzip2 -d pidgin.mtn.bz2

Step 4. MTN pull:

mtn pull -d pidgin.mtn --set-default pidgin.im "im.pidgin.*"

If you get this message:

mtn: misuse: database /root/mtn_dbs/pidgin.mtn is laid out according to an old schema
mtn: misuse: try 'mtn db migrate' to upgrade
mtn: misuse: (this is irreversible; you may want to make a backup copy first)
it means you need to "update" the scheme used by the Pidgin MTN database. Use this:

mtn -d pidgin.mtn db migrate
mtn pull -d pidgin.mtn --set-default pidgin.im "im.pidgin.*"

If everything was OK, you should see something very similar with:
mtn: setting default server to pidgin.im
mtn: setting default branch include pattern to 'im.pidgin.*'
mtn: setting default branch exclude pattern to ''
mtn: doing anonymous pull; use -kKEYNAME if you need authentication
mtn: connecting to pidgin.im
mtn: finding items to synchronize:
mtn: certificates | keys | revisions
mtn: 75,738 | 52 | 25,104
mtn: bytes in | bytes out | certs in | revs in
mtn: 199.8 k | 120.2 k | 137/137 | 34/34
mtn: successful exchange with pidgin.im
Step 5. MTN checkout in order to fetch the latest branches:

mtn -d pidgin.mtn co -b im.pidgin.pidgin _pidgin

This will create a _pidgin directory in your /root/mtn_dbs one.

cd _pidgin

Step 6. If you want full support for ALL features that Pidgin provides, you need to install the dependencies. I can't stress this enough. You won't probably need all of these, but it's just meant as an example. So, on a Debian / Ubuntu system, such as mine, which already has a few compilers and general build tools and gettext installed, the dependencies required to build ALL the Pidgin features will look like:

aptitude install libxss-dev intltool libstartup-notification0-dev libgtkspell-dev libgstreamer0.10-dev libmeanwhile-dev libdbus-glib-1-dev network-manager-dev libperl-dev tcl8.4-dev tk8.4-dev

Step 7. Time to compile Pidgin:

./autogen.sh --enable-debug

Normally, there shouldn't be any troubles if you hadn't missed anything from Step 6. out. (I usually build Pidgin with the "--enable-debug" switch.)

Step 8. If everything went OK in the compile stage, it's time to

make && make install

Your "Pidgin MTN" should now... work, unless you were really unlucky and fetched the sources just when a critical bug infiltrated in the developement process. :-) Good luck bug hunting!


Post a Comment