PHP APT parser is a script for parsing the Packages[.gz] and Sources[.gz]
files that APT uses to access Debian package
repositories.
Unofficial Debian package repository maintainers use it to let the users view the package listing
through a web browser.
Here's how:
debuild produces, to a web directory
of your choice. Then cd to that same directory and run the following commands:
apt-ftparchive sources ./ > Sources
apt-ftparchive packages ./ > Packages
gzip < Sources > Sources.gz
gzip < Packages > Packages.gz
parse-apt-files.inc from PHP-APT-Parser's project page at Alioth.
(Here's also a direct link to Subversion repository.) Copy it to the same directory as Sources and Packages.index.php in your favourite text editor and type something like:
<html>
<body>
<h1>My own Debian repository!</h1>
<?php
require_once("parse-apt-files.inc");
parse_and_list( "Packages.gz", "Sources.gz" );
?>
</body>
</html>
That's it! In this simple example the script takes care of the HTML layout for you, but you can also do it yourself you don't like the default view.
Visit the Project page at Alioth.