Disclaimer. This operation was performed on 2nd July 2015, on a fresh install of Kubuntu 15.04 in a virtualbox machine.
Before proceeding with compiling from sources we need to install some packages:
$ sudo apt-get install git cmake g++
Git is necessary for cloning the digikam repository
$ git clone git://anongit.kde.org/digikam-software-compilation.git $ cd digikam-software-compilation $ ./download-repos
At this point you must have all digikam sources.
Since Kubuntu 15.04 does not have any Qt4 packages necessary to compile digikam 4.12, we need to install them.
$ sudo apt-get install qt4-default qt4-qmake