Make the post-install script for building Debian packages more generic