# It's a sin to parse html with regex:
# https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags
# But currently we've no choice since uscan doesn't support custom downloader.
# Moreover, we use a hack of passing filename as query string.

version=4

opts=\
pgpmode=next,\
pagemangle=s!<a(\s+)href="([^"]*)"[^>]*>(mlucas-[\.\d]+\.tar\.xz)</a>!<a$1href="$2?filename=$3"></a>!g,\
filenamemangle=s/.+\?filename=(.+)/$1/ \
https://notabug.org/alexvong1995/mlucas/releases/ \
.+\?filename=mlucas-([\.\d]+)\.tar\.xz \
debian

opts=\
pgpmode=previous,\
pagemangle=s!<a(\s+)href="([^"]*)"[^>]*>(mlucas-[\.\d]+\.tar\.xz\.asc)</a>!<a$1href="$2?filename=$3"></a>!g,\
filenamemangle=s/.+\?filename=(.+)/$1/ \
https://notabug.org/alexvong1995/mlucas/releases/ \
.+\?filename=mlucas-([\.\d]+)\.tar\.xz\.asc \
previous \
uupdate
