Document that Perl modules to parse the Ports INDEX file have been
written - all we need to do now is change the CGI scripts! :-)
This commit is contained in:
parent
cacae8729f
commit
daa30c6160
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=10689
1 changed files with 5 additions and 61 deletions
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN" [
|
||||
<!ENTITY base CDATA "..">
|
||||
<!ENTITY date "$FreeBSD: www/en/docproj/current.sgml,v 1.26 2001/07/30 23:45:56 nik Exp $">
|
||||
<!ENTITY date "$FreeBSD: www/en/docproj/current.sgml,v 1.27 2001/07/31 00:24:23 murray Exp $">
|
||||
<!ENTITY title "FreeBSD Documentation Project: Current projects">
|
||||
<!ENTITY % includes SYSTEM "../includes.sgml"> %includes;
|
||||
]>
|
||||
|
@ -126,67 +126,11 @@
|
|||
<p><b>Responsible:</b>
|
||||
<<a href="mailto:doc@FreeBSD.org">doc@FreeBSD.org</a>>,
|
||||
Wolfram Schneider <<a href="mailto:wosch@FreeBSD.org">wosch@FreeBSD.org</a>></p>
|
||||
<p><b>Synopsis:</b></p>
|
||||
<ul>
|
||||
<li>Write a ports INDEX perl Module.</li>
|
||||
</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>
|
||||
<li>Print a $port object as ASCII output</li>
|
||||
<li>Find all objects which are maintained by user XYZ</li>
|
||||
<li>Find all objects which are in category XYZ</li>
|
||||
<li>Find all objects which run/build depend on port XYZ</li>
|
||||
<li>Find all objects which match the string XYZ in DISTRIBUTION_NAME
|
||||
or COMMENT</li>
|
||||
<li>Sort objects by DISTRIBUTION_NAME</li>
|
||||
</ul>
|
||||
|
||||
<h4>Finally</h4>
|
||||
|
||||
<p>Modify the cgi script url.cgi, ports.cgi , pds.cgi and the
|
||||
script portindex to use this module.</p>
|
||||
|
||||
<p><b>Contact</b> Nik Clayton <<a
|
||||
href="mailto:nik@FreeBSD.ORG">nik@FreeBSD.ORG</a>> for a
|
||||
first <a href="http://www.FreeBSD.org/~wosch/pipm/">snapshot</a>
|
||||
of the ports module.</p>
|
||||
<p><b>Synopsis:</b> Modify the CGI scripts url.cgi, ports.cgi,
|
||||
pds.cgi and the script portindex to use the Perl <a
|
||||
href="http://people.FreeBSD.org/~tom/portpm/">FreeBSD::Ports</a>
|
||||
modules. These modules also need thorough testing.</p>
|
||||
|
||||
<a name="multilingualwebscripts"></a>
|
||||
<h3><font color="#660000">Multilingual Web scripts</font></h3>
|
||||
|
|
Loading…
Reference in a new issue