version 1.51, 2002/10/13 17:27:49
|
version 1.53, 2005/12/09 20:41:35
|
Line 313 my $targets;
|
Line 313 my $targets;
|
my $target; |
my $target; |
my $source; |
my $source; |
my $note; |
my $note; |
|
my $installscript; |
my $build; |
my $build; |
my $buildlink; |
my $buildlink; |
my $commands; |
my $commands; |
Line 384 $parser->{textify}={
|
Line 385 $parser->{textify}={
|
target => \&format_target, |
target => \&format_target, |
note => \&format_note, |
note => \&format_note, |
build => \&format_build, |
build => \&format_build, |
|
installscript => \&format_installscript, |
status => \&format_status, |
status => \&format_status, |
dependencies => \&format_dependencies, |
dependencies => \&format_dependencies, |
|
privatedependencies => \&format_privatedependencies, |
buildlink => \&format_buildlink, |
buildlink => \&format_buildlink, |
glob => \&format_glob, |
glob => \&format_glob, |
sourcedir => \&format_sourcedir, |
sourcedir => \&format_sourcedir, |
Line 642 sub format_category {
|
Line 645 sub format_category {
|
my ($user,$group)=split(/\:/,$chown); |
my ($user,$group)=split(/\:/,$chown); |
$categoryhash{$category_att_name}='-o '.$user.' -g '.$group. |
$categoryhash{$category_att_name}='-o '.$user.' -g '.$group. |
' -m '.$chmod; |
' -m '.$chmod; |
|
$categoryhash{"chmod.".$category_att_name}=$chmod; |
|
$categoryhash{"chown.".$category_att_name}=$chown; |
} |
} |
return ''; |
return ''; |
} |
} |
Line 1217 sub format_links {
|
Line 1222 sub format_links {
|
sub format_file { |
sub format_file { |
my @tokeninfo=@_; |
my @tokeninfo=@_; |
$file=''; $source=''; $target=''; $categoryname=''; $description=''; |
$file=''; $source=''; $target=''; $categoryname=''; $description=''; |
$note=''; $build=''; $status=''; $dependencies=''; |
$note=''; $build=''; $status=''; $dependencies=''; $installscript=''; |
my $text=&trim($parser->get_text('/file')); |
my $text=&trim($parser->get_text('/file')); |
my $buildtest; |
my $buildtest; |
$file_count++; |
$file_count++; |
Line 1236 sub format_file {
|
Line 1241 sub format_file {
|
my (@deps)=split(/\;/,$dependencies); |
my (@deps)=split(/\;/,$dependencies); |
my $retval=join("\n",($source, |
my $retval=join("\n",($source, |
(map {"$command$_"} @deps))); |
(map {"$command$_"} @deps))); |
|
if ($tokeninfo[2]{type} eq 'private') { |
|
return "\n"; |
|
} |
return $retval."\n"; |
return $retval."\n"; |
} |
} |
elsif ($mode eq 'html') { |
elsif ($mode eq 'html') { |
Line 1290 END
|
Line 1298 END
|
fi |
fi |
END |
END |
} |
} |
|
if ($installscript) { |
|
my $dir = $sourceroot.'/'.$source; |
|
$dir =~ s|/([^/]*)$||; |
|
return <<"END"; |
|
$buildtest cd $dir ; sh $installscript\\ |
|
chmod -R $categoryhash{chmod.$categoryname} ${targetroot}/${target} \\ |
|
chown -R $categoryhash{chown.$categoryname} ${targetroot}/${target} \\ |
|
END |
|
} |
my $bflag='-b1'; |
my $bflag='-b1'; |
$bflag='-b3' if $dependencies or $buildlink; |
$bflag='-b3' if $dependencies or $buildlink; |
return <<END; |
return <<END; |
Line 1593 sub format_build {
|
Line 1610 sub format_build {
|
} |
} |
return ''; |
return ''; |
} |
} |
|
# ------------------------------------------------ Format installscript section |
|
sub format_installscript { |
|
my @tokeninfo=@_; |
|
$installscript= &trim($parser->get_text('/installscript')); |
|
if ($installscript) { |
|
$parser->get_tag('/installscript'); |
|
$installscript=~s/([^\\])\\\s+/$1/g; # allow for lines split onto new lines |
|
} |
|
return ''; |
|
} |
# -------------------------------------------------------- Format build section |
# -------------------------------------------------------- Format build section |
sub format_buildlink { |
sub format_buildlink { |
my @tokeninfo=@_; |
my @tokeninfo=@_; |
Line 1618 sub format_status {
|
Line 1645 sub format_status {
|
# ------------------------------------------------- Format dependencies section |
# ------------------------------------------------- Format dependencies section |
sub format_dependencies { |
sub format_dependencies { |
my @tokeninfo=@_; |
my @tokeninfo=@_; |
$dependencies=''; |
#$dependencies=''; |
my $text=&trim($parser->get_text('/dependencies')); |
my $text=&trim($parser->get_text('/dependencies')); |
if ($text) { |
if ($text) { |
$parser->get_tag('/dependencies'); |
$parser->get_tag('/dependencies'); |
$dependencies=join(';', |
$dependencies=join(';',((map {s/^\s*//;s/\s$//;$_} split(/\;/,$text)),$dependencies)); |
(map {s/^\s*//;s/\s$//;$_} split(/\;/,$text))); |
$dependencies=~s/;$//; |
|
} |
|
return ''; |
|
} |
|
sub format_privatedependencies { |
|
my @tokeninfo=@_; |
|
#$dependencies=''; |
|
my $text=&trim($parser->get_text('/privatedependencies')); |
|
if ($text) { |
|
$parser->get_tag('/privatedependencies'); |
|
if ($mode eq 'MANIFEST') { return ''; } |
|
$dependencies=join(';',((map {s/^\s*//;s/\s$//;$_} split(/\;/,$text)),$dependencies)); |
|
$dependencies=~s/;$//; |
} |
} |
return ''; |
return ''; |
} |
} |