summaryrefslogtreecommitdiffstats
path: root/debian/gen-provides
blob: c9e971e426000e3d996cd77ec488001312e35d52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl

use strict;
use warnings;
use Debian::Debhelper::Dh_Lib qw(error);

my @provides;
my $lowest = Debian::Debhelper::Dh_Lib::LOWEST_VIRTUAL_DEBHELPER_COMPAT_LEVEL
    // error("LOWEST_VIRTUAL_DEBHELPER_COMPAT_LEVEL is undef");
my $highest = Debian::Debhelper::Dh_Lib::HIGHEST_STABLE_COMPAT_LEVEL
    // error("HIGHEST_STABLE_COMPAT_LEVEL is undef");

if ($highest < $lowest) {
    error("HIGHEST_STABLE_COMPAT_LEVEL is lower than LOWEST_VIRTUAL_DEBHELPER_COMPAT_LEVEL");
}

for (my $i = $lowest ; $i <= $highest ; $i++) {
    push(@provides, "debhelper-compat (= $i)");
}
print "dh:CompatLevels=" . join(", ", @provides) . "\n";