Scroll to navigation

USCAN-TEMPLATES(5) USCAN-TEMPLATES(5)

NAME

uscan-templates - Available templates for uscan(1).

USING TEMPLATES

Templates simplify the debian/watch file. You just have to indicate the template to use and the specific arguments. Example:

  Version: 5
  Template: GitHub
  Dist: https://github.com/guimard/llng-docker

Or:

  Version: 5
  Template: GitHub
  Owner: guimard
  Project: llng-docker

Other parameters can be added as usual. Example:

  Version: 5
  Template: GitHub
  Owner: guimard
  Project: llng-docker
  Version-Mangle: auto

AVAILABLE TEMPLATES

Here is the list of available templates:

  • "Bioconductor"
  • "CRAN"
  • "GitHub"
  • "GitLab"
  • "Metacpan"
  • "Npmregistry"
  • "Pypi"

Bioconductor

This template fetches a Bioconductor R package's source from bioconductor.org, the main mirror.

Specific parameters

Package: name of the package.

Example

  Version: 5
  Template: Bioconductor
  Package: IRanges

CRAN

This template fetches a CRAN (Complete R Archive Network) package's source from cran.r-project.org, the main mirror.

Specific parameters

Package: name of the package.

Example

  Version: 5
  Template: CRAN
  Package: vegan

GitHub

This template uses GitHub API to find archives to download.

Specific parameters

  • Dist: URL to the project
  • Owner <owner> (ignored if "Dist" is used)
  • Project <project> (ignored if "Dist" is used)
  • Release-Only <yes>: when set, search only in "/releases" instead of "/tags"
  • Version-Type (default: ANY_VERSION): by default, templates use ANY_VERSION macro to find valid version. You can override this here using a valid macro name (ANY_VERSION or STABLE_VERSION or SEMANTIC_VERSION)
  • Custom-Version (capturing version regexp): Use a custom version regexp. Syntax is the same used for versions in Matching-Pattern. Example:

      Custom-Version: v(0\.7\.\d+)
        

    This parameter takes precedence over Version-Type and can use its valid macro names, like in

      Custom-Version: version_@ANY_VERSION@
        

Example

Using the Dist parameter:

  Version: 5
  Template: GitHub
  Dist: https://github.com/guimard/llng-docker

Using the Owner and Project parameters:

  Version: 5
  Template: GitHub
  Owner: guimard
  Project: llng-docker

GitLab

This template uses Mode: gitlab to download package.

Specific parameters

  • Dist: URL to the project
  • Release-Only <yes>: when set, search only in "/releases" instead of "/tags"
  • Version-Type (default: ANY_VERSION): by default, templates use ANY_VERSION macro to find valid version. You can override this here using a valid macro name (ANY_VERSION or STABLE_VERSION or SEMANTIC_VERSION)
  • Custom-Version (capturing version regexp): Use a custom version regexp. Syntax is the same used for versions in Matching-Pattern. Example:

      Custom-Version: v(0\.7\.\d+)
        

    This parameter takes precedence over Version-Type and can use its valid macro names, like in

      Custom-Version: version_@ANY_VERSION@
        

Example

  Version: 5
  Template: GitLab
  Dist: https://salsa.debian.org/debian/devscripts

Metacpan

This template uses MetaCPAN::Client(3pm) to download package.

Specific parameters

  • Dist: distribution name (with "::" or "-")
  • Version-Type (default: ANY_VERSION): by default, templates use ANY_VERSION macro to find valid version. You can override this here using a valid macro name (ANY_VERSION or STABLE_VERSION or SEMANTIC_VERSION)

Example

  Version: 5
  Template: Metacpan
  Dist: MetaCPAN-Client

Npmregistry

Specific parameters

  • Dist: distribution name
  • Version-Type (default: ANY_VERSION): by default, templates use ANY_VERSION macro to find valid version. You can override this here using a valid macro name (ANY_VERSION or STABLE_VERSION or SEMANTIC_VERSION)

Example

  Version: 5
  Template: Npmregistry
  Dist: @lemonldapng/handler

Pypi

This template uses pypi.debian.net to download the tarball.

Specific parameters

  • Dist: name of the project
  • Version-Type (default: ANY_VERSION): by default, templates use ANY_VERSION macro to find valid version. You can override this here using a valid macro name (ANY_VERSION or STABLE_VERSION or SEMANTIC_VERSION)

Example

  Version: 5
  Template: Pypi
  Dist: bitbox02

Adding templates

If you want to add a template in uscan, you can find the documentation here:

  $ perldoc /usr/share/perl5/Devscripts/Uscan/Templates.pod

Then build a merge-request into the devscripts project <https://salsa.debian.org/debian/devscripts>.

Authors

Xavier Guimard <yadd@debian.org>
2026-05-17 Debian Utilities