From 49c43971b70a4df332cc7b704ada23a924d95981 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Tue, 17 Aug 2004 11:35:34 +0000 Subject: - better autodetection of sourceforge url. --- rpmbuildupdate | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rpmbuildupdate b/rpmbuildupdate index 2563fea..3d0fdc8 100755 --- a/rpmbuildupdate +++ b/rpmbuildupdate @@ -235,8 +235,13 @@ sub build if(!$url[0]) { - print "URL of sources was not found ! Trying to guess it with url tag ...\n"; - push(@url, $specvars{'url'}.'/'.$tar_ball) + print "URL of sources was not found ! Trying to guess it with url tag ...\n"; + my $url=$specvars{'url'}; + if ($url =~ m!http://(.*)\.((?:sourceforge|sf)\.net)/(.*)!) + { + $url="http://prdownloads.$2/$1/$3" unless $1 eq 'prdownloads'; + } + push(@url, $url.'/'.$tar_ball) } $found = 0; -- cgit v1.2.1