* Commit for 2.1.0.
[BackupPC.git] / makeDist
index 7492a03..edc3c43 100755 (executable)
--- a/makeDist
+++ b/makeDist
@@ -16,7 +16,7 @@
 #   Craig Barratt <cbarratt@users.sourceforge.net>
 #
 # COPYRIGHT
-#   Copyright (C) 2001-2003  Craig Barratt
+#   Copyright (C) 2001-2004  Craig Barratt
 #
 #   This program is free software; you can redistribute it and/or modify
 #   it under the terms of the GNU General Public License as published by
@@ -42,8 +42,8 @@ use Getopt::Std;
 
 umask(0022);
 
-my $Version     = "2.1.0_CVS";
-my $ReleaseDate = "8 Feb 2004";
+my $Version     = "2.1.0";
+my $ReleaseDate = "20 Jun 2004";
 my $DistDir     = "dist/BackupPC-$Version";
 
 my @PerlSrc = qw(
@@ -92,10 +92,12 @@ my @PerlSrc = qw(
     lib/BackupPC/Lang/es.pm
     lib/BackupPC/Lang/fr.pm
     lib/BackupPC/Lang/it.pm
+    lib/BackupPC/Lang/nl.pm
     lib/BackupPC/Xfer/Archive.pm
     lib/BackupPC/Xfer/Smb.pm
     lib/BackupPC/Xfer/Tar.pm
     lib/BackupPC/Xfer/Rsync.pm
+    lib/BackupPC/Xfer/RsyncDigest.pm
     lib/BackupPC/Xfer/RsyncFileIO.pm
     lib/BackupPC/Zip/FileMember.pm
     cgi-bin/BackupPC_Admin
@@ -115,6 +117,8 @@ my $errCnt;
 
 $errCnt += CheckConfigParams("conf/config.pl", $ConfVars, 0);
 
+$errCnt += CheckConfigParams("doc-src/BackupPC.pod", $ConfVars, 1);
+
 #
 # These config parameters are not used in the code, so ignore them.
 #
@@ -130,6 +134,7 @@ $ConfVars->{CgiImageDir}  = 2;
 $ConfVars->{BlackoutHourBegin} = 2;
 $ConfVars->{BlackoutHourEnd}   = 2;
 $ConfVars->{BlackoutWeekDays}  = 2;
+$ConfVars->{RsyncLogLevel}     = 2;
 
 foreach my $file ( @PerlSrc ) {
     $errCnt += CheckConfigParams($file, $ConfVars, 1);
@@ -184,6 +189,7 @@ foreach my $file ( (@PerlSrc,
            qw(
                conf/config.pl
                conf/hosts
+               conf/BackupPC_stnd.css
                init.d/README
                init.d/src/debian-backuppc
                init.d/src/gentoo-backuppc
@@ -205,6 +211,8 @@ system("cd dist ; tar zcf BackupPC-$Version.tar.gz BackupPC-$Version");
 print("Distribution written to dist/BackupPC-$Version.tar.gz\n");
 unlink("pod2htmd.x~~");
 unlink("pod2htmi.x~~");
+unlink("pod2htmd.tmp");
+unlink("pod2htmi.tmp");
 
 ###########################################################################
 # Subroutines
@@ -223,14 +231,30 @@ sub InstallFile
        binmode(FILE);
        binmode(OUT);
        while ( <FILE> ) {
-           s/^# *Version \d+\.\d+[\.\w]*, released \d+ \w+ \d{4}\.?/# Version __VERSION__, released __RELEASEDATE__./;
+           s/^([#*\s]+)Version \d+\.\d+[\.\w]*, released \d+ \w+ \d{4}\.?/$1Version __VERSION__, released __RELEASEDATE__./;
            s/__VERSION__/$Version/g;
            s/__RELEASEDATE__/$ReleaseDate/g;
-           if ( $file =~ /BackupPC\.html$/ && !/A NAME="item_%24Conf/ ) {
-               s/\$Conf{([^}]*)}/
+           if ( $file =~ /BackupPC\.html$/ ) {
+               #
+               # fixup for perl 5.6.x
+               #
+               if ( !/A NAME="item_(%|_)24Conf/i ) {
+                   s/\$Conf{([^}]*)}/
                        defined($ConfName{$1})
-                           ? "<A HREF=\"#$ConfName{$1}\">\$Conf{$1}<\/A>"
+                           ? "\L<A HREF=\"#$ConfName{$1}\">\E\$Conf{$1}<\/A>"
                            : "\$Conf{$1}"/eg;
+               }
+               s/<(A NAME="item_(%|_)24Conf(%|_)7B(.*?)(%|_)7D).*?">/\L<A NAME="item_%24Conf%7b$4%7d">/ig;
+               s/^<DD>/<DD><P>/;
+               #
+               # Fixup for perl 5.8.x first one no longer needed after
+               # fix in CSS)
+               #
+#              if ( /^<\/dt>/ ) {
+#                  $_ .= <FILE>;
+#                  s/^(<\/dt>\n<dd>)/$1<p>/s;
+#              }
+               s/^<li><\/li>/<li>/;
            }
            if ( /__CONFIGPOD__/ ) {
                print OUT $ConfPod;
@@ -294,7 +318,7 @@ sub config2pod
                 s/([^;])\s*$/$1 .../;
             }
             push(@conf, $_);
-            my $text = $_;
+            my $text = "\$Conf{$var}";
             $text =~ s/\s+/_/sg;
             $text =~ s{(\W)}{sprintf("%%%02X", ord($1) )}gxe;
             $text = substr($text, 0, 50);
@@ -387,6 +411,7 @@ sub CheckLangUsage
             s/\$Lang{([^}]*)}/
                    my $var = $1;
                    next if ( $var =~ m{^(Reason_|Status_|backupType_)} );
+                   next if ( $var eq "Documentation" );
                     if ( !defined($vars->{$var}) ) {
                         print("Unexpected Lang var $var in $f\n");
                         $errors++;
@@ -418,7 +443,7 @@ sub CheckLangTags
     my($en, $enVars) = LangParse("lib/BackupPC/Lang/en.pm");
     my($errors);
 
-    foreach my $lang ( qw(fr.pm de.pm es.pm it.pm) ) {
+    foreach my $lang ( qw(fr.pm de.pm es.pm it.pm nl.pm) ) {
        my($d, $dVars) = LangParse("lib/BackupPC/Lang/$lang");
        foreach my $v1 ( @$en ) {
            my $v2 = shift(@$d);