- XMLify the ports/ section of the webpages. With this change the whole

set of webpages should be now buildable in XML, however the build
  mechanism of the multimedia/ and ports/ sections do not really fit our
  infrastructure so these should probably be redesigned later to use
  XSLT.

Approved by:	doceng (implicit)
This commit is contained in:
Gabor Kovesdan 2012-08-09 21:23:44 +00:00
parent 74586f38c6
commit 4e23586af4
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/projects/sgml2xml/; revision=39346
22 changed files with 219 additions and 584 deletions

View file

@ -78,7 +78,7 @@ ports.size:
# master-index.sgml, statistics.ent, <category>.sgml
CATEGORYLIST=`grep "^[a-z]" categories | sed -e s"/,.*//"`
categories-alpha.sgml: ${INDEX} categories categories.descriptions \
packages.exists portindex ports.ent ports.size .NOTMAIN
packages.exists ports.ent ports.size .NOTMAIN
${RM} -f categories-alpha.sgml categories-grouped.sgml \
master-index.sgml statistics.ent
for categoryfile in ${CATEGORYLIST}; do \

View file

@ -2,7 +2,7 @@
# $FreeBSDde: de-www/ports/Makefile.inc,v 1.1 2007/03/31 14:27:06 jkois Exp $
# basiert auf: 1.10
PORTINDEX= ${PERL} ${.CURDIR}/portindex
PORTINDEX= ${PERL} ${.CURDIR}/../../../en_US.ISO8859-1/htdocs/ports/portindex
INDEX= INDEX
PINDEX= ports/${INDEX}

View file

@ -1,396 +0,0 @@
#!/usr/bin/perl -w
# convert a ports INDEX file to SGML files
#
# by John Fieber <jfieber@FreeBSD.org>
# Mon May 13 10:31:58 EST 1996
# $FreeBSD$
# $FreeBSDde: de-www/ports/portindex,v 1.1 2007/03/31 14:27:06 jkois Exp $
# basiert auf: 1.57
############################################################
use strict;
use POSIX;
use IO::File;
my $base = "";
my $baseHTTP = "";
my $urlcgi = "";
my $packagesURL = "";
my $today = getdate();
my %p = ();
# Load local config file. You can override in portindex.conf
# the variables for the default web and the ftp server. This
# make it easy to maintain a local web mirror and let the
# URL point to yourself and not to the standard FreeBSD FTP server.
my $config = $0 . '.' . 'conf';
do $config if -f $config;
# This is the base of where we ftp stuff from
my $ftpserver;
if ($ENV{'MASTER_FTP_SERVER'}) {
$ftpserver = $ENV{'MASTER_FTP_SERVER'};
} else {
$ftpserver = 'ftp://ftp.FreeBSD.org' if !$ftpserver;
}
$baseHTTP = $base if !$baseHTTP;
my $baseFTP = "$ftpserver/pub/FreeBSD/ports/ports";
my $baseCVSWEB = 'http://www.FreeBSD.org/cgi/cvsweb.cgi/';
$urlcgi = 'http://www.FreeBSD.org/cgi/url.cgi' if !$urlcgi;
$packagesURL = "$ftpserver/pub/FreeBSD/ports/i386/packages-stable/All/"
if !$packagesURL;
# support tar on the fly or gzip'ed tar on the fly
my $ftparchive = '';
$ftparchive = 'tar' if !defined $ftparchive;
# ports download sources script
my $pds = 'http://www.FreeBSD.org/cgi/pds.cgi';
# better layout and link to the sources
if ($urlcgi) {
$baseHTTP = $urlcgi . '?' . $baseHTTP;
}
my %packages = ();
my %category_description = ();
my @category_groups = ();
my %category_groups = ();
packages_exist('packages.exists');
category_description(($ARGV[1] || '.') . '/categories' );
category_groups(($ARGV[1] || '.') . '/categories.descriptions' );
main();
sub getdate {
return POSIX::strftime("Last modified: %d-%B-%Y",localtime);
}
sub header {
my $fh = shift;
my $htext = shift;
#local($fh, $htext) = @_;
print $fh <<EOF;
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//FreeBSD//DTD XHTML 1.0 Transitional-Based Extension//EN"
"http://www.FreeBSD.org/XML/doc/share/sgml/xhtml10-freebsd.dtd" [
<!ENTITY base '..'>
<!ENTITY date "<em>$today</em>">
<!ENTITY % navinclude.ports "INCLUDE">
<!ENTITY % ports.ent SYSTEM "ports.ent">
%ports.ent;
<!ENTITY email 'ports'>
%statistics.ent;
]>
<html>
<head>
<title>'$htext'</title>
</head>
<body class="navinclude.port">
&searchform;
<hr/>
EOF
}
sub footer {
my $fh = shift;
my $ftext = shift;
#local ($fh, $ftext) = @_;
print $fh <<EOF;
$ftext
</body>
</html>
EOF
}
sub packages_exist {
my $file=shift;
my %p;
#local($file, *p) = @_;
open(P, $file) || do {
warn "open $file: $!\n";
warn "Cannot create packages links\n";
return 1;
};
while(<P>) {
chop;
$packages{$_} = 1;
}
close P;
}
sub category_description {
my $file = shift;
open(P, $file) || do {
warn "open $file: $!\n";
warn "Cannot find category description\n";
return 1;
};
while(<P>) {
# ignore comments
next if /^\s*#/;
if (/^\s*([^,]+),\s*"([^"]+)",\s*([A-Z]+)/) {
$category_description{$1}{desc}=$2;
$category_description{$1}{group}=$3;
}
}
close P;
}
sub category_groups {
my $file = shift;
open(P, $file) || do {
warn "open $file: $!\n";
warn "Cannot find category groups\n";
return 1;
};
while(<P>) {
# ignore comments
next if /^\s*#/;
if (/^\s*([^,]+),\s*(.+)/) {
$category_groups{$1}=$2;
push(@category_groups,$1);
}
}
close P;
}
sub main {
my @master=();
my %stats;
my %catkey;
my %data;
my $portnumber = 0;
my $sep = "<B>:</B>";
my $moutf = new IO::File;
my $outf = new IO::File;
my $mindex = new IO::File;
my $statistics = new IO::File;
open(INDEX, $ARGV[0]);
$portnumber = "0";
while (<INDEX>) {
chop;
s/&/&amp;/g;
s/</&lt;/g;
s/>/&gt;/g;
# Read a record
my ($name, $loc, $prefix, $desc, $ldesc, $owner, $cats,
$bdep, $rdep, $www) = split('\|');
# Check for double hyphens in the name (--).
$name =~ s/--/-/g;
# Split the categories into an array
my @cat = split("[ \t]+", $cats);
$catkey{$name} = $cat[0];
my $sourcepath = $loc;
$sourcepath =~ s%/usr/%%;
foreach my $i (sort(@cat)) {
$stats{$i}++;
# figure out the FTP url
$loc =~ s/\/usr\//$baseCVSWEB/;
$ldesc =~ s/\/usr\//$baseHTTP/;
# The name description and maintainer
$name =~ s/,.*//g;
$name =~ s/\++//g;
$data{$i} .= "<dt><b><a name=\"$name\"></a><a href=\"$loc$ftparchive\">$name</a></b></dt>";
$data{$i} .= "<dd>$desc<br/><a href=\"$ldesc\">Long description</a>";
if ($packages{"$name.tbz"}) {
$data{$i} .= qq{ | <a href="$packagesURL$name.tbz">Package</a>};
} elsif ($packages{"$name.tgz"}) {
$data{$i} .= qq{ | <a href="$packagesURL$name.tgz">Package</a>};
}
$data{$i} .= qq{ | <a href="$pds?$sourcepath">Sources</a>};
if ($www ne "") {
$data{$i} .= qq{ | <a href="$www">Main Web Site</a>};
}
my $ownerurl = $owner;
$ownerurl =~ s/&lt;/</g;
$ownerurl =~ s/&gt;/>/g;
$data{$i} .=
"<br/><i>Maintained by:</i> <a href=\"mailto:$ownerurl\">$owner</a>";
# If there are any dependencies, list them
if ($bdep ne "" || $rdep ne "") {
$data{$i} .= "<br/><i>Requires:</i> ";
my @dep = split(/ /, "$bdep $rdep");
my $last = '';
foreach my $j (sort @dep) {
next if $j eq $last;
$last = $j;
$data{$i} .= " <a href=\"##$j##.html#$j\">$j</a>,";
}
# remove the trailing comma
chop $data{$i};
}
# If the port is listed in more than one category, throw
# in some cross references
if ($#cat > 0) {
$data{$i} .= "<br/><em>Also listed in:</em> ";
foreach my $j (@cat) {
if ($j ne $i) {
if ($j eq $cat[0]) {
$data{$i} .= " <strong><a href=\"$j.html#$name\">\u$j</a></strong>,";
}
else {
$data{$i} .= " <a href=\"$j.html#$name\">\u$j</a>,";
}
}
}
# remove the trailing comma
chop($data{$i});
}
$data{$i} .= "<p></p></dd>\n"
}
# Add an entry to the master index
# workaround for SGML bug, `--' is not allowed in comments
my $sname = $name;
$sname =~ s/--/-=/g;
$master[$portnumber] =
"<!-- $sname --><strong><a href=\"$cat[0].html#$name\">$name</a></strong> " .
" -- <em>$desc</em><br/>\n";
$portnumber++;
}
# create categories-grouped.sgml and <category>.sgml
$moutf->open(">categories-grouped.sgml");
header($moutf, "FreeBSD Ports Categories Listed By Groups");
print $moutf <<EOF;
<a name=\"top\"></a>
EOF
if ($portnumber eq '0') {
print $moutf "<p>none found</p>\n";
} else {
foreach my $cg (@category_groups) {
print $moutf "<h3>",$category_groups{$cg},"</h3>\n";
print $moutf "<ul>\n";
foreach my $key (sort(keys(%stats))) {
next if ($category_description{$key}{group} ne $cg);
# For the master file...
print $moutf
"<li><a href=\"$key.html\">\u$key</a> <em>($stats{$key})</em>";
if ($category_description{$key}{desc}) {
print $moutf " -- " . $category_description{$key}{desc};
}
# Someone forgot to add a category to the description file
# or there is a typo in the category field.
else {
warn "No description found for category: ``$key''!\n";
warn "Please fix me or send an E-Mail to doc\@FreeBSD.org\a\n";
sleep(3);
}
print $moutf "</li>\n";
# Create the category file
$outf->open(">$key.sgml");
header($outf, "FreeBSD Ports: \u$key");
if ($category_description{$key}{desc}) {
print $outf "<h3>", $category_description{$key}{desc}, "</h3>\n";
}
print $outf "<dl>\n";
my $d = join("\n", sort(split(/\n/, $data{$key})));
$d =~ s/##([^#]*)##/$catkey{$1}/g;
print $outf $d;
print $outf "</dl>\n";
footer($outf, "<p></p><a href=\"#top\">top</a>" .
" -- <a href=\"master-index.html\">Index</a>");
$outf->close;
}
print $moutf "</ul>\n";
}
}
footer($moutf, "");
$moutf->close;
# create categories-alpha.sgml
$moutf->open(">categories-alpha.sgml");
header($moutf, "FreeBSD Ports Categories Listed Alphabetically");
print $moutf <<EOF;
<a name=\"top\"></a>
EOF
if ($portnumber eq '0') {
print $moutf "<p>none found</p>\n";
} else {
print $moutf "<ul>\n";
foreach my $key (sort(keys(%stats))) {
print $moutf
"<li><a href=\"$key.html\">\u$key</a> <em>($stats{$key})</em>";
if ($category_description{$key}{desc}) {
print $moutf " -- " . $category_description{$key}{desc};
print $moutf "</li>\n";
}
}
print $moutf "</ul>\n";
}
footer($moutf, "");
$moutf->close;
# Create master-index.sgml
$mindex->open(">master-index.sgml");
header($mindex, "FreeBSD Ports Collection Index");
print $mindex "<p>\n";
print $mindex sort @master;
print $mindex "</p>";
footer($mindex, "<a href=\"#top\">top</a>");
$mindex->close;
# Create statistics.ent
$statistics->open(">statistics.ent");
# doesn't seem to work:
# print $statistics "<!ENTITY date '<em>$today</em>'>\n";
my $ptgzsize = `cat ports.size 2>/dev/null` || "";
if ($ptgzsize =~ /^\d+$/) {
$ptgzsize = sprintf("%.0f", $ptgzsize/(1024*1024));
print $statistics "<!ENTITY ports.size 'about $ptgzsize megabytes'>\n";
} else {
warn "Unknown size for ports.tar.gz\n";
print $statistics "<!ENTITY ports.size 'several tens of megabytes'>\n";
}
print $statistics "<!ENTITY ports.count '$portnumber'>\n";
$statistics->close;
close(INDEX);
}

View file

@ -57,7 +57,6 @@ Makefile.gen: categories-alpha.sgml categories-grouped.sgml index.sgml \
${ECHO_CMD} -n " $$categoryfile.sgml" >> Makefile.gen; \
done
${ECHO_CMD} >> Makefile.gen
.endif
.if defined(CLUSTER_MACHINE)
PORTS_TARGZ_URL?= ftp://ftp-master.FreeBSD.org/pub/FreeBSD/ports/ports/ports.tar.gz

View file

@ -3,6 +3,7 @@
"http://www.FreeBSD.org/XML/doc/share/sgml/xhtml10-freebsd.dtd" [
<!ENTITY base '..'>
<!ENTITY title 'About FreeBSD Ports'>
<!ENTITY % ports.ent SYSTEM "ports.ent">
%ports.ent;
<!ENTITY email 'ports'>
%statistics.ent;
@ -17,7 +18,7 @@
&searchform;
<HR>
<hr/>
<p>The FreeBSD Ports and Packages Collection offers a simple way for
users and administrators to install applications. There are currently
@ -42,7 +43,7 @@ be committed.
contains any patches necessary to make the original application source
code compile and run on FreeBSD. Installing an application is as
simple as downloading the port, unpacking it and typing
<a href="http://www.freebsd.org/cgi/man.cgi?query="make""><TT>make</TT></a>
<a href="http://www.freebsd.org/cgi/man.cgi?query=make"><tt>make</tt></a>
in the port directory. However, the most convenient (and common) method
is to download the framework for the entire list of ports by installing the
<!--<a href="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/ports/ports.tar.gz">-->
@ -52,21 +53,21 @@ thousands of applications right at your fingertips.
</p>
<p>
Each port's <TT>Makefile</TT> automatically fetches the
Each port's <tt>Makefile</tt> automatically fetches the
application source code, either from a local disk, CD-ROM or via
<a href="http://www.freebsd.org/cgi/man.cgi?query="ftp""><TT>ftp</TT></a>,
<a href="http://www.freebsd.org/cgi/man.cgi?query=ftp"><tt>ftp</tt></a>,
unpacks it on your system, applies the patches, and compiles. If
all went well, a simple <TT>make install</TT> will install the
all went well, a simple <tt>make install</tt> will install the
application and register it with the package system.</p>
<p>For most ports, a precompiled <TT>package</TT> also exists, saving
<p>For most ports, a precompiled <tt>package</tt> also exists, saving
the user the work of having to compile anything at all. Each port
contains a link to its corresponding package and you may either simply
download that file and then run the
<a href="http://www.freebsd.org/cgi/man.cgi?query="pkg"_add"><TT>pkg_add</TT></a>
<a href="http://www.freebsd.org/cgi/man.cgi?query=pkg_add"><tt>pkg_add</tt></a>
command
on it or you can simply grab the link location and hand it straight
to <TT>pkg_add</TT> since it is capable of accepting FTP URLs as
to <tt>pkg_add</tt> since it is capable of accepting FTP URLs as
well as filenames.</p>
</body>

View file

@ -3,6 +3,7 @@
"http://www.FreeBSD.org/XML/doc/share/sgml/xhtml10-freebsd.dtd" [
<!ENTITY base '..'>
<!ENTITY title 'Installing the FreeBSD Ports Collection'>
<!ENTITY % ports.ent SYSTEM "ports.ent">
%ports.ent;
<!ENTITY email 'ports'>
%statistics.ent;
@ -17,10 +18,10 @@
&searchform;
<HR>
<hr/>
<p>If you are installing FreeBSD from CD-ROM or an ftp site, the
<a href="&base;/cgi/man.cgi?query="sysinstall""><TT>sysinstall</TT></a>
<a href="&base;/cgi/man.cgi?query=sysinstall"><tt>sysinstall</tt></a>
application will allow you to install the Ports Collection directly.</p>
<p>However, if you are not installing using that method, you may

View file

@ -5,6 +5,7 @@
# by John Fieber <jfieber@FreeBSD.org>
# Mon May 13 10:31:58 EST 1996
# $FreeBSD$
# basiert auf: 1.57
############################################################
@ -63,7 +64,7 @@ category_groups(($ARGV[1] || '.') . '/categories.descriptions' );
main();
sub getdate {
return POSIX::strftime("Last modified: %d-%B-%Y",localtime);
return POSIX::strftime("%d-%B-%Y", localtime);
}
sub header {
@ -71,21 +72,28 @@ sub header {
my $htext = shift;
#local($fh, $htext) = @_;
print $fh <<EOF;
<!DOCTYPE html PUBLIC "-//FreeBSD//DTD HTML 4.01 Transitional-Based Extension//EN" [
<!ENTITY base CDATA '..'>
<!ENTITY date "<em>$today</em>">
<!ENTITY title '$htext'>
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//FreeBSD//DTD XHTML 1.0 Transitional-Based Extension//EN"
"http://www.FreeBSD.org/XML/doc/share/sgml/xhtml10-freebsd.dtd" [
<!ENTITY base '..'>
<!ENTITY % navinclude.ports "INCLUDE">
<!ENTITY % ports.ent SYSTEM "ports.ent">
%ports.ent;
<!ENTITY email 'ports'>
%statistics.ent;
]>
<html>&header;
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>$htext</title>
<cvs:keyword xmlns:cvs=\"http://www.FreeBSD.org/XML/CVS\">x x x $today x x x</cvs:keyword>
</head>
<body class="navinclude.port">
&searchform;
<hr>
<hr/>
EOF
}
@ -97,9 +105,8 @@ sub footer {
print $fh <<EOF;
$ftext
&footer;
</BODY>
</HTML>
</body>
</html>
EOF
}
@ -206,17 +213,19 @@ sub main {
$ldesc =~ s/\/usr\//$baseHTTP/;
# The name description and maintainer
$data{$i} .= "<DT><B><A NAME=\"$name\"></A><A HREF=\"$loc$ftparchive\">$name</A></B> ";
$name =~ s/,.*//g;
$name =~ s/\++//g;
$data{$i} .= "<dt><b><a name=\"$name\"></a><a href=\"$loc$ftparchive\">$name</a></b></dt>";
$data{$i} .= "<DD>$desc<BR><A HREF=\"$ldesc\">Long description</A>";
$data{$i} .= "<dd>$desc<br/><a href=\"$ldesc\">Long description</a>";
if ($packages{"$name.tbz"}) {
$data{$i} .= qq{ | <a href="$packagesURL$name.tbz">Package</a>};
} elsif ($packages{"$name.tgz"}) {
$data{$i} .= qq{ | <a href="$packagesURL$name.tgz">Package</a>};
}
$data{$i} .= qq{ | <A HREF="$pds?$sourcepath">Sources</A>};
$data{$i} .= qq{ | <a href="$pds?$sourcepath">Sources</a>};
if ($www ne "") {
$data{$i} .= qq{ | <a href="$www">Main Web Site</a>};
@ -226,17 +235,17 @@ sub main {
$ownerurl =~ s/&lt;/</g;
$ownerurl =~ s/&gt;/>/g;
$data{$i} .=
"<BR><I>Maintained by:</I> <A HREF=\"mailto:$ownerurl\">$owner</A>";
"<br/><i>Maintained by:</i> <a href=\"mailto:$ownerurl\">$owner</a>";
# If there are any dependencies, list them
if ($bdep ne "" || $rdep ne "") {
$data{$i} .= "<BR><I>Requires:</I> ";
$data{$i} .= "<br/><i>Requires:</i> ";
my @dep = split(/ /, "$bdep $rdep");
my $last = '';
foreach my $j (sort @dep) {
next if $j eq $last;
$last = $j;
$data{$i} .= " <A HREF=\"##$j##.html#$j\">$j</A>,";
$data{$i} .= " <a href=\"##$j##.html#$j\">$j</a>,";
}
# remove the trailing comma
chop $data{$i};
@ -245,21 +254,21 @@ sub main {
# If the port is listed in more than one category, throw
# in some cross references
if ($#cat > 0) {
$data{$i} .= "<BR><EM>Also listed in:</EM> ";
$data{$i} .= "<br/><em>Also listed in:</em> ";
foreach my $j (@cat) {
if ($j ne $i) {
if ($j eq $cat[0]) {
$data{$i} .= " <STRONG><A HREF=\"$j.html#$name\">\u$j</A></STRONG>,";
$data{$i} .= " <strong><a href=\"$j.html#$name\">\u$j</a></strong>,";
}
else {
$data{$i} .= " <A HREF=\"$j.html#$name\">\u$j</A>,";
$data{$i} .= " <a href=\"$j.html#$name\">\u$j</a>,";
}
}
}
# remove the trailing comma
chop($data{$i});
}
$data{$i} .= "<P></P></DD>\n"
$data{$i} .= "<p></p></dd>\n"
}
# Add an entry to the master index
@ -268,8 +277,8 @@ sub main {
my $sname = $name;
$sname =~ s/--/-=/g;
$master[$portnumber] =
"<!-- $sname --><STRONG><A HREF=\"$cat[0].html#$name\">$name</A></STRONG> " .
" -- <EM>$desc</EM><BR>\n";
"<!-- $sname --><strong><a href=\"$cat[0].html#$name\">$name</a></strong> " .
" -- <em>$desc</em><br/>\n";
$portnumber++;
}
@ -279,20 +288,20 @@ sub main {
header($moutf, "FreeBSD Ports Categories Listed By Groups");
print $moutf <<EOF;
<A NAME=\"top\"></A>
<a name=\"top\"></a>
EOF
if ($portnumber eq '0') {
print $moutf "<P>none found</P>\n";
print $moutf "<p>none found</p>\n";
} else {
foreach my $cg (@category_groups) {
print $moutf "<H3>",$category_groups{$cg},"</H3>\n";
print $moutf "<UL>\n";
print $moutf "<h3>",$category_groups{$cg},"</h3>\n";
print $moutf "<ul>\n";
foreach my $key (sort(keys(%stats))) {
next if ($category_description{$key}{group} ne $cg);
# For the master file...
print $moutf
"<LI><A HREF=\"$key.html\">\u$key</A> <em>($stats{$key})</em>";
"<li><a href=\"$key.html\">\u$key</a> <em>($stats{$key})</em>";
if ($category_description{$key}{desc}) {
print $moutf " -- " . $category_description{$key}{desc};
}
@ -304,7 +313,7 @@ EOF
warn "Please fix me or send an E-Mail to doc\@FreeBSD.org\a\n";
sleep(3);
}
print $moutf "</LI>\n";
print $moutf "</li>\n";
# Create the category file
$outf->open(">$key.sgml");
@ -312,16 +321,16 @@ EOF
if ($category_description{$key}{desc}) {
print $outf "<h3>", $category_description{$key}{desc}, "</h3>\n";
}
print $outf "<DL>\n";
print $outf "<dl>\n";
my $d = join("\n", sort(split(/\n/, $data{$key})));
$d =~ s/##([^#]*)##/$catkey{$1}/g;
print $outf $d;
print $outf "</DL>\n";
footer($outf, "<p></p><A HREF=\"#top\">top</A>" .
" -- <A HREF=\"master-index.html\">Index</A>");
print $outf "</dl>\n";
footer($outf, "<p></p><a href=\"#top\">top</a>" .
" -- <a href=\"master-index.html\">Index</a>");
$outf->close;
}
print $moutf "</UL>\n";
print $moutf "</ul>\n";
}
}
@ -334,22 +343,22 @@ EOF
header($moutf, "FreeBSD Ports Categories Listed Alphabetically");
print $moutf <<EOF;
<A NAME=\"top\"></A>
<a name=\"top\"></a>
EOF
if ($portnumber eq '0') {
print $moutf "<P>none found</P>\n";
print $moutf "<p>none found</p>\n";
} else {
print $moutf "<UL>\n";
print $moutf "<ul>\n";
foreach my $key (sort(keys(%stats))) {
print $moutf
"<LI><A HREF=\"$key.html\">\u$key</A> <em>($stats{$key})</em>";
"<li><a href=\"$key.html\">\u$key</a> <em>($stats{$key})</em>";
if ($category_description{$key}{desc}) {
print $moutf " -- " . $category_description{$key}{desc};
print $moutf "</LI>\n";
print $moutf "</li>\n";
}
}
print $moutf "</UL>\n";
print $moutf "</ul>\n";
}
footer($moutf, "");
@ -359,19 +368,16 @@ EOF
$mindex->open(">master-index.sgml");
header($mindex, "FreeBSD Ports Collection Index");
print $mindex "<P>\n";
print $mindex "<p>\n";
print $mindex sort @master;
print $mindex "</P>";
footer($mindex, "<A HREF=\"#top\">top</A>");
print $mindex "</p>";
footer($mindex, "<a href=\"#top\">top</a>");
$mindex->close;
# Create statistics.ent
$statistics->open(">statistics.ent");
# doesn't seem to work:
# print $statistics "<!ENTITY date '<em>$today</em>'>\n";
my $ptgzsize = `cat ports.size 2>/dev/null` || "";
if ($ptgzsize =~ /^\d+$/) {
$ptgzsize = sprintf("%.0f", $ptgzsize/(1024*1024));

View file

@ -1,17 +1,17 @@
<!-- $FreeBSD$ -->
<!ENTITY searchform '<FORM METHOD="GET" ACTION="http://www.FreeBSD.org/cgi/ports.cgi">
<!ENTITY searchform '<form xmlns="http://www.w3.org/1999/xhtml" method="get" action="http://www.FreeBSD.org/cgi/ports.cgi">
Search ports for:
<INPUT NAME="query" VALUE="">
<SELECT NAME="stype">
<OPTION VALUE="all">All</OPTION>
<OPTION VALUE="name">Package Name</OPTION>
<OPTION VALUE="text">Description</OPTION>
<OPTION VALUE="pkgdescr">Long description</OPTION>
<OPTION VALUE="maintainer">Maintainer</OPTION>
<OPTION VALUE="requires">Requires</OPTION>
</SELECT>
<INPUT TYPE="submit" VALUE="Submit">
</FORM>'>
<input name="query" value=""/>
<select name="stype">
<option value="all">All</option>
<option value="name">Package Name</option>
<option value="text">Description</option>
<option value="pkgdescr">Long description</option>
<option value="maintainer">Maintainer</option>
<option value="requires">Requires</option>
</select>
<input type="submit" value="Submit"/>
</form>'>
<!ENTITY % statistics.ent SYSTEM "statistics.ent">

View file

@ -3,6 +3,7 @@
"http://www.FreeBSD.org/XML/doc/share/sgml/xhtml10-freebsd.dtd" [
<!ENTITY base '..'>
<!ENTITY title 'FreeBSD Ports -- References'>
<!ENTITY % ports.ent SYSTEM "ports.ent">
%ports.ent;
<!ENTITY email 'ports'>
%statistics.ent;
@ -17,7 +18,7 @@
&searchform;
<HR>
<hr/>
<p>To start learning more about ports and packages, see
<a href="&base;/doc/en_US.ISO8859-1/books/handbook/ports.html">
@ -62,9 +63,9 @@
-->
<li>The manual pages for
<a href="&base;/cgi/man.cgi?query="ftp""><TT>ftp</TT></a>,
<a href="&base;/cgi/man.cgi?query="pkg"_add"><TT>pkg_add</TT></a>, and
<a href="&base;/cgi/man.cgi?query="ports""><TT>ports</TT></a>.
<a href="&base;/cgi/man.cgi?query=ftp"><tt>ftp</tt></a>,
<a href="&base;/cgi/man.cgi?query=pkg_add"><tt>pkg_add</tt></a>, and
<a href="&base;/cgi/man.cgi?query=ports"><tt>ports</tt></a>.
</li>
<li>The

View file

@ -3,6 +3,7 @@
"http://www.FreeBSD.org/XML/doc/share/sgml/xhtml10-freebsd.dtd" [
<!ENTITY base '..'>
<!ENTITY title 'Searching FreeBSD Ports'>
<!ENTITY % ports.ent SYSTEM "ports.ent">
%ports.ent;
%statistics.ent;
<!ENTITY email 'ports'>
@ -17,7 +18,7 @@
&searchform;
<HR>
<hr/>
<p>
The form above will allow you to search for ports on this site.
@ -26,8 +27,8 @@ A completed search will take you to a
</p>
<p>However, if you already have the Ports Collection installed on
your machine, you may also search by changing to the <TT>/usr/ports</TT>
directory and performing <TT>make search name=</TT><em>string</em>.
your machine, you may also search by changing to the <tt>/usr/ports</tt>
directory and performing <tt>make search name=</tt><em>string</em>.
See <a href="http://cvsweb.FreeBSD.org/ports/Mk/bsd.port.subdir.mk">
bsd.port.subdir.mk</a> for all the options.
</p>

View file

@ -3,6 +3,7 @@
"http://www.FreeBSD.org/XML/doc/share/sgml/xhtml10-freebsd.dtd" [
<!ENTITY base '..'>
<!ENTITY title 'Updating FreeBSD Ports'>
<!ENTITY % ports.ent SYSTEM "ports.ent">
%ports.ent;
<!ENTITY email 'ports'>
%statistics.ent;
@ -17,13 +18,13 @@
&searchform;
<HR>
<hr/>
<p>
The ports listed on these web pages are continually being updated.
It is strongly recommended that you refresh the entire collection
together, as many ports depend on other parts of the tree, even
where that might seem counterintuitive (e.g. <TT>japanese/</TT>.)
where that might seem counterintuitive (e.g. <tt>japanese/</tt>.)
</p>
<p>Changes that affect the entire port system are now documented in the
@ -47,7 +48,7 @@ Installing Applications: Packages and Ports</a>, a section of the
FreeBSD Handbook</a>; the section of the Porter's Handbook called
<a href="&base;/doc/en_US.ISO8859-1/books/porters-handbook/keeping-up.html">
Keeping Up</a>; and the
<a href="&base;/cgi/man.cgi?query="ports""><TT>ports manual page</TT></a>.
<a href="&base;/cgi/man.cgi?query=ports"><tt>ports manual page</tt></a>.
</p>
</body>

View file

@ -63,7 +63,6 @@ Makefile.gen: categories-alpha.sgml categories-grouped.sgml index.sgml \
${ECHO_CMD} -n " $$categoryfile.sgml" >> Makefile.gen; \
done
${ECHO_CMD} >> Makefile.gen
.endif
.if defined(CLUSTER_MACHINE)
PORTS_TARGZ_URL?= ftp://ftp-master.FreeBSD.org/pub/FreeBSD/ports/ports/ports.tar.gz

View file

@ -3,6 +3,7 @@
"http://www.FreeBSD.org/XML/doc/share/sgml/xhtml10-freebsd.dtd" [
<!ENTITY base '..'>
<!ENTITY title 'FreeBSD Ports について'>
<!ENTITY % ports.ent SYSTEM "ports.ent">
%ports.ent;
<!ENTITY email 'ports'>
%statistics.ent;

View file

@ -3,6 +3,7 @@
"http://www.FreeBSD.org/XML/doc/share/sgml/xhtml10-freebsd.dtd" [
<!ENTITY base '..'>
<!ENTITY title 'FreeBSD Ports Collection のインストール'>
<!ENTITY % ports.ent SYSTEM "ports.ent">
%ports.ent;
<!ENTITY email 'ports'>
%statistics.ent;

View file

@ -65,7 +65,7 @@ main();
sub getdate {
# return ": $year 年 $mon 月 $mday 日";
return POSIX::strftime("最終更新日: %d-%B-%Y",localtime);
return POSIX::strftime("%d-%B-%Y", localtime);
}
sub header {
@ -73,21 +73,29 @@ sub header {
my $htext = shift;
#local($fh, $htext) = @_;
print $fh <<EOF;
<!DOCTYPE html PUBLIC "-//FreeBSD//DTD HTML 4.01 Transitional-Based Extension//EN" [
<!ENTITY base CDATA '..'>
<!ENTITY date "<em>$today</em>">
<!ENTITY title '$htext'>
<?xml version="1.0" encoding="eucJP"?>
<!DOCTYPE html PUBLIC "-//FreeBSD//DTD XHTML 1.0 Transitional-Based Extension//EN"
"http://www.FreeBSD.org/XML/doc/share/sgml/xhtml10-freebsd.dtd" [
<!ENTITY base '..'>
<!ENTITY % navinclude.ports "INCLUDE">
<!ENTITY % ports.ent SYSTEM "ports.ent">
%ports.ent;
<!ENTITY email 'ports'>
%statistics.ent;
]>
<html>&header;
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>$htext</title>
<cvs:keyword xmlns:cvs=\"http://www.FreeBSD.org/XML/CVS\">x x x $today x x x</cvs:keyword>
</head>
<body class="navinclude.port">
&searchform;
<hr>
<hr/>
EOF
}
@ -99,9 +107,8 @@ sub footer {
print $fh <<EOF;
$ftext
&footer;
</BODY>
</HTML>
</body>
</html>
EOF
}
@ -171,7 +178,7 @@ sub main {
my %descLANG;
my $portnumber = 0;
my $sep = "<B>:</B>";
my $sep = "<b>:</b>";
my $moutf = new IO::File;
my $outf = new IO::File;
@ -228,16 +235,18 @@ sub main {
$ldesc =~ s/\/usr\//$baseHTTP/;
# The name description and maintainer
$data{$i} .= "<DT><B><A NAME=\"$name\"></A><A HREF=\"${loc}${ftparchive}\">$name</A></B> ";
$name =~ s/,.*//g;
$name =~ s/\++//g;
$data{$i} .= "<dt><b><a name=\"$name\"></a><a href=\"${loc}${ftparchive}\">$name</a></b></dt> ";
$data{$i} .= "<DD>$desc<BR><A HREF=\"$ldesc\">詳しい説明</A>";
$data{$i} .= "<dd>$desc<br/><a href=\"$ldesc\">詳しい説明</a>";
if ($packages{"$name.tbz"}) {
$data{$i} .= qq{ | <a href="$packagesURL$name.tbz">パッケージ</a>};
} elsif ($packages{"$name.tgz"}) {
$data{$i} .= qq{ | <a href="$packagesURL$name.tgz">パッケージ</a>};
}
$data{$i} .= qq{ | <A HREF="$pds?$sourcepath">ソース</A>};
$data{$i} .= qq{ | <a href="$pds?$sourcepath">ソース</a>};
if ($www ne "") {
$data{$i} .= qq{ | <a href="$www">Main Web Site</a>};
@ -247,17 +256,17 @@ sub main {
$ownerurl =~ s/&lt;/</g;
$ownerurl =~ s/&gt;/>/g;
$data{$i} .=
"<BR><I>保守担当者:</I> <A HREF=\"mailto:$ownerurl\">$owner</A>";
"<br/><i>保守担当者:</i> <a href=\"mailto:$ownerurl\">$owner</a>";
# If there are any dependencies, list them
if ($bdep ne "" || $rdep ne "") {
$data{$i} .= "<BR><I>必要なもの:</I> ";
$data{$i} .= "<br/><i>必要なもの:</i> ";
my @dep = split(/ /, "$bdep $rdep");
my $last = '';
foreach my $j (sort @dep) {
next if $j eq $last;
$last = $j;
$data{$i} .= " <A HREF=\"##$j##.html#$j\">$j</A>,";
$data{$i} .= " <a href=\"##$j##.html#$j\">$j</a>,";
}
# remove the trailing comma
chop $data{$i};
@ -266,21 +275,21 @@ sub main {
# If the port is listed in more than one category, throw
# in some cross references
if ($#cat > 0) {
$data{$i} .= "<BR><EM>ここにも含まれています:</EM> ";
$data{$i} .= "<br/><em>ここにも含まれています:</em> ";
foreach my $j (@cat) {
if ($j ne $i) {
if ($j eq $cat[0]) {
$data{$i} .= " <STRONG><A HREF=\"$j.html#$name\">\u$j</A></STRONG>,";
$data{$i} .= " <strong><a href=\"$j.html#$name\">\u$j</a></strong>,";
}
else {
$data{$i} .= " <A HREF=\"$j.html#$name\">\u$j</A>,";
$data{$i} .= " <a href=\"$j.html#$name\">\u$j</a>,";
}
}
}
# remove the trailing comma
chop($data{$i});
}
$data{$i} .= "<P></P></DD>\n"
$data{$i} .= "<p></p></dd>\n"
}
# Add an entry to the master index
@ -289,8 +298,8 @@ sub main {
my $sname = $name;
$sname =~ s/--/-=/g;
$master[$portnumber] =
"<!-- $sname --><STRONG><A HREF=\"$cat[0].html#$name\">$name</A></STRONG> " .
" -- <EM>$desc</EM><BR>\n";
"<!-- $sname --><strong><a href=\"$cat[0].html#$name\">$name</a></strong> " .
" -- <em>$desc</em><br/>\n";
$portnumber++;
}
@ -300,20 +309,20 @@ sub main {
header($moutf, "FreeBSD Ports -- グループによる分類");
print $moutf <<EOF;
<A NAME=\"top\"></A>
<a name=\"top\"></a>
EOF
if ($portnumber eq '0') {
print $moutf "<P>none found</P>\n";
print $moutf "<p>none found</p>\n";
} else {
foreach my $cg (@category_groups) {
print $moutf "<H3>",$category_groups{$cg},"</H3>\n";
print $moutf "<UL>\n";
print $moutf "<h3>",$category_groups{$cg},"</h3>\n";
print $moutf "<ul>\n";
foreach my $key (sort(keys(%stats))) {
next if ($category_description{$key}{group} ne $cg);
# For the master file...
print $moutf
"<LI><A HREF=\"$key.html\">\u$key</A> <em>($stats{$key})</em>";
"<li><a href=\"$key.html\">\u$key</a> <em>($stats{$key})</em>";
if ($category_description{$key}{desc}) {
print $moutf " -- " . $category_description{$key}{desc};
}
@ -324,7 +333,7 @@ EOF
warn "Please fix me or send an E-Mail to doc\@FreeBSD.org\a\n";
sleep(3);
}
print $moutf "</LI>\n";
print $moutf "</li>\n";
# Create the category file
@ -333,16 +342,16 @@ EOF
if ($category_description{$key}{desc}) {
print $outf "<h3>", $category_description{$key}{desc}, "</h3>\n";
}
print $outf "<DL>\n";
print $outf "<dl>\n";
my $d = join("\n", sort(split(/\n/, $data{$key})));
$d =~ s/##([^#]*)##/$catkey{$1}/g;
print $outf $d;
print $outf "</DL>\n";
footer($outf, "<p></p><A HREF=\"#top\">top</A>" .
" -- <A HREF=\"master-index.html\">Index</A>");
print $outf "</dl>\n";
footer($outf, "<p></p><a href=\"#top\">top</a>" .
" -- <a href=\"master-index.html\">Index</a>");
$outf->close;
}
print $moutf "</UL>\n";
print $moutf "</ul>\n";
}
}
@ -355,22 +364,22 @@ EOF
header($moutf, "FreeBSD Ports -- アルファベット順");
print $moutf <<EOF;
<A NAME=\"top\"></A>
<a name=\"top\"></a>
EOF
if ($portnumber eq '0') {
print $moutf "<P>none found</P>\n";
print $moutf "<p>none found</p>\n";
} else {
print $moutf "<UL>\n";
print $moutf "<ul>\n";
foreach my $key (sort(keys(%stats))) {
print $moutf
"<LI><A HREF=\"$key.html\">\u$key</A> <em>($stats{$key})</em>";
"<li><a href=\"$key.html\">\u$key</a> <em>($stats{$key})</em>\n";
if ($category_description{$key}{desc}) {
print $moutf " -- " . $category_description{$key}{desc};
print $moutf "</LI>\n";
}
print $moutf "</li>\n";
}
print $moutf "</UL>\n";
print $moutf "</ul>\n";
}
footer($moutf, "");
@ -380,22 +389,20 @@ EOF
$mindex->open(">master-index.sgml");
header($mindex, "FreeBSD Ports Collection 一覧");
print $mindex "<P>\n";
print $mindex "<p>\n";
print $mindex sort @master;
print $mindex "</P>";
footer($mindex, "<A HREF=\"#top\">top</A>");
print $mindex "</p>";
footer($mindex, "<a href=\"#top\">top</a>");
$mindex->close;
# Create statistics.ent
$statistics->open(">statistics.ent");
# doesn't seem to work:
# print $statistics "<!ENTITY date '<em>$today</em>'>\n";
my $ptgzsize = `cat ports.size 2>/dev/null` || "";
if ($ptgzsize =~ /^\d+$/) {
$ptgzsize = sprintf("%.0f", $ptgzsize/(1024*1024));
print $statistics "<?xml version=\"1.0\" encoding=\"eucJP\"?>\n";
print $statistics "<!ENTITY ports.size 'およそ $ptgzsize メガバイト'>\n";
} else {
warn "Unknown size for ports.tar.gz\n";

View file

@ -1,19 +1,20 @@
<?xml version="1.0" encoding="eucJP"?>
<!-- $FreeBSD$ -->
<!-- The FreeBSD Japanese Documentation Project -->
<!-- Original revision: 1.1 -->
<!ENTITY searchform '<FORM METHOD="GET" ACTION="http://www.FreeBSD.org/cgi/ports.cgi">
<!ENTITY searchform '<form xmlns="http://www.w3.org/1999/xhtml" method="get" action="http://www.FreeBSD.org/cgi/ports.cgi">
ports の検索:
<INPUT NAME="query" VALUE="">
<SELECT NAME="stype">
<OPTION VALUE="all">すべて</OPTION>
<OPTION VALUE="name">package 名</OPTION>
<OPTION VALUE="text">説明</OPTION>
<OPTION VALUE="pkgdescr">詳しい説明</OPTION>
<OPTION VALUE="maintainer">保守担当者</OPTION>
<OPTION VALUE="requires">必要なもの</OPTION>
</SELECT>
<INPUT TYPE="submit" VALUE="検索">
</FORM>'>
<input name="query" value=""/>
<select name="stype">
<option value="all">すべて</option>
<option value="name">package 名</option>
<option value="text">説明</option>
<option value="pkgdescr">詳しい説明</option>
<option value="maintainer">保守担当者</option>
<option value="requires">必要なもの</option>
</select>
<input type="submit" value="検索"/>
</form>'>
<!ENTITY % statistics.ent SYSTEM "statistics.ent">

View file

@ -3,6 +3,7 @@
"http://www.FreeBSD.org/XML/doc/share/sgml/xhtml10-freebsd.dtd" [
<!ENTITY base '..'>
<!ENTITY title 'FreeBSD Ports -- その他の情報'>
<!ENTITY % ports.ent SYSTEM "ports.ent">
%ports.ent;
<!ENTITY email 'ports'>
%statistics.ent;

View file

@ -3,6 +3,7 @@
"http://www.FreeBSD.org/XML/doc/share/sgml/xhtml10-freebsd.dtd" [
<!ENTITY base '..'>
<!ENTITY title 'FreeBSD Ports の検索'>
<!ENTITY % ports.ent SYSTEM "ports.ent">
%ports.ent;
%statistics.ent;
<!ENTITY email 'ports'>

View file

@ -3,6 +3,7 @@
"http://www.FreeBSD.org/XML/doc/share/sgml/xhtml10-freebsd.dtd" [
<!ENTITY base '..'>
<!ENTITY title 'FreeBSD Ports のアップデート'>
<!ENTITY % ports.ent SYSTEM "ports.ent">
%ports.ent;
<!ENTITY email 'ports'>
%statistics.ent;

View file

@ -70,7 +70,6 @@ Makefile.gen: index.sgml .NOTMAIN
for categoryfile in ${CATEGORYLIST}; do \
${ECHO_CMD} -n " $$categoryfile.sgml" >> Makefile.gen; \
done
.endif
index.sgml: ${INDEX} categories packages.exists portindex ports.inc .NOTMAIN
${RM} -f *.sgml

View file

@ -60,27 +60,32 @@ sub getdate {
"éÀÌÑ", "á×ÇÕÓÔÁ", "óÅÎÔÑÂÒÑ", "ïËÔÑÂÒÑ", "îÏÑÂÒÑ", "äÅËÁÂÒÑ");
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year += 1900;
return "ðÏÓÌÅÄÎÉÅ ÉÚÍÅÎÅÎÉÑ: $mday $months[$mon], $year";
return "$mday $months[$mon], $year";
}
sub header {
local ($fh, $htext) = @_;
print $fh "<!DOCTYPE HTML PUBLIC \"-//FreeBSD//DTD HTML 4.01 Transitional-Based Extension//EN\" [\n";
print $fh "<!ENTITY base CDATA '..'>\n";
print $fh "<!ENTITY date \"<em>$today</em>\">\n";
print $fh "<!ENTITY title '$htext'>\n";
print $fh "<?xml version=\"1.0\" encoding=\"koi8-r\"?>\n";
print $fh "<!DOCTYPE html PUBLIC \"-//FreeBSD//DTD XHTML 1.0 Transitional-Based Extension//EN\"\n";
print $fh "\"http://www.FreeBSD.org/XML/doc/share/sgml/xhtml10-freebsd.dtd\" [\n";
print $fh "<!ENTITY base '..'>\n";
print $fh "<!ENTITY blurb SYSTEM \"ports.inc\">\n";
print $fh "<!ENTITY % navinclude.ports \"INCLUDE\">\n";
print $fh "<!ENTITY email 'ports'>\n";
print $fh "]>\n";
print $fh "<html>&header;\n";
print $fh "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
print $fh "<head><title>$htext</title>";
print $fh "<cvs:keyword xmlns:cvs=\"http://www.FreeBSD.org/XML/CVS\">x x x $today x x x</cvs:keyword>";
print $fh "</head>";
print $fh "<body class=\"navinclude.about\">";
}
sub footer {
local ($fh, $ftext) = @_;
print $fh "\n$ftext\n";
print $fh "&footer;\n";
print $fh "</BODY>\n</HTML>\n";
print $fh "</body>\n</html>\n";
}
sub packages_exist {
@ -123,7 +128,7 @@ sub category_description {
sub main {
$sep = "<B>:</B>";
$sep = "<b>:</b>";
open(INDEX, $ARGV[0]);
while (<INDEX>) {
@ -156,17 +161,19 @@ sub main {
$ldesc =~ s/\/usr/$baseHTTP/;
# The name description and maintainer
$data{$i} .= "<DT><B><A NAME=\"$name\"></A><A HREF=\"$loc$ftparchive\">$name</A></B> ";
$name =~ s/,.*//g;
$name =~ s/\++//g;
$data{$i} .= "<dt><b><a name=\"$name\"></a><a href=\"$loc$ftparchive\">$name</a></b></dt>";
$data{$i} .= "<DD>$desc<BR><A HREF=\"$ldesc\">ðÏÌÎÏÅ ÏÐÉÓÁÎÉÅ</A>";
$data{$i} .= "<dd>$desc<br/><a href=\"$ldesc\">ðÏÌÎÏÅ ÏÐÉÓÁÎÉÅ</a>";
if ($packages{"$name.tbz"}) {
$data{$i} .= qq{ | <a href="$packagesURL$name.tbz">ðÁËÅÔ</a>};
} elsif ($packages{"$name.tgz"}) {
$data{$i} .= qq{ | <a href="$packagesURL$name.tgz">ðÁËÅÔ</a>};
}
$data{$i} .= qq{ | <A HREF="$pds?$sourcepath">éÓÈÏÄÎÙÅ ÔÅËÓÔÙ</A>};
$data{$i} .= qq{ | <a href="$pds?$sourcepath">éÓÈÏÄÎÙÅ ÔÅËÓÔÙ</a>};
if ($www ne "") {
$data{$i} .= qq{ | <a href="$www">ïÓÎÏ×ÎÏÊ Web ÓÁÊÔ</a>};
@ -176,17 +183,17 @@ sub main {
$ownerurl =~ s/&lt;/</g;
$owenrurl =~ s/&gt;/>/g;
$data{$i} .=
"<BR><I>ðÏÄÄÅÒÖËÏÊ ÚÁÎÉÍÁÅÔÓÑ:</I> <A HREF=\"mailto:$ownerurl\">$owner</A>";
"<br/><i>ðÏÄÄÅÒÖËÏÊ ÚÁÎÉÍÁÅÔÓÑ:</i> <a href=\"mailto:$ownerurl\">$owner</a>";
# If there are any dependencies, list them
if ($bdep ne "" || $rdep ne "") {
$data{$i} .= "<BR><I>ôÒÅÂÕÅÔ:</I> ";
$data{$i} .= "<br/><i>ôÒÅÂÕÅÔ:</i> ";
@dep = split(/ /, "$bdep $rdep");
local($last) = '';
foreach $j (sort @dep) {
next if $j eq $last;
$last = $j;
$data{$i} .= " <A HREF=\"##$j##.html#$j\">$j</A>,";
$data{$i} .= " <a href=\"##$j##.html#$j\">$j</a>,";
}
# remove the trailing comma
chop $data{$i};
@ -195,21 +202,21 @@ sub main {
# If the port is listed in more than one category, throw
# in some cross references
if ($#cat > 0) {
$data{$i} .= "<BR><EM>ôÁËÖÅ ÐÒÉÓÕÔÓÔ×ÕÅÔ ×:</EM> ";
$data{$i} .= "<br/><em>ôÁËÖÅ ÐÒÉÓÕÔÓÔ×ÕÅÔ ×:</em> ";
foreach $j (@cat) {
if ($j ne $i) {
if ($j eq $cat[0]) {
$data{$i} .= " <STRONG><A HREF=\"$j.html#$name\">\u$j</A></STRONG>,";
$data{$i} .= " <strong><a href=\"$j.html#$name\">\u$j</a></strong>,";
}
else {
$data{$i} .= " <A HREF=\"$j.html#$name\">\u$j</A>,";
$data{$i} .= " <a href=\"$j.html#$name\">\u$j</a>,";
}
}
}
# remove the trailing comma
chop($data{$i});
}
$data{$i} .= "<P></P></DD>\n"
$data{$i} .= "<p></p></dd>\n"
}
# Add an entry to the master index
@ -218,8 +225,8 @@ sub main {
local ($sname) = $name;
$sname =~ s/--/-=/g;
$master[$portnumber] =
"<!-- $sname --><STRONG><A HREF=\"$cat[0].html#$name\">$name</A></STRONG> " .
" -- <EM>$desc</EM><BR>\n";
"<!-- $sname --><strong><a href=\"$cat[0].html#$name\">$name</a></strong> " .
" -- <em>$desc</em><br/>\n";
$portnumber++;
}
@ -228,19 +235,19 @@ sub main {
&header(MOUTF, "ðÏÒÔÙ FreeBSD");
# print MOUTF "<!--#include virtual=\"./ports.inc\" -->\n";
print MOUTF "&blurb;";
print MOUTF "<hr><P>÷ ÓÐÉÓËÅ ëÏÌÌÅËÃÉÉ ðÏÒÔÏ× FreeBSD ÎÁ ÄÁÎÎÙÊ ÍÏÍÅÎÔ
ÐÒÉÓÕÔÓÔ×ÕÀÔ $portnumber ÐÏÒÔÉÒÏ×ÁÎÎÙÈ ÎÁ FreeBSD ÐÒÏÇÒÁÍÍ.<br>
<A HREF=\"$baseFTP/ports.tar.gz\">óÇÒÕÚÉÔÅ gzip-ÁÒÈÉ×, ÓÏÄÅÒÖÁÝÉÊ ×ÓÅ
$portnumber ÐÏÒÔÏ×</A> (ÏËÏÌÏ 21 íÂÁÊÔÁ) ÉÌÉ ÐÒÏÓÍÏÔÒÉÔÅ ÓÌÅÄÕÀÝÉÅ
ËÁÔÅÇÏÒÉÉ:\n";
print MOUTF "<hr/><p>÷ ÓÐÉÓËÅ ëÏÌÌÅËÃÉÉ ðÏÒÔÏ× FreeBSD ÎÁ ÄÁÎÎÙÊ ÍÏÍÅÎÔ
ÐÒÉÓÕÔÓÔ×ÕÀÔ $portnumber ÐÏÒÔÉÒÏ×ÁÎÎÙÈ ÎÁ FreeBSD ÐÒÏÇÒÁÍÍ.<br/>
<a href=\"$baseFTP/ports.tar.gz\">óÇÒÕÚÉÔÅ gzip-ÁÒÈÉ×, ÓÏÄÅÒÖÁÝÉÊ ×ÓÅ
$portnumber ÐÏÒÔÏ×</a> (ÏËÏÌÏ 21 íÂÁÊÔÁ) ÉÌÉ ÐÒÏÓÍÏÔÒÉÔÅ ÓÌÅÄÕÀÝÉÅ
ËÁÔÅÇÏÒÉÉ:</p>\n";
print MOUTF "<UL>\n";
print MOUTF "<ul>\n";
@foos = sort(keys %stats);
foreach $key (@foos) {
# For the master file...
print MOUTF
"<LI><A HREF=\"$key.html\">\u$key</A> <em>($stats{$key})</em>";
"<li><a href=\"$key.html\">\u$key</a> <em>($stats{$key})</em>";
if ($category_description{$key}) {
print MOUTF " -- " . $category_description{$key};
}
@ -253,7 +260,7 @@ $portnumber
sleep(3);
}
print MOUTF "</LI>\n";
print MOUTF "</li>\n";
# Create the category file
open(OUTF, ">$key.sgml");
@ -261,29 +268,29 @@ $portnumber
if ($category_description{$key}) {
print OUTF "<h3>", $category_description{$key}, "</h3>\n";
}
print OUTF "<DL>\n";
print OUTF "<dl>\n";
$d = join("\n", sort(split(/\n/, $data{$key})));
$d =~ s/##([^#]*)##/$catkey{$1}/g;
print OUTF $d;
print OUTF "</DL>\n";
&footer(OUTF, "<p></p><A HREF=\"index.html\">ëÁÔÅÇÏÒÉÉ ðÏÒÔÏ×</A>" .
" -- <A HREF=\"master-index.html\">éÎÄÅËÓ</A>");
print OUTF "</dl>\n";
&footer(OUTF, "<p></p><a href=\"index.html\">ëÁÔÅÇÏÒÉÉ ðÏÒÔÏ×</a>" .
" -- <a href=\"master-index.html\">éÎÄÅËÓ</a>");
close(OUTF);
}
print MOUTF "</UL>\n";
print MOUTF "</ul>\n";
print MOUTF
"<UL><LI><A HREF=\"master-index.html\">áÌÆÁ×ÉÔÎÙÊ ÓÐÉÓÏË ×ÓÅÈ $portnumber ÐÏÒÔÏ×</A></LI></UL>\n";
"<ul><li><a href=\"master-index.html\">áÌÆÁ×ÉÔÎÙÊ ÓÐÉÓÏË ×ÓÅÈ $portnumber ÐÏÒÔÏ×</a></li></ul>\n";
&footer(MOUTF, "");
close(MOUTF);
# Create the master index file
open(MINDEX, ">master-index.sgml");
&header(MINDEX, "éÎÄÅËÓ ëÏÌÌÅËÃÉÉ ðÏÒÔÏ× FreeBSD");
print MINDEX "<P>\n";
print MINDEX "<p>\n";
print MINDEX sort @master;
print MINDEX "</P>";
&footer(MINDEX, "<A HREF=\"index.html\">ëÁÔÅÇÏÒÉÉ ðÏÒÔÏ×</A>");
print MINDEX "</p>";
&footer(MINDEX, "<a href=\"index.html\">ëÁÔÅÇÏÒÉÉ ðÏÒÔÏ×</a>");
close(MINDEX);
close(INDEX);
}

View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="koi8-r"?>
<!--
The FreeBSD Russian Documentation Project
@ -7,6 +8,7 @@
Original revision: 1.67
-->
<div xmlns="http://www.w3.org/1999/xhtml">
<p>Коллекция Портов и Пакетов FreeBSD даёт пользователям и администраторам
простой метод установки приложений. Коллекция портов <a
href="../../../ports/growth/status.png">растёт с потрясающей
@ -52,16 +54,16 @@
href="http://www.FreeBSD.org/cgi/ports.cgi">
Изменений портов FreeBSD</a>.</p>
<FORM
METHOD="GET" ACTION="http://www.FreeBSD.org/cgi/ports.cgi">ðÏÉÓË ÐÏ ÐÏÌÑÍ:
<INPUT NAME="query" VALUE="">
<SELECT NAME="stype">
<OPTION VALUE="all">÷ÓÅ</OPTION>
<OPTION VALUE="name">îÁÚ×ÁÎÉÅ ÐÁËÁÄÖÁ</OPTION>
<OPTION VALUE="text">ïÐÉÓÁÎÉÅ</OPTION>
</SELECT>
<INPUT TYPE="submit" VALUE="éÓËÁÔØ">
</FORM>
<form
method="get" action="http://www.FreeBSD.org/cgi/ports.cgi">ðÏÉÓË ÐÏ ÐÏÌÑÍ:
<input name="query" value=""/>
<select name="stype">
<option value="all">÷ÓÅ</option>
<option value="name">îÁÚ×ÁÎÉÅ ÐÁËÁÄÖÁ</option>
<option value="text">ïÐÉÓÁÎÉÅ</option>
</select>
<input type="submit" value="éÓËÁÔØ"/>
</form>
<p>Более подробная информация об использовании портов находится в главе
<a href="../../doc/ru_RU.KOI8-R/books/handbook/ports.html">Установка
@ -70,3 +72,4 @@
FreeBSD</a>. Информация о создании новых портов находится в книге <a
href="../../doc/ru_RU.KOI8-R/books/porters-handbook/index.html">
Руководство по созданию портов</a>.</p>
</div>