Building Debian Packages with Ccache


Following on from a previous post about Using Ccache with Docker, here’s how to build a Debian packaging using Ccache.

I’ve been building a lot of Debian packages recently and Ccache has been instrumental in making rebuilds incredibly fast. Here’s the command I use to rebuild a package without having to mess around and actually modify the package at all:

$ debuild --preserve-envvar=CCACHE_DIR \
    --prepend-path=/usr/lib/ccache \
    -us -uc

Note that both the –preserve-envvar and –prepend-path options must be before -us and -uc. The former are debuild options and he latter dpkg-buildpackage options.

Related Posts

A Pattern for Unit Testing Completion Blocks in Objective-C

Exposing a HTTP endpoint for Docker

Installing Extra Packages on Boot2docker

Using Ccache with Docker