+ 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)
+ }
+
+ if (url ~/^(http|https):\/\/cgit\..*\/(.*)\/snapshot\//) {
+ gsub("\/snapshot\/.*", "/", url)
+ d("cgit snapshot tarball url, mungled url to: " url)
+ }
+
+ if (url ~/^(http|https):\/\/www2\.aquamaniac\.de\/sites\/download\//) {
+ url = "http://www2.aquamaniac.de/sites/download/packages.php"
+ d("aquamaniac.de tarball url, mungled url to: " url)
+ }