version=4
# check: uscan --report
# update: gbp import-orig --upstream-vcs-tag=vX.Y.Z --uscan

opts=\
uversionmangle=s/\d\K-([a-z]+)\.?(\d)?/~$1$2/,\
filenamemangle=s/.*?@ANY_VERSION@(@ARCHIVE_EXT@)/@PACKAGE@_$1.orig$2/,\
downloadurlmangle=s!api.github.com/repos/[^/]+/[^/]+/\Kgit/!tarball/!g,\
searchmode=plain,\
dversionmangle=auto \
https://api.github.com/repos/algesten/ureq/git/matching-refs/tags/ \
https://api.github.com/repos/[^/]+/[^/]+/git/refs/tags/@ANY_VERSION@ \
group

opts=\
component=Xproto,\
uversionmangle=s/\d\K[-.](alpha|beta|rc)\.?/~$1/,\
filenamemangle=s/.*?@ANY_VERSION@(@ARCHIVE_EXT@)/@PACKAGE@_$1.orig-Xproto$2/,\
dversionmangle=auto \
https://github.com/algesten/ureq-proto/tags \
.*?(0\.4\.\d)@ARCHIVE_EXT@ \
group
