Modify packaging so it builds cleanly on stock Debian 6.

Also added a build script.