From: Frank Lichtenheld Date: Thu, 23 Feb 2006 16:46:48 +0000 (+0000) Subject: Add hostname variable X-Git-Tag: switch-to-templates~46 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=1d95d44a6b1addd163056c22cf16ca2337221837;p=deb%2Fpackages.git Add hostname variable --- diff --git a/config.sh b/config.sh index 5c3a65e..299c539 100644 --- a/config.sh +++ b/config.sh @@ -32,6 +32,7 @@ amd64_ftpsite=http://amd64.debian.net/debian kfreebsd_ftpsite=http://kfreebsd-gnu.debian.net/debian root="" +hostname="http://packages.debian.net" search_page="http://packages.debian.net/" search_url="/search" webmaster=webmaster@debian.org diff --git a/lib/Packages/Config.pm b/lib/Packages/Config.pm index 538e912..43ea37a 100644 --- a/lib/Packages/Config.pm +++ b/lib/Packages/Config.pm @@ -8,13 +8,13 @@ use Packages::CGI; our @ISA = qw( Exporter ); -our ( $TOPDIR, $DBDIR, $ROOT, $HOME, $CONTACT_MAIL, $WEBMASTER_MAIL, +our ( $TOPDIR, $DBDIR, $ROOT, $HOSTNAME, $HOME, $CONTACT_MAIL, $WEBMASTER_MAIL, $SEARCH_PAGE, $SEARCH_URL, @LANGUAGES, $LOCALES, $SRC_SEARCH_URL, $CONTENTS_SEARCH_CGI, $CN_HELP_URL, $BUG_URL, $SRC_BUG_URL, $QA_URL, $DDPO_URL, @SUITES, @SECTIONS, @ARCHIVES, @ARCHITECTURES, %FTP_SITES ); -our @EXPORT_OK = qw( $TOPDIR $DBDIR $ROOT $HOME $CONTACT_MAIL +our @EXPORT_OK = qw( $TOPDIR $DBDIR $ROOT $HOSTNAME $HOME $CONTACT_MAIL $WEBMASTER_MAIL @LANGUAGES $LOCALES $SEARCH_PAGE $SEARCH_URL $SRC_SEARCH_URL $CONTENTS_SEARCH_CGI @@ -38,6 +38,7 @@ sub init { chomp; $TOPDIR = $1 if /^\s*topdir="?([^\"]*)"?\s*$/o; $ROOT = $1 if /^\s*root="?([^\"]*)"?\s*$/o; + $HOSTNAME = $1 if /^\s*hostname="?([^\"]*)"?\s*$/o; $HOME = $1 if /^\s*home="?([^\"]*)"?\s*$/o; $LOCALES = $1 if /^\s*localedir="?([^\"]*)"?\s*$/o; # $SEARCH_CGI = $1 if /^\s*search_cgi="?([^\"]*)"?\s*$/o;