version=4

# uscan repacks upstream's tarball, stripping the files listed in
# Files-Excluded: in debian/copyright (the bundled jquery minified
# JavaScript and two gperf-generated tables).  The repack suffix is
# +ds, per the convention documented in the Developer's Reference
# section "The standard for repacked tarballs".
#
# Upstream stopped publishing to SourceForge after 4.5.9.  Releases are
# discovered from the git tags on GitHub, but downloaded from upstream's
# own release area, because the GitHub tag archive unpacks into
# nagioscore-nagios-x.y.z/ rather than nagios-x.y.z/.  The two are
# otherwise byte for byte identical.
#
# pgpsigurlmangle is not used -- upstream does not publish detached
# OpenPGP signatures for the release tarball.

opts="repacksuffix=+ds,compression=xz,dversionmangle=auto,\
filenamemangle=s%.*/nagios-([\d.]+)\.tar\.gz%nagios-$1.tar.gz%,\
downloadurlmangle=s%.*/nagios-([\d.]+)\.tar\.gz%https://assets.nagios.com/downloads/nagioscore/releases/nagios-$1.tar.gz%" \
    https://github.com/NagiosEnterprises/nagioscore/tags \
    (?:.*?/)?archive/refs/tags/nagios-([\d.]+)\.tar\.gz
