--- loncom/build/lpml_parse.pl 2001/11/17 23:00:10 1.21 +++ loncom/build/lpml_parse.pl 2001/11/29 19:00:56 1.24 @@ -8,7 +8,7 @@ # 9/17,9/18 - Scott Harrison # 11/4,11/5,11/6,11/7,11/16,11/17 - Scott Harrison # -# $Id: lpml_parse.pl,v 1.21 2001/11/17 23:00:10 harris41 Exp $ +# $Id: lpml_parse.pl,v 1.24 2001/11/29 19:00:56 harris41 Exp $ ### ############################################################################### @@ -317,7 +317,7 @@ exit; # ------------------------ Final output at end of markup parsing and formatting sub end { if ($mode eq 'html') { - return "
THE END\n"; + return "\n"; } if ($mode eq 'install') { return ''; @@ -336,7 +336,55 @@ sub format_lpml { my (@tokeninfo)=@_; my $date=`date`; chop $date; if ($mode eq 'html') { - $lpml = "
LPML BEGINNING: $date"; + $lpml=< + +LPML Description Page (dist=$dist, $date) + + +END + $lpml .= "
LPML Description Page (dist=$dist, ". + "$date)". + ""; + $lpml .=< +
  • About this file
  • +
  • File Type Ownership and Permissions +Descriptions
  • +
  • Software Package Description
  • +
  • Directory Structure
  • +
  • File and Directory Structure
  • + +END + $lpml .=< 
    +About this file +

    +This file is generated dynamically by lpml_parse.pl as +part of a development compilation process. Author: Scott +Harrison (harris41\@msu.edu). +

    +END + } + elsif ($mode eq 'text') { + $lpml = "LPML Description Page (dist=$dist, $date)"; + $lpml .=<get_text('/categories')); $parser->get_tag('/categories'); if ($mode eq 'html') { - return $categories="\n
    BEGIN CATEGORIES\n$text\n". - "
    END CATEGORIES\n"; + return $categories="\n
     
    ". + "\n
    ". + "\nFile Type Ownership and Permissions". + " Descriptions". + "\n\n". + "
    \n$text\n". + "
    \n"; + } + elsif ($mode eq 'text') { + return $categories="\n". + "\nFile Type Ownership and Permissions". + " Descriptions". + "\n"; } else { return ''; @@ -456,7 +515,24 @@ sub format_rpm { my $text=&trim($parser->get_text('/rpm')); $parser->get_tag('/rpm'); if ($mode eq 'html') { - return $rpm="\n
    BEGIN RPM\n$text\n
    END RPM"; + return $rpm=< 
    +
    +Software Package Description +

    + + +
    +$text
    +
    +END + } + elsif ($mode eq 'text') { + return $rpm=<get_text('/rpmSummary')); $parser->get_tag('/rpmSummary'); if ($mode eq 'html') { - return $rpmSummary="\n
    RPMSUMMARY $text"; + return $rpmSummary="\nSummary : $text"; + } + elsif ($mode eq 'text') { + return $rpmSummary="\nSummary : $text"; } else { return ''; @@ -478,7 +557,10 @@ sub format_rpmName { my $text=&trim($parser->get_text('/rpmName')); $parser->get_tag('/rpmName'); if ($mode eq 'html') { - return $rpmName="\n
    RPMNAME $text"; + return $rpmName="\nName : $text"; + } + elsif ($mode eq 'text') { + return $rpmName="\nName : $text"; } else { return ''; @@ -489,7 +571,10 @@ sub format_rpmVersion { my $text=$parser->get_text('/rpmVersion'); $parser->get_tag('/rpmVersion'); if ($mode eq 'html') { - return $rpmVersion="\n
    RPMVERSION $text"; + return $rpmVersion="\nVersion : $text"; + } + elsif ($mode eq 'text') { + return $rpmVersion="\nVersion : $text"; } else { return ''; @@ -500,7 +585,10 @@ sub format_rpmRelease { my $text=$parser->get_text('/rpmRelease'); $parser->get_tag('/rpmRelease'); if ($mode eq 'html') { - return $rpmRelease="\n
    RPMRELEASE $text"; + return $rpmRelease="\nRelease : $text"; + } + elsif ($mode eq 'text') { + return $rpmRelease="\nRelease : $text"; } else { return ''; @@ -511,7 +599,10 @@ sub format_rpmVendor { my $text=$parser->get_text('/rpmVendor'); $parser->get_tag('/rpmVendor'); if ($mode eq 'html') { - return $rpmVendor="\n
    RPMVENDOR $text"; + return $rpmVendor="\nVendor : $text"; + } + elsif ($mode eq 'text') { + return $rpmVendor="\nVendor : $text"; } else { return ''; @@ -522,7 +613,10 @@ sub format_rpmBuildRoot { my $text=$parser->get_text('/rpmBuildRoot'); $parser->get_tag('/rpmBuildRoot'); if ($mode eq 'html') { - return $rpmBuildRoot="\n
    RPMBUILDROOT $text"; + return $rpmBuildRoot="\nBuild Root : $text"; + } + elsif ($mode eq 'text') { + return $rpmBuildRoot="\nBuild Root : $text"; } else { return ''; @@ -533,7 +627,10 @@ sub format_rpmCopyright { my $text=$parser->get_text('/rpmCopyright'); $parser->get_tag('/rpmCopyright'); if ($mode eq 'html') { - return $rpmCopyright="\n
    RPMCOPYRIGHT $text"; + return $rpmCopyright="\nLicense : $text"; + } + elsif ($mode eq 'text') { + return $rpmCopyright="\nLicense : $text"; } else { return ''; @@ -544,7 +641,10 @@ sub format_rpmGroup { my $text=$parser->get_text('/rpmGroup'); $parser->get_tag('/rpmGroup'); if ($mode eq 'html') { - return $rpmGroup="\n
    RPMGROUP $text"; + return $rpmGroup="\nGroup : $text"; + } + elsif ($mode eq 'text') { + return $rpmGroup="\nGroup : $text"; } else { return ''; @@ -555,7 +655,10 @@ sub format_rpmSource { my $text=$parser->get_text('/rpmSource'); $parser->get_tag('/rpmSource'); if ($mode eq 'html') { - return $rpmSource="\n
    RPMSOURCE $text"; + return $rpmSource="\nSource : $text"; + } + elsif ($mode eq 'text') { + return $rpmSource="\nSource : $text"; } else { return ''; @@ -566,7 +669,10 @@ sub format_rpmAutoReqProv { my $text=$parser->get_text('/rpmAutoReqProv'); $parser->get_tag('/rpmAutoReqProv'); if ($mode eq 'html') { - return $rpmAutoReqProv="\n
    RPMAUTOREQPROV $text"; + return $rpmAutoReqProv="\nAutoReqProv : $text"; + } + if ($mode eq 'text') { + return $rpmAutoReqProv="\nAutoReqProv : $text"; } else { return ''; @@ -576,8 +682,13 @@ sub format_rpmAutoReqProv { sub format_rpmdescription { my $text=$parser->get_text('/rpmdescription'); $parser->get_tag('/rpmdescription'); + $text=~s/\n//g; + $text=~s/\\n/\n/g; if ($mode eq 'html') { - return $rpmdescription="\n
    RPMDESCRIPTION $text"; + return $rpmdescription="\nDescription : $text"; + } + elsif ($mode eq 'text') { + return $rpmdescription="\nDescription : $text"; } else { return ''; @@ -588,7 +699,8 @@ sub format_rpmpre { my $text=$parser->get_text('/rpmpre'); $parser->get_tag('/rpmpre'); if ($mode eq 'html') { - return $rpmpre="\n
    RPMPRE $text"; +# return $rpmpre="\n
    RPMPRE $text"; + return ''; } else { return ''; @@ -599,8 +711,15 @@ sub format_directories { my $text=$parser->get_text('/directories'); $parser->get_tag('/directories'); if ($mode eq 'html') { - return $directories="\n
    BEGIN DIRECTORIES\n$text\n
    ". - "END DIRECTORIES\n"; + return $directories="\n
     
    ". + "
    ". + "Directory Structure". + "\n$text\n
    ". + "\n"; + } + elsif ($mode eq 'text') { + return $directories="\nDirectory Structure\n$text\n". + "\n"; } elsif ($mode eq 'install') { return "\n".'directories:'."\n".$text; @@ -665,7 +784,17 @@ sub format_files { my $text=$parser->get_text('/files'); $parser->get_tag('/files'); if ($mode eq 'html') { - return $directories="\n
    BEGIN FILES\n$text\n
    END FILES\n"; + return $directories="\n
     
    ". + "
    ". + "File and Directory Structure". + "\n$text\n
    ". + "\n"; + } + elsif ($mode eq 'text') { + return $directories="\n". + "File and Directory Structure". + "\n$text\n". + "\n"; } elsif ($mode eq 'install') { return "\n".'files:'."\n".$text. @@ -853,7 +982,7 @@ END $logcmd.' && echo "'. 'Configuration source file does not exist '. ''.$sourceroot.'/'.$source.'"'. - "$logcmd); };\n\n"; + "$logcmd); } && perl verifymodown.pl ${targetroot}/${target} \"$categoryhash{$categoryname}\"$logcmd;\n\n"; } elsif ($mode eq 'build' && $build) { push @buildall,$sourceroot.'/'.$source;