# debian/watch
# Debian uscan file for ‘openjdk-7’ package.
# Manpage: ‘uscan(1)’

# Dependencies: gpgv2
# GnuPG >= 2.1 is required to be able to handle the IcedTea key.

# Compulsory line, this is a version 4 file.
version=4

# Get IcedTea tarball
# IcedTea has no 7uXXX version. IcedTea based on OpenJDK 7 based
# is versioned as 2.X.X.
# - filter out the initial 7uXXX- from debian version
# - ignore any upstream version that does not start with 2. by forcing 
#   them to start with 0. instead - ie. we filter out 3.x.x that is
#   based on OpenJDK 8 by turning it into 0.x.x)
# We then call debian/repack to handle the download of the IcedTea's 
# OpenJDK forest as the data of the exact URLs to get those are all
# inside IcedTea's tarball.
opts="dversionmangle=s/^7u\d+-//,uversionmangle=s/^[^2]\./0./,pgpsigurlmangle=s%$%.sig%" \
    http://icedtea.classpath.org/download/source/icedtea-([\d\.]*).tar.xz \
    debian
opts="component=icedtea-sound,pgpsigurlmangle=s%$%.sig%" \
    http://icedtea.wildebeest.org/download/source/icedtea-sound-([\d\.]+).tar.xz \
    1.0 debian/repack
