Added some hints how to write the ports module.

This commit is contained in:
Wolfram Schneider 1998-11-02 17:31:59 +00:00
parent aa4c96270c
commit e80ab34a29
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/www/; revision=3720

View file

@ -1,10 +1,10 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN" [
<!ENTITY base CDATA "..">
<!ENTITY date "$Date: 1998-10-27 12:00:21 $">
<!ENTITY date "$Date: 1998-11-02 17:31:59 $">
<!ENTITY title "FreeBSD Documentation Project: Current projects">
<!ENTITY % includes SYSTEM "../includes.sgml"> %includes;
]>
<!-- $Id: current.sgml,v 1.4 1998-10-27 12:00:21 wosch Exp $ -->
<!-- $Id: current.sgml,v 1.5 1998-11-02 17:31:59 wosch Exp $ -->
<html>
&header;
@ -155,11 +155,60 @@
<li>Rewrite cvsweb.cgi cgi script from scratch using a
RCS perl Module</li>
<li>Rewrite man.cgi cgi script and fix some bugs.</li>
<li>Write a ports INDEX perl Module. Modify the
cgi script url.cgi, ports.cgi and pds.cgi to use
this module</li>
</ul>
<li>Write a ports INDEX perl Module.
</ul>
<h3>Here are some hints how to write the ports module</h3>
<h4>A single line in /usr/ports/INDEX looks like</h4>
<pre>
xfig-3.2.2|/usr/ports/graphics/xfig|/usr/X11R6|A drawing program for X11|/usr/ports/graphics/xfig/pkg/DESCR|ports@FreeBSD.ORG|graphics x11|XFree86-3.3.2 Xaw3d-1.3 jpeg-6b xpm-3.4k|XFree86-3.3.2 Xaw3d-1.3 jpeg-6b netpbm-94.3.1 tiff-3.4 transfig-3.2 xpm-3.4k
</pre>
<h4>The format is</h4>
<pre>
distribution-name|port-path|installation-prefix|comment| \
description-file|maintainer|categories|build deps|run deps
</pre>
<h4>The above INDEX line parsed into an anonymous hash object</h4>
<pre>
$port = {
DISTRIBUTION_NAME => 'xfig-3.2.2',
PORT_PATH => '/usr/ports/graphics/xfig',
INSTALLATION_PREFIX => '/usr/X11R6',
COMMENT => 'A drawing program for X11',
DESCRIPTION_FILE => '/usr/ports/graphics/xfig/pkg/DESCR',
MAINTAINER => 'ports@FreeBSD.ORG',
CATEGORIES => ['graphics', 'x11'],
BUILD_DEPS => ['XFree86-3.3.2', 'Xaw3d-1.3', 'jpeg-6b',
'xpm-3.4k'],
RUN_DEPS => ['XFree86-3.3.2', 'Xaw3d-1.3', 'jpeg-6b',
'netpbm-94.3.1', 'tiff-3.4', 'transfig-3.2',
'xpm-3.4k']
};
</pre>
<h4>Now we need some functions</h4>
<ul>
<li>Print a $port object as HTML output
<li>Print a $port object as ASCII output
<li>Find all objects which are maintained by user XYZ
<li>Find all objects which are in category XYZ
<li>Find all objects which run/build depend on port XYZ
<li>Find all objects which match the string XYZ in DISTRIBUTION_NAME
or COMMENT
<li>Sort objects by DISTRIBUTION_NAME
</ul>
<h4>Finally</h4>
<p>Modify the cgi script url.cgi, ports.cgi , pds.cgi and the
script portindex to use this module.
<h3><font color="#660000">Translations of the FreeBSD Documentation</font></h3>