--- cpan2rpm.orig 2004-10-14 23:12:59.000000000 -0700 +++ cpan2rpm 2004-10-15 00:46:19.000000000 -0700 @@ -114,8 +114,8 @@ "doc=s" => "adds to the spec's %doc section", "define=s@" => "define macros", # -- section options - "prologue=s" => "inserts text at beginning of section", - "epilogue=s" => "inserts text at end of section", + "prologue=s@" => "inserts text at beginning of section", + "epilogue=s@" => "inserts text at end of section", # -- build options "spec-only" => "only generates spec file", "spec=s" => "specifies the name of a spec file", @@ -607,6 +607,7 @@ $info->{doc} ||= ""; $info->{doc} = join " ", $info->{doc}, keys %doc unless $info->{doc} =~ /^=/; + $info->{doc} =~ s/^=//; $info->{doc} &&= "%doc $info->{doc}"; # fixes the #! so perl can be found (and deps get made ok) @@ -663,14 +664,18 @@ # section handlers my $prologue = $info->{prologue}; + delete $info->{prologue}; for (@$prologue) { - my ($sec, $v) = /^(\w+):(.*)$/ || next; + /^(\w+):(.*)$/ || next; + my ($sec, $v) = ($1, $2); $info->{prologue}{$sec} = $v . $/; } my $epilogue = $info->{epilogue}; + delete $info->{epilogue}; for (@$epilogue) { - my ($sec, $v) = /^(\w+):(.*)$/ || next; + /^(\w+):(.*)$/ || next; + my ($sec, $v) = ($1, $2); $info->{epilogue}{$sec} = $v . $/; } @@ -1569,7 +1574,7 @@ my $info = shift; my $nm = shift; my $ret = qq|$/%$nm|; - $ret .= "$/$info->{prologue}{$nm}" if $info->{proglogue}{$nm}; + $ret .= "$/$info->{prologue}{$nm}" if $info->{prologue}{$nm}; $ret .= "$/$_" for @_; $ret .= "$/$info->{epilogue}{$nm}" if $info->{epilogue}{$nm}; $ret;