Want to hack on Akregator? Here is how to set up the environment.

Hello KDE community!

First I want to thank everyone who showed interest for my last post and for the “Akregator reborn” project in general.

The good news of today is that Christophe Giboudeaux (krop) did an amazing job in the last week with moving all the stuff that concerns Akregator in a new branch of kdepim. In the following, I will explain more in details what happened. I will also give some tips for the non-experts on how to set up an environment to comfortably hack on Akregator.

As you might remember from my previous post, the plan is porting Akregator to the Akonadi framework. Until the last week, approaching Akregator’s code for someone who hadn’t followed its development in the last years was something not trivial. Things changed a bit and, as a first step, I am going to explain which repositories you should refer to if you want to hack on Akregator. Before the repositories restyling of the last week, the situation was quite confusing. The Akonadi-based version of Akregator, along with the krss library, used to be in the branch work/akonadi_port of kdepim, the new (well, not that new anymore…) resource krsslocal was in my personal scratch repository and the non-Akonadified Akregator was being developed in kdepim master. Everything is now in a new branch of kdepim named akregator_port. In particular, in that branch you will now find two versions of Akregators:

  1. akregator, based on Metakit;
  2. akregator2, based on Akonadi.

The most immediate goal is making akregator2 complete and stable. Moreover, since the development of akregator (the Metakit one) went ahead during the last years, another goal is merging all the bug fixes and the polishing that were done in it to akregator2. Probably many of them don’t apply to the new code, but some of them might (UI fixes for examples).

Just to recap, in case you want to hack on Akregator, you need to build:

  • kdelibs KDE/4.8;
  • akonadi >= 1.7;
  • kdepimlibs from master branch;
  • kdepim from akregator_port branch.

WARNING: akregator2 in kdepim akregator_port is unstable and not suitable for daily use yet. Please use it only for testing and development purposes.

When things will become more stable, their placement will become more logical, possibly as follows: akregator2 will replace akregator in the master branch of kdepim, krss will be moved to kdepimlibs and all the RSS-related akonadi resources, such as krsslocal, will go to kdepim-runtime.

Here are some tips for beginners on how to build the above-mentioned libraries and programs. If you are not a beginner, you can skip to the end of the post and start hacking!

The weekend in which I updated my setup for the new environment on my machine turned out to be quite frustrating. The initial idea was reporting each step that led to the setup on this post, but once I had managed to make it working, I started to think: “mmm, why should I waste my time writing up yet another how-to for building a piece of KDE? Probably what I did was not that difficult either…”. What convinced me to write the following tips is Leslie Hawthorn’s amazing essay from “Open Advice”, which reminded me that in fact this is the perfect moment for sharing basic knowledge, this is time when I know “…Everything They’ve Forgotten”.

The process of building KDE strongly depends on the Linux distribution you are using. Of course, the more outdated the packages are, the harder it will be to make things working. This disclaimer is due to the fact that I am using Debian stable and the packages over here are not the most recent ones…
An advice: mixing stable and testing packages of a distribution usually doesn’t end up very well. I would rather recommend to install from the sources those packages that are not up-to-date in your distro repositories.
If it’s the first time you are building a piece of KDE, you may want to read a bit of official documentation. In particular, the following is mandatory reading that you must not skip:

In my first attempt, I tried to use kdesrc-build to build all the modules, but I didn’t succeed (thanks yottabit and PovAddict for the help with this try). If you manage to make it working, please let me know.

Edited: Frank (fosterfeld – maintainer of Akregator) is using kderc-build to build everything in the above setup, except kdepim-runtime and kdepim. You can try to make his script working on your machine.

I switched to a more manual procedure and things went pretty smooth. I still found extremely useful those scripts that you can download on techbase.kde.org. Don’t forget to customize them according to your preferences. For instance, I built my own Qt, so I uncommented and modified the line

export QTDIR=/usr/local/Trolltech/Qt-4.8.0

in .build-config.

The following is the minimum set of packages that you need to install (notice that they are listed in the same order as the one in which you need to build them):

Qt (4.8.0 suggested) > DBusMenuQt > kde-support (akonadi, attica, soprano, strigi, shared-desktop-ontologies) > kdelibs KDE/4.8 > kdepimlibs master > kdepim akregator_branch

The libdbusmenu-qt from the KDE repository was not working on my environment, so I used the one from the official repository. Notice that the gitorious version of libdbusmenu is no longer maintained and you need to use the Launchpad repository (again, only if it’s not already included in your distribution). The following command will clone libdbusmenu-qt from the Launchpad repository:

bzr branch lp:libdbusmenu-qt

Another tip: the option -b <name_of_the_branch> of the git clone command clones and checkouts the specified branch. For example,

git clone -b akregator_port kde:kdepim

will clone and checkout our beloved repo :).
Lastly, when you configure kdepim, run cmake with the option -DKDEPIM_BUILD_MOBILE=FALSE.

If you master KDE development and you haven’t skipped the last paragraph, feel free to comment with corrections and improvements about the above tips.

If you have questions or comment, you can find me (zimba12) in the #akregator and #kontact channels on Freenode, you are welcome to send me an email or just leave a comment below.

The end of this post is dedicated to another exciting news from the last week: Dan Vrátil (progdan, dvratil) wrote KDE Google Reader, a client for reading Google Reader feeds on KDE. Even though it’s just a preview and Dan wrote it “purely out of interest”, it’s still very nice to see a lot of fuss around the RSS/KDE matter. Perhaps someday he will write a GReader Akonadi resource that will integrate with the future Akregator.


6 thoughts on “Want to hack on Akregator? Here is how to set up the environment.

  1. @SciK: sorry for the late answer. I am planning to address all the comments in future posts. About your question: the point of my project is in fact aimed at enriching Akregator with synchronization features. The idea is having all the data in the cloud (using ownCloud) and having local Akonadi resources that synchronize with the ownCloud server. I believe this will provide a much better mechanism than manually synchronizing Akregator’s metakit files, as you are doing now (just curious, how exactly are you doing?). For example, it will be possible to share the same data also with, say, your Android aggregator app.

  2. Thanks for the answer, it clarifies things a lot. :)

    (I synchonize akregator’s metakit files on my external hard drive with unison, as I never use both of my machines at the same time (they’re at different locations).)

  3. Wonderful to see some activity in akregator! As a long time user I have just a single thing that I find lacking in it: Bayesian filtering. It would be absolutely wonderful if I could teach akregator what kinds of rss items from my feeds I am interested / not interested in reading. Just like email software have spam/ham filters, except in this case it would be “interested”/”not interested” filter.

    For example, I do not care to read about fashion, movie/pop stars etc in my “world news” feed, but there is no easy way of filtering those out either, but with a bit of teaching a Bayesian filter would do a very good job at it.

Leave a Reply

Your email address will not be published. Required fields are marked *