Update to revisions:

Makefile: 1.20
portindex: 1.24
This commit is contained in:
Jesus Rodriguez Cuesta 1999-03-18 13:55:09 +00:00
parent 70c4743ced
commit c3cfb7c896
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/www/; revision=4534
2 changed files with 60 additions and 11 deletions

View file

@ -1,31 +1,43 @@
# $Id: Makefile,v 1.1.1.1 1999-02-08 19:26:11 wosch Exp $
# $Id: Makefile,v 1.2 1999-03-18 13:55:09 jesusr Exp $
.if exists(../Makefile.conf)
.include "../Makefile.conf"
.endif
PORTINDEX= perl ${.CURDIR}/portindex
PORTINDEX= perl5 ${.CURDIR}/portindex
INDEX= INDEX
PINDEX= ports/${INDEX}
Y2K= YEAR2000
PY2K= ports/${Y2K}
WWW= WWW_SITE
PWWW= ports/${WWW}
COOKIE= ${INDEX} Makefile.gen
.if exists(Makefile.gen)
.include "Makefile.gen"
.endif
CLEANFILES+= ${DOCS} Makefile.gen ${INDEX} packages.exists
CLEANFILES+= ${DOCS} Makefile.gen ${INDEX} ${Y2K} ${WWW} packages.exists
cvsindex= $${CVSROOT}/${PINDEX},v
_ALLINSTALL= packages.exists ${INDEX}
cvsy2k= $${CVSROOT}/${PY2K},v
cvswww= $${CVSROOT}/${PWWW},v
_ALLINSTALL= packages.exists ${INDEX} ${Y2K} ${WWW}
${INDEX}: ${cvsindex}
cvs -QR co -p ${PINDEX} > ${INDEX}
${Y2K}: ${cvsy2k}
cvs -QR co -p ${PY2K} > ${Y2K}
${WWW}: ${cvswww}
cvs -QR co -p ${PWWW} > ${WWW}
# build the list of available packages only on the
# main FreeBSD machines
hostname!= hostname
packages.exists: ${cvsindex}
packages.exists: ${cvsindex} ${cvsy2k} ${cvswww}
.if ${hostname} == "hub.freebsd.org" || ${hostname} == "freefall.freebsd.org"
sh ${.CURDIR}/packages > ${.TARGET}
.else
@ -36,8 +48,8 @@ Makefile.gen: index.sgml .NOTMAIN
echo DOCS= *.sgml > Makefile.gen
${MAKE} ${MAKEFLAGS} ${.IMPSRC}
index.sgml: ${INDEX} packages.exists portindex ports.inc .NOTMAIN
index.sgml: ${INDEX} ${Y2K} ${WWW} packages.exists portindex ports.inc .NOTMAIN
rm -f *.sgml
${PORTINDEX} ${INDEX}
${PORTINDEX} ${INDEX} ${Y2K} ${WWW}
.include "../web.mk"

View file

@ -13,7 +13,6 @@
# URL point to yourself and not to the standard FreeBSD FTP server.
$config = $0 . '.' . 'conf';
do $config if -f $config;
# This is the base of where we ftp stuff from
if ($ENV{'MASTER_FTP_SERVER'}) {
@ -24,7 +23,7 @@ if ($ENV{'MASTER_FTP_SERVER'}) {
$base = "$ftpserver/pub/FreeBSD/FreeBSD-current" if !$base;
$baseHTTP = $base if !$baseHTTP;
$urlcgi = 'http://www.freebsd.org/cgi/url.cgi' if !$urlcgi;
$packagesURL = "$ftpserver/pub/FreeBSD/packages-stable/All/"
$packagesURL = "$ftpserver/pub/FreeBSD/ports/i386/packages-stable/All/"
if !$packagesURL;
# support tar on the fly or gzip'ed tar on the fly
$ftparchive = 'tar' if !$ftparchive;
@ -42,8 +41,37 @@ $today = &getdate;
&packages_exist('packages.exists', *packages);
&category_description('categories', *category_description);
&y2k_statements;
&www_sites;
&main;
sub y2k_statements {
open(Y2K, $ARGV[1]);
while(<Y2K>) {
chop();
( $dir, $url ) = split(/\s+/);
$dir = $base . "/" . $dir;
$y2k{$dir} = $url;
}
close(Y2K);
}
sub www_sites {
open(WWW, $ARGV[2]);
while(<WWW>) {
chop();
( $dir, $url ) = split(/\s+/);
$dir = $base . "/" . $dir;
$www{$dir} = $url;
}
close(WWW);
}
sub getdate {
@months = ("January", "February", "March", "April", "May","June",
"July", "August", "September", "October", "November", "December");
@ -115,7 +143,8 @@ sub main {
$sep = "<B>:</B>";
while (<>) {
open(INDEX, $ARGV[0]);
while (<INDEX>) {
chop;
s/&/&amp;/g;
s/</&lt;/g;
@ -155,6 +184,14 @@ sub main {
$data{$i} .= qq{ | <A HREF="$pds?$sourcepath">Sources</A>};
if ($y2k{"$loc"}) {
$data{$i} .= qq{ | <a href="$y2k{$loc}">Y2K</a>};
}
if ($www{"$loc"}) {
$data{$i} .= qq{ | <a href="$www{$loc}">Main Web Site</a>};
}
$ownerurl = $owner;
$ownerurl =~ s/&lt;/</g;
$owenrurl =~ s/&gt;/>/g;
@ -258,5 +295,5 @@ browse the following categories:\n";
print MINDEX "</P>";
&footer(MINDEX, "<HR><A HREF=\"index.html\">Port Categories</A><HR>");
close(MINDEX);
close(INDEX);
}