used.
An upstream changelog file may be specified as an option. If none is
-specified, a few common filenames are tried. (In compatability level 7 and
+specified, a few common filenames are tried. (In compatibility level 7 and
above.)
If there is an upstream changelog file, it will be be installed as
my $changelog_name="changelog.Debian";
if (! defined $upstream) {
if (! isnative($dh{MAINPACKAGE}) && !compat(6)) {
- foreach my $name (qw{ChangeLog Changelog Changes CHANGES changelog}) {
- if (-e $name) {
- $upstream=$name;
+ my @files=sort glob("*");
+ foreach my $name (qw{changelog changes}) {
+ my @matches=grep { lc $_ eq $name && -s $_ } @files;
+ if (@matches) {
+ $upstream=shift @matches;
last;
}
}