version=4
# if you need to download other versions replace the URL below with this one:
# https://static.rust-lang.org/dist/channel-rust-$VERSION.toml
# and also add searchmode=plain,\
# it's a bit slower to download, that's why we use the other one normally

opts="\
pgpsigurlmangle=s/$/.asc/,\
uversionmangle=s/(\d)[_.+-]?((beta|alpha)\.?\d*)$/$1~$2/,\
dversionmangle=s/\+dfsg\d\+llvm*$//,\
downloadurlmangle=s/https:\/\/.+?tarball\/(@ANY_VERSION@)$/https:\/\/static.rust-lang.org\/dist\/rustc-$1-src.tar.xz/,\
filenamemangle=s/@ANY_VERSION@/rustc-$1-src.tar.xz$2/,\
repack,\
repacksuffix=+dfsg1~llvm,\
compression=xz,\
searchmode=plain,\
" \
 https://api.github.com/repos/rust-lang/rust/releases?per_page=100 \
 https://api.github.com/repos/[^/]+/[^/]+/tarball/v?@ANY_VERSION@
