--- loncom/build/make_rpm.pl 2000/12/11 17:25:19 1.2 +++ loncom/build/make_rpm.pl 2000/12/12 16:51:39 1.4 @@ -35,6 +35,7 @@ END my ($tag,$version,$configuration_files,$documentation_files,$pathprefix)=@ARGV; @ARGV=(); + if (!$version) { print "Usage: [CONFIGURATION_FILES] [DOCUMENTATION] [PATHPREFIX]\n"; print "Standard input provides the list of files to work with.\n"; @@ -143,6 +144,15 @@ END foreach $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)) { $octalmode="0" . $octalmode if length($octalmode)<4; if ($pathprefix) { @@ -151,7 +161,7 @@ foreach $file (<>) { if ($type eq "files") { 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 @{$dotspecfile{$type}},"\%attr($octalmode,$user,$group) $file\n"; + push @{$dotspecfile{$type}},"$config\%attr($octalmode,$user,$group) $file\n"; } elsif ($type eq "directories") { push @{$BinaryRootMakefile{$type}},"\tinstall -m $octalmode -d $binaryroot$file\n"; @@ -191,7 +201,7 @@ close SPEC; print `cd $currentdir/SOURCES; tar czvf LON-CAPA-$tag-$version.tar.gz LON-CAPA-$tag-$version`; print `cd $currentdir/SPECS; rpm --rcfile=./rpmrc -ba LON-CAPA-$tag-$version.spec; cd ../RPMS/i386; cp LON-CAPA-$tag-$version-1.i386.rpm $invokingdir/.`; -print `cd $invokingdir; rm -Rf $tag`; +# print `cd $invokingdir; rm -Rf $tag`; sub find_info { # only look for