Diff for /loncom/build/make_rpm.pl between versions 1.2 and 1.6

version 1.2, 2000/12/11 17:25:19 version 1.6, 2000/12/21 19:26:01
Line 35  END Line 35  END
   
 my ($tag,$version,$configuration_files,$documentation_files,$pathprefix)=@ARGV;  my ($tag,$version,$configuration_files,$documentation_files,$pathprefix)=@ARGV;
 @ARGV=();  @ARGV=();
   
 if (!$version) {  if (!$version) {
     print "Usage: <TAG> <VERSION> [CONFIGURATION_FILES] [DOCUMENTATION] [PATHPREFIX]\n";      print "Usage: <TAG> <VERSION> [CONFIGURATION_FILES] [DOCUMENTATION] [PATHPREFIX]\n";
     print "Standard input provides the list of files to work with.\n";      print "Standard input provides the list of files to work with.\n";
Line 143  END Line 144  END
   
 foreach $file (<>) {  foreach $file (<>) {
     chop $file;      chop $file;
       my $comment="";
       if ($file=~/\s+\#(.*)$/) {
    $file=~s/\s+\#(.*)$//;
    $comment=$1;
       }
       my $config="";
       if ($comment=~/config/i) {
    $config="\%config ";
       }
     if (($type,$size,$octalmode,$user,$group)=find_info($file)) {      if (($type,$size,$octalmode,$user,$group)=find_info($file)) {
  $octalmode="0" . $octalmode if length($octalmode)<4;   $octalmode="0" . $octalmode if length($octalmode)<4;
  if ($pathprefix) {   if ($pathprefix) {
Line 151  foreach $file (<>) { Line 161  foreach $file (<>) {
  if ($type eq "files") {   if ($type eq "files") {
     push @{$BinaryRootMakefile{$type}},"\tinstall -D -m $octalmode $pathprefix$file $binaryroot$file\n";      push @{$BinaryRootMakefile{$type}},"\tinstall -D -m $octalmode $pathprefix$file $binaryroot$file\n";
     push @{$Makefile{$type}},"\tinstall -D -m $octalmode \$(SOURCE)$file \$(ROOT)$file\n";      push @{$Makefile{$type}},"\tinstall -D -m $octalmode \$(SOURCE)$file \$(ROOT)$file\n";
     push @{$dotspecfile{$type}},"\%attr($octalmode,$user,$group) $file\n";      push @{$dotspecfile{$type}},"$config\%attr($octalmode,$user,$group) $file\n";
  }   }
  elsif ($type eq "directories") {   elsif ($type eq "directories") {
     push @{$BinaryRootMakefile{$type}},"\tinstall -m $octalmode -d $binaryroot$file\n";      push @{$BinaryRootMakefile{$type}},"\tinstall -m $octalmode -d $binaryroot$file\n";
Line 206  sub find_info { Line 216  sub find_info {
  return ("directories",split(/\t/,$line));   return ("directories",split(/\t/,$line));
     }      }
     elsif (($line=`find $file -type l -prune`)=~/^$file\n/) {      elsif (($line=`find $file -type l -prune`)=~/^$file\n/) {
  $line=`find $file -type l -prune -printf "\%h/\%l\t\%m\t\%u\t\%g"`;   $line=`find $file -type l -prune -printf "\%l\t\%m\t\%u\t\%g"`;
  return ("links",split(/\t/,$line));   return ("links",split(/\t/,$line));
     }      }
   

Removed from v.1.2  
changed lines
  Added in v.1.6


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>