PHP APT parser is a script for parsing the
files that APT uses to access Debian package
Unofficial Debian package repository maintainers use it to let the users view the package listing
through a web browser.
Make some Debian packages and copy the files that (e.g.)
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
Or use special tools like
dak etc. to .
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
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.