path: root/dh_installchangelogs
diff options
authorjoey <joey>2002-07-19 00:58:01 +0000
committerjoey <joey>2002-07-19 00:58:01 +0000
commit699d0e5c2bd5bcd52a1833a802281ca66d7ae111 (patch)
tree32e4bf6134ab9281fd07d5f2cb9dff7d910327da /dh_installchangelogs
parent620d5c492f5bfd918f3d88a8270b5e4565a41635 (diff)
r538: * Make dh_installchangelogs install debian/NEWS files as well, as
NEWS.Debian. Make dh_compress always compress them. The idea is to make these files be in a machine parsable form, like the debian changelog, but only put newsworthy info into them. Automated tools can then display new news on upgrade. It is hoped that if this catches on it will reduce the abuse of debconf notes. See discussion on debian-devel for details.
Diffstat (limited to 'dh_installchangelogs')
1 files changed, 16 insertions, 0 deletions
diff --git a/dh_installchangelogs b/dh_installchangelogs
index dc9b5a0..2588d57 100755
--- a/dh_installchangelogs
+++ b/dh_installchangelogs
@@ -25,6 +25,12 @@ into usr/share/doc/package/changelog.Debian in the package build directory. (If
files named debian/package.changelog exist, they will be used in preference
to debian/changelog.)
+Parallelling the debian changelog handling, this program also takes care of
+debian NEWS files. If there is a debian/NEWS file, it is installed as
+usr/share/doc/package/NEWS for native packages, and as
+usr/share/doc/package/NEWS.Debian for non-native packages. debian/package.NEWS
+files can also be used.
If an upstream changelog file is specified as an option, and the package is
not a native debian package, then this upstream changelog will be installed
as usr/share/doc/package/changelog in the package build directory. If the
@@ -67,17 +73,23 @@ if (isnative($dh{MAINPACKAGE}) && defined $upstream) {
my $changelog_name="changelog.Debian";
+my $news_name="NEWS.Debian";
if (isnative($dh{MAINPACKAGE})) {
+ $news_name='NEWS';
foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp=tmpdir($package);
my $changelog=pkgfile($package,"changelog");
+ my $news=pkgfile($package,"NEWS");
if (!$changelog) {
+ if (!$news) {
+ $news="debian/NEWS";
+ }
if (! -e $changelog) {
error("could not find changelog $changelog");
@@ -93,6 +105,10 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
+ if (-e $news) {
+ doit("install","-o",0,"-g",0,"-p","-m644",$news,
+ "$tmp/usr/share/doc/$package/$news_name");
+ }
if ($upstream) {
my $link_to;