KGpg - Building from source code
KGpg can easily be built from the source code. This can become neccessary if you want to try out a new feature currently under development or if you face a problem and want to help fixing it.
The dependencies seldomly change. Since the kdelibs are in a feature freeze since a while building a new version of KGpg on an older version of KDE SC will usually work. In case you face a problem in an older version of KGpg and your distribution does not offer packages of a recent version, or you do not want to upgrade your whole workspace, building KGpg from sources should be your first action to try if the problem has not already been addresses.
Installing the dependencies
KGpg needs the development files of Qt, the basic KDE libraries (kdelibs) as well as the KDE PIM libraries (kdepimlibs). Since version 2.13 (KDE SC 4.14) KGpg also depends on the development headers of GPGme.
To configure the build environment CMake is required. Finally you need a C++ compiler and a tool to drive the build. On most Unix-like systems this will usually be make, but you may choose another one (e. g. Ninja).
Finally the git tool is needed to check out the source code in case you do not want to build from a tarball.
The different distributions give the required package different names, and sometimes they fail to record the dependencies from one package (especially the development header package) to another. Also the naming may change between different releases of the distribution. For this reason the command to install the required packages may look different for you.
zypper in cmake git libgpgme-devel libkdepimlibs4-devel make
apt-get install cmake g++ git kdepimlibs5-dev libboost-dev libgpgme11-dev make
Tested on Wheezy
Checking out the source code
git clone git://anongit.kde.org/kgpg
Updating the source code
Configuring the build
cmake -D KGPG_DEBUG_TRANSACTIONS=On -D CMAKE_BUILD_TYPE=Debug ../kgpg
This will give you a build that has all debugging information available (useful in case KGpg itself crashes) as well as printing of status information in case KGpg communicates with GnuPG.
To build just type make and wait for the build to finish.
Shut down the old version
In case an older version of KGpg is already running starting the newly built one will only tell the older one to raise, so you will actually not get the behavior of the new version. Either click Quit from the File menu or use the shortcut to trigger this action, usually Ctrl-Q. Please note that pressing Alt-F4 or closing the window will not quit the old KGpg instance in the default configuration, but will just cause it to hide in the system tray.
You can also tell KGpg to quit from the command line:
qdbus org.kde.kgpg /MainApplication quit
Enable debug printing
When you run KGpg from the command line it will print out some useful status information. This printing can be controlled using the tool kdebugdialog. Enter kgpg in the filter at the top of the application window and enable all entries you find. Please note that you do not need to enable the one labled kgpgconf, as that is a totally unrelated application.