<p>What is the web interface tool that Debian or Ubuntu use for publicizing their custom repositories on the web?</p>

<p>Like <a href="http://www.debian.org/distrib/packages" rel="nofollow noreferrer">packages.debian.org</a></p>

<p>Is such tool open sourced, so that it could be re-used for a custom repository?</p>

You really only need something to parse the Packages file, no?
Example Packages file
. I've never attempted to do this before, but I cant imagine it being a horrendous task.
Edit: Well it would technically be spidering the repo to process a series of Packages files, but that wouldn't make it too much tougher.
Edit 2: Unless you specify the Packages files manually. Then it would be simple again.