summaryrefslogtreecommitdiff
path: root/dh_installchangelogs
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-05-28 01:27:31 -0400
committerJoey Hess <joey@kitenet.net>2010-05-28 01:27:31 -0400
commit4b62726560265020e5d44453e93e49e8f44aced0 (patch)
treeb9c95f4a0dc13d75c03e1b8fa7479a1e16efe563 /dh_installchangelogs
parent9b9c3cb3c32040d00a43b328353ec509151965d4 (diff)
dh_installchangelogs: Also look for changelog files in doc(s) subdirectories. Closes: #521258
Diffstat (limited to 'dh_installchangelogs')
-rwxr-xr-xdh_installchangelogs22
1 files changed, 12 insertions, 10 deletions
diff --git a/dh_installchangelogs b/dh_installchangelogs
index 87ac11bd..a6dcc682 100755
--- a/dh_installchangelogs
+++ b/dh_installchangelogs
@@ -19,8 +19,8 @@ dh_installchangelogs is a debhelper program that is responsible for
installing changelogs into package build directories.
An upstream changelog file may be specified as an option. If none is
-specified, a few common filenames are tried. (In compatibility level 7 and
-above.)
+specified, it looks for files with names that seem likely to be changelogs.
+(In compatibility level 7 and above.)
If there is an upstream changelog file, it will be be installed as
usr/share/doc/package/changelog in the package build directory. If the
@@ -84,14 +84,16 @@ my $upstream=shift;
my $changelog_name="changelog.Debian";
if (! defined $upstream) {
if (! isnative($dh{MAINPACKAGE}) && !compat(6)) {
- my @files=sort glob("*");
- foreach my $name (qw{changelog changes changelog.txt changes.txt history history.txt}) {
- my @matches=grep {
- lc $_ eq $name && -s $_ && ! excludefile($_)
- } @files;
- if (@matches) {
- $upstream=shift @matches;
- last;
+ foreach my $dir (qw{. doc docs}) {
+ my @files=sort glob("$dir/*");
+ foreach my $name (qw{changelog changes changelog.txt changes.txt history history.txt}) {
+ my @matches=grep {
+ lc basename($_) eq $name && -s $_ && ! excludefile($_)
+ } @files;
+ if (@matches) {
+ $upstream=shift @matches;
+ last;
+ }
}
}
}