diff --git a/en/ports/portindex b/en/ports/portindex index ec1a1d3038..cdd1a3968d 100755 --- a/en/ports/portindex +++ b/en/ports/portindex @@ -7,11 +7,27 @@ ############################################################ +# 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. +$config = $0 . '.' . 'conf'; +do $config if -f $config; + + # This is the base of where we ftp stuff from -$base = "ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current"; -$baseHTTP = "ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current"; -$urlcgi = 'http://www.freebsd.org/cgi/url.cgi'; -$packagesURL = 'ftp://ftp.freebsd.org/pub/FreeBSD/packages-stable/All/'; +if ($ENV{'MASTER_FTP_SERVER'}) { + $ftpserver = $ENV{'MASTER_FTP_SERVER'}; +} else { + $ftpserver = 'ftp://ftp.freebsd.org' if !$ftpserver; +} +$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/" + if !$packagesURL; +# support tar on the fly or gzip'ed tar on the fly +$ftparchive = 'tar' if !$ftparchive; # better layout and link to the sources if ($urlcgi) { @@ -100,7 +116,7 @@ sub main { $ldesc =~ s/\/usr/$baseHTTP/; # The name description and maintainer - $data{$i} .= "
$name "; + $data{$i} .= "
$name "; $data{$i} .= "
$desc
Long description";