Andrius,

I am very much not a uscan expert, but the attached watch file appears to do 
what you want.

Key changes are:

1.  Adding a dversionmangle line to each entry that modifies the Debian version 
number to extract the information that should be used for each upstream 
tarball.  Your case is a little interesting because one of the tarballs has a 
different numbering scheme.

2.  Change the version entries to remove `group` and use `ignore` on the last 
entry.

3.  Add `uupdate` as the script at the end of the file.

There are probably many other ways you could accomplish this.

Soren

PS.  I find the following as a good way to test:

uscan -vv --download-current-version

For best results, delete all previously downloaded tarballs prior to running 
the command.  -vv generally provides the right about of debugging verbosity.

On Thursday, May 2, 2024 2:58:39 AM MST Andrius Merkys wrote:
> Hello,
> 
> I am writing a watchfile for vst3sdk, you can find it on salsa [1]. I
> cannot get 'same' components downloaded, 'uscan
> --download-current-version' fails with the following:
> 
> uscan warn: In debian/watch no matching hrefs for version  in watch line
>    https://github.com/steinbergmedia/vst3_base/tags
> (?:.*?/)?v([0-9\.]+_build_\d+)(?i)(?:\.(?:tar\.xz|tar\.bz2|tar\.gz|
tar\.zstd?|
> zip|tgz|tbz|txz)) same
> 
> It is strange that uscan does not seem to know the version to download
> (notice the empty space after 'no matching hrefs for version' in the
> error message).
> 
> I would appreciate any help with this.
> 
> [1] https://salsa.debian.org/merkys/vst3sdk/-/raw/master/debian/watch
> 
> Best,
> Andrius


-- 
Soren Stoutner
so...@debian.org
version=4
opts="filenamemangle=s%v@ANY_VERSION@_build_\d+(@ARCHIVE_EXT@)%@PACKAGE@-$1$2%, 
uversionmangle=s/_build_/\./, dversionmangle=s/\+.*//" \
https://github.com/steinbergmedia/vst3sdk/tags \
    (?:.*?/)?v([0-9\.]+_build_\d+)@ARCHIVE_EXT@

opts="filenamemangle=s%v@ANY_VERSION@_build_\d+(@ARCHIVE_EXT@)%@PACKAGE@-base-$1$2%,
 uversionmangle=s/_build_/\./, dversionmangle=s/\+.*//, component=base" \
https://github.com/steinbergmedia/vst3_base/tags \
    (?:.*?/)?v([0-9\.]+_build_\d+)@ARCHIVE_EXT@ same

opts="filenamemangle=s%v@ANY_VERSION@_build_\d+(@ARCHIVE_EXT@)%@PACKAGE@-cmake-$1$2%,
 uversionmangle=s/_build_/\./, dversionmangle=s/\+.*//, component=cmake" \
https://github.com/steinbergmedia/vst3_cmake/tags \
    (?:.*?/)?v([0-9\.]+_build_\d+)@ARCHIVE_EXT@ same

## doc/ contains a lot of files diagnosed as source-is-missing by lintian
# 
opts="filenamemangle=s%v@ANY_VERSION@_build_\d+(@ARCHIVE_EXT@)%@PACKAGE@-doc-$1$2%,
 dversionmangle=s/\+.*//, component=doc" \
# https://github.com/steinbergmedia/vst3_doc/tags \
#     (?:.*?/)?v?@ANY_VERSION@_build_\d+@ARCHIVE_EXT@ same

opts="filenamemangle=s%v@ANY_VERSION@_build_\d+(@ARCHIVE_EXT@)%@PACKAGE@-pluginterfaces-$1$2%,
 uversionmangle=s/_build_/\./, dversionmangle=s/\+.*//, 
component=pluginterfaces" \
https://github.com/steinbergmedia/vst3_pluginterfaces/tags \
    (?:.*?/)?v([0-9\.]+_build_\d+)@ARCHIVE_EXT@ same

opts="filenamemangle=s%v@ANY_VERSION@_build_\d+(@ARCHIVE_EXT@)%@pack...@-public.sdk-$1$2%,
 uversionmangle=s/_build_/\./, dversionmangle=s/\+.*//, component=public.sdk" \
https://github.com/steinbergmedia/vst3_public_sdk/tags \
    (?:.*?/)?v([0-9\.]+_build_\d+)@ARCHIVE_EXT@ same

# 
opts="filenamemangle=s%v@ANY_VERSION@_build_\d+(@ARCHIVE_EXT@)%@PACKAGE@-tutorials-$1$2%,
 dversionmangle=s/\+.*//, component=tutorials" \
# https://github.com/steinbergmedia/vst3_tutorials/tags \
#     (?:.*?/)?v?@ANY_VERSION@_build_\d+@ARCHIVE_EXT@ same

opts="filenamemangle=s%v@ANY_VERSION@_build_\d+(@ARCHIVE_EXT@)%@PACKAGE@-vstgui4-$1$2%,
 dversionmangle=s/.*~//, uversionmangle=s/_/\./g, component=vstgui4" \
https://github.com/steinbergmedia/vstgui/tags \
    (?:.*?/)?vstgui(4_\d+_\d+)@ARCHIVE_EXT@ ignore uupdate

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to