# Use version 3 so uupdate.sh is passed the tarball name.
#
# Specify no-symlink so uscan doesn't try to invoke mk-origtargz to repack
# the upstream tarball; debian/uupdate.sh will handle this, because upstream
# ships their sources tarball within the download tarball.
#
# The sf.net redirector (see https://wiki.debian.org/debian/watch#SourceForge)
# finds both "wsjtx-${version}.tgz" AND "wsjtx-${version}/wsjtx-${version}.tgz"
# The first uversionmangle rule avoids a greedy regex match returning a version
# like "wsjtx-${version}/wsjtx-${version}".  The second maps '-' to '~'.
# Examples returns from the sf.net redirector.
#
#   https://qa.debian.org/watch/sf.php/wsjt-x-improved/wsjtx-2.7.1-devel_improved_PLUS_240814.tgz (2.7.1~devel240814) index=2.7.1~devel240814-0
#
# The _[^_]+ suffix on the version number is to avoid catching the _qt6 tarballs.

version=3
opts="uversionmangle=s/.*\/wsjtx-//;s/-(devel|beta|rc)/~$1/;s/_improved_PLUS_/+/;,dversionmangle=s/\+repack//,repacksuffix=+repack" \
http://sf.net/wsjt-x-improved/wsjtx-(.*?_improved_PLUS_[^_]+)\.tgz debian debian/uupdate.sh
