Kadu for Debian --------------- This package uses CDBS (Common Debian Build System) to unpack sources, apply Debian-specific paches and build .deb binary packages. If you want to build Kadu for Debian as it is (meaning; without your own modifications) you simply do the following: $ mkdir ~/kadu-experimenting $ cd ~/kadu-experimenting $ dget http://ftp.debian.org/debian/pool/main/k/kadu/kadu_0.6.0.1-1.dsc dget is located in devscripts package, so you have to install it first. Also .dsc file's name is dependant on Kadu's version. OK, now you want to unpack source package: $ dpkg-source -x kadu_0.6.0.1-1.dsc It unpacks source package to kadu-0.6.0.2 directory. Inside it you have the the following: debian - directory containing all data files used by Debian building system to produce .deb files external - all additional Kadu plug-ins and icon/emoticon themes kadu-0.6.0.2.tar.bz2 - original Kadu tarball (the one, that is distributed by upstream). So the next step is to build it: $ cd kadu-0.6.0.2 $ dpkg-buildpackage -us -uc dpkg-buildpackage will unpack original tarball, apply Debian-specific patches (see debian/patches directory), compiles and builds .deb files. If you want to add your own modification, you probably want to experiment with sources already patched by debian/patches diff files. To do so you have to unpack orig tarball: $ debian/rules pre-build This will unpack kadu-0.6.0.2.tar.bz2 to build-tree directory. Now you have to apply paches: $ debian/rules patch You probably also want to unpack all additional stuff, like plugins, themes: $ sh debian/extract.sh `pwd` build-tree/kadu Now you have a build-dir/kadu directory, which contains unpacked Kadu source, with all additional stuff and patches applied. Kadu is autotools based, so inside build-tree/kadu: $ ./configure --enable-debug --prefix=~/kadu-experimenting/build $ make $ make install should be enough for you to do some hacking and testing. This way you build Kadu with debugging symbols and install it to ~/kadu-experimenting/build/bin/kadu To unapply all the patches, that were applied by debian/rules patch (all diff files from debian/patches directory), you just execute: $ debian/rules unpatch When you finally produce your own patch, you can add it to debian/patches directory and when building the package the standard way (dpkg-buildpackage) it will be automatically applied. The patch should be a unified format (-u option of patch command). You can use -p0, -p1 and -p2. Just use the one you prefer. If you want to publish your modified version, it is also a good idea to mark it with a version change. If you have already devscripts package installed, it's easy. Just run: $ dch -i This will open an editor with debian/changelog file with a new entry for you to fill in. When done, save it and quit. Than you may build it. But first clean the source package (removing all the build-tree, all stamps from debian directory): $ fakeroot debian/rules clean You'll find fakeroot in fakeroot package. Now build: $ dpkg-buildpackage -us -uc And you're done. Now you can delete ~/kadu-experimenting/build, since you don't need it any more. dpkg-buildpackage has created all binary packages (.deb files) and source package (.dsc, .diff.gz and orig.tar.gz -- the latter is of course the same as the one downloaded by dget in the beginning). -- Patryk Cisek Wed, 23 Jul 2008 09:46:52 +0200