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) .if exists(../Makefile.conf)
.include "../Makefile.conf" .include "../Makefile.conf"
.endif .endif
PORTINDEX= perl ${.CURDIR}/portindex PORTINDEX= perl5 ${.CURDIR}/portindex
INDEX= INDEX INDEX= INDEX
PINDEX= ports/${INDEX} PINDEX= ports/${INDEX}
Y2K= YEAR2000
PY2K= ports/${Y2K}
WWW= WWW_SITE
PWWW= ports/${WWW}
COOKIE= ${INDEX} Makefile.gen COOKIE= ${INDEX} Makefile.gen
.if exists(Makefile.gen) .if exists(Makefile.gen)
.include "Makefile.gen" .include "Makefile.gen"
.endif .endif
CLEANFILES+= ${DOCS} Makefile.gen ${INDEX} packages.exists CLEANFILES+= ${DOCS} Makefile.gen ${INDEX} ${Y2K} ${WWW} packages.exists
cvsindex= $${CVSROOT}/${PINDEX},v cvsindex= $${CVSROOT}/${PINDEX},v
_ALLINSTALL= packages.exists ${INDEX} cvsy2k= $${CVSROOT}/${PY2K},v
cvswww= $${CVSROOT}/${PWWW},v
_ALLINSTALL= packages.exists ${INDEX} ${Y2K} ${WWW}
${INDEX}: ${cvsindex} ${INDEX}: ${cvsindex}
cvs -QR co -p ${PINDEX} > ${INDEX} 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 # build the list of available packages only on the
# main FreeBSD machines # main FreeBSD machines
hostname!= hostname hostname!= hostname
packages.exists: ${cvsindex} packages.exists: ${cvsindex} ${cvsy2k} ${cvswww}
.if ${hostname} == "hub.freebsd.org" || ${hostname} == "freefall.freebsd.org" .if ${hostname} == "hub.freebsd.org" || ${hostname} == "freefall.freebsd.org"
sh ${.CURDIR}/packages > ${.TARGET} sh ${.CURDIR}/packages > ${.TARGET}
.else .else
@ -36,8 +48,8 @@ Makefile.gen: index.sgml .NOTMAIN
echo DOCS= *.sgml > Makefile.gen echo DOCS= *.sgml > Makefile.gen
${MAKE} ${MAKEFLAGS} ${.IMPSRC} ${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 rm -f *.sgml
${PORTINDEX} ${INDEX} ${PORTINDEX} ${INDEX} ${Y2K} ${WWW}
.include "../web.mk" .include "../web.mk"

View file

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