How to build and install plugins for kdevelop

Partially taken from: http://flowersopenlab.weebly.com/4/post/2011/11/building-and-adding-mercurial-plugin-to-kdevelop.html
Thank you for the information. The font is a little hard to read though. That said I was beating my head against the wall until I found your post.

Kdevelop is a great IDE for C, C++, PHP, Python as well as many other languages. Kdevelop uses kdetext so it includes all of the syntax highlighting support that kate does.
If you used quanta plus in the past, the new KDE4 version is essentially kdevelop with php support and some additional plugins.

Install kdevelop
sudo apt-get install kdevelop

In order to compile plugins for kdevelop you will need the dev packages installed.

sudo apt-get install build-essentials kdevelop-dev
There are probably more dependencies so I will update the list next time I do a clean install.

Then goto https://projects.kde.org/projects/playground/devtools
and navigate to the plugin you want, make a dir somewhere and checkout the code.

Example for version 1.4 of the kdev-upload plugin

cd ~/Downloads
mkdir -p kdevelop/plugins
cd kdevelop/plugins
git clone git://anongit.kde.org/kdev-upload
cd kdev-upload
git checkout 1.4

Now for the important bit. Before building add the following to the top of CMakeLists.txt
If you do not do this then the plugin will not be detected

Note: this is for ubuntu. If you are using a different distro you will probably need to modify these paths.

set(SERVICES_INSTALL_DIR /usr/share/kde4/services)
set(DATA_INSTALL_DIR /usr/share/kde4/apps)
set(PLUGIN_INSTALL_DIR /usr/lib/kde4)

Now you are ready to build and install the module

mkdir build
cd build
cmake ../
make
sudo make install

Now open kdevelop and your new plugin should be there.