# Upstream has release tags like "RELEASE.2024-11-17T19-35-25Z", which don't parse into a nice
# package version. Extract the date components and strip out the hyphens to produce a nicer version.
# The version mangle also prefixes a "0.0~" just in case upstream decides to switch from timestamps
# to a semantic versioning approach down the road so we wouldn't need an epoch bump to deal with
# such a change.

version=4
opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%@PACKAGE@-$1.tar.gz%,\
      uversionmangle=s/(\d{4})-(\d{2})-(\d{2})/0.0~$1$2$3/" \
  https://github.com/minio/mc/tags .*/RELEASE\.(\d{4}-\d{2}-\d{2})T\d{2}-\d{2}-\d{2}Z\.tar\.gz debian
