diff options
Diffstat (limited to 'rpmbuildupdate')
-rwxr-xr-x | rpmbuildupdate | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/rpmbuildupdate b/rpmbuildupdate index b969ddf..63f802b 100755 --- a/rpmbuildupdate +++ b/rpmbuildupdate @@ -75,7 +75,7 @@ sub build my $found = 0; my ($version, $release); my ($spec, @url, @rpms, %specvars); - + my $top = $config{top} || `rpm --eval '%_topdir'`; chomp($top); chdir("$top/SOURCES") or die "Unable to chdir to $top/SOURCES"; @@ -143,6 +143,7 @@ sub build $spec .= $_; $spec =~ s/\%define(\s+)release(\s+)(.*)/\%define release $config{release}/; + $spec =~ s/Release:(\s+)(.*mdk)/Release:\1$config{release}/; push(@url, $2) if(/(Source[0-9]*):\s+((?:ftp|http):\S+)/i); # For %vars ! @@ -154,7 +155,7 @@ sub build { my $email; my @l = getpwuid($<); - $email = $ENV{EMAIL} || $l[6]." <$l[0]\@mandrakesoft.com> "; + $email = $ENV{EMAIL} || $l[6]." <$l[0]\@mandrakesoft.com>"; $spec .= "* ".qx[LC_TIME=C date '+%a %b %d %Y'|tr -d '\n']." ".$email. " ".$newversion."-".$config{release}."\n"; $spec .= "- New release $newversion\n\n"; @@ -202,9 +203,9 @@ sub build if (! -f "${top}/SOURCES/$basename") { - $basename =~ s/bz2/gz/; - print "Trying from fedora($basename): $config{fedora}/$pkgrpmrh\n"; - system("cd ${top}/SOURCES; rpm2cpio $config{fedora}/$pkgrpmrh | cpio -id $basename; bzme $basename"); + (my $bname = $basename) =~ s/bz2/gz/; + print "Trying from fedora($bname): $config{fedora}/$pkgrpmrh\n"; + system("cd ${top}/SOURCES; rpm2cpio $config{fedora}/$pkgrpmrh | cpio -id $bname; bzme $bname"); wait; } } |