+ gsub("/.*", "", url)
+ url = "http://sourceforge.net/projects/" url "/files/"
+ d("sf url, mungled url to: " url)
+ }
+
+ if (url ~ /^http:\/\/(.*)\.googlecode\.com\/files\//) {
+ gsub("^http://", "", url)
+ gsub("\..*", "", url)
+ url = "http://code.google.com/p/" url "/downloads/list"
+ d("googlecode url, mungled url to: " url)
+ }
+
+ if (url ~ /^http:\/\/pecl.php.net\/get\//) {
+ gsub("-.*", "", filename)
+ url = "http://pecl.php.net/package/" filename
+ d("pecl.php.net url, mungled url to: " url)
+ }
+
+ if (url ~ /^(http|ftp):\/\/mysql.*\/Downloads\/MySQL-5.1\//) {
+ url = "http://dev.mysql.com/downloads/mysql/5.1.html#source"
+ d("mysql 5.1 url, mungled url to: " url)
+ }
+
+ if (url ~/^(http|https):\/\/launchpad\.net\/(.*)\//) {
+ gsub("^(http|https):\/\/launchpad\.net\/", "", url)
+ gsub("\/.*/", "", url)
+ url = "https://code.launchpad.net/" url "/+download"
+ d("main launchpad url, mungled url to: " url)
+ }
+
+ if (url ~/^(http|https):\/\/edge\.launchpad\.net\/(.*)\//) {
+ gsub("^(http|https):\/\/edge\.launchpad\.net\/", "", url)
+ gsub("\/.*/", "", url)
+ url = "https://edge.launchpad.net/" url "/+download"
+ d("edge launchpad url, mungled url to: " url)
+ }
+
+ if (url ~/^(http|https):\/\/github.com\/.*\/(.*)\/tarball\//) {
+ gsub("\/tarball\/.*", "/downloads", url)
+ d("github tarball url, mungled url to: " url)