Andreas Marschke: Making KDE packages for Debian

Andreas Marschke: Making KDE packages for Debian: "

So you have written this sexy app that does all these sexy things and works nice withe KDE. You are usually using Debian and want to make a Debian package for your application, of course.

You usually start out with this line :


dh_make -e user@email.com -c gplv3 -f ../app_1.0.tar.gz -s -p app-1.0


This will usually do the following:

dh_make: make a subdirectory called debian/ in your programs root directory



-e user@email.com: sets the packager email-address to user@email.com

-c gplv3: sets the license to the GNU GENERAL PUBLIC LICENSE

-f ../app_1.0.tar.gz: makes the package ../app_1.0.tar.gz to the base package for the Debian package.

-s: defines it as a single binary

-p app-1.0: defines the package name as app-1.0


So now everything is fine you got your /debian directory Yay! But now you start editing debian/control to set the dependencies the package type and so on and so forth.

But now you get to this debian/rules file. As your KDE application obviously uses cmake you know what to do to usually build a cmake application.



mkdir build

cd build/

cmake ..

make


And if you want to install it of course:


sudo make install


But now you want to apply this to your debian/ile which doesn’t do that. During the hole packaging process

dpkg-buildpackage stays fulltime in your packages root directory and throws ” seems to have no CMakeLists.txt ” at you.

Now you have 2 options. (1) Screw up your root directory with temp and build stuff from cmake or (2) do replace the

debian/rules code with this:



#!/usr/bin/make -f

# -*- makefile -*-


include /usr/share/cdbs/1/rules/debhelper.mk

include /usr/share/pkg-kde-tools/makefiles/1/cdbs/kde.mk

#if you have docs as manpages

DEB_INSTALL_MANPAGES_ = appname.1


build/appname:

#if you have docbook stuff

docbook2x-man debian/appname.1.docbook


install/appname::

rm debian/appname/usr/lib/*.so


clean::

rm -f appname.1


This will do the trick to install the application according to CMakeLists.txt and will do what you want.


If this comes up along the comments: CPack is not applicable for the packaging of debian packages as they are not matching the rules of the debian packaging system.


"