diff options
-rwxr-xr-x | rpmbuildupdate | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rpmbuildupdate b/rpmbuildupdate index 2ef0e5b..1c1e0a9 100755 --- a/rpmbuildupdate +++ b/rpmbuildupdate @@ -280,7 +280,7 @@ sub build { # For %vars ! $specvars{$1} = $2 if /\%define\s+(\S+?)\s+(\S+)/g; - foreach my $i ('url', 'name', 'version', 'release') { + foreach my $i ('url', 'name', 'version', 'release', 'epoch') { $specvars{$i} = $1 if !$specvars{$i} && /\b$i\s*:\s+(\S+)/gi; } @@ -291,8 +291,9 @@ sub build { chomp($packager); # if macro is undefined $packager =~ s/\%packager//g; + my $epoch = ( $specvars{'epoch'} ? "$specvars{'epoch'}:" : "" ); my $email = $packager ? $packager : $l[6] . ($ENV{EMAIL} ? " <$ENV{EMAIL}>" : " <$l[0]\@mandriva.com>"); - $spec .= "* " . `LC_TIME=C date '+%a %b %d %Y'|tr -d '\n'` . " $email $newversion-$newrelease\n"; + $spec .= "* " . `LC_TIME=C date '+%a %b %d %Y'|tr -d '\n'` . " $email $epoch$newversion-$newrelease\n"; $spec .= "$message\n\n"; } |