Murray's Blog

Building modified debian packages

I recently had to create modified versions of some debian packages, to apply some custom patches and use some special compilation options for a scratchbox environment. It was time that I learnt something about actually making debian packages. These were packages that Daniel Holbach couldn’t do for me, but he did explain some stuff, which I’ll note here for my reference. He’s not to blame for my errors.

To get existing debian package stuff, make a directory and do this:

This gives you 3 files, of these types:

You don’t need to uncompress and apply all that manually. There are tools to help:

That should confirm that you can actually build the packages. If you are missing some dependencies, try “apt-get build-dep yourpackagname”.

Now you might want to change some things before building the packages again. For instance:

After you have changed the sources and the debian files appropriately, debuild (or dpkg-buildpackage – see above), should build the packages again, putting them in the parent directory. It will even create the .dsc and .diff.gz files, completing the circle.

Exit mobile version