"d" => \$options{D_FLAG},
"remove-d" => \$options{D_FLAG},
+ "dirs-only" => \$options{D_FLAG},
"r" => \$options{R_FLAG},
"no-restart-on-upgrade" => \$options{R_FLAG},
my @ret;
open (DH_FARRAY_IN,"<$file") || error("cannot read $file: $1");
while (<DH_FARRAY_IN>) {
- push @ret,split(/\s/,$_);
+ push @ret,split(' ',$_);
}
close DH_FARRAY_IN;
if command -v install-docs >/dev/null 2>&1; then
- install-docs -i /usr/share/doc-base/#PACKAGE#
+ install-docs -i /usr/share/doc-base/#DOC-ID#
fi
if command -v install-docs >/dev/null 2>&1; then
- install-docs -r #PACKAGE#
+ install-docs -r #DOC-ID#
fi
+debhelper (1.2.34) unstable; urgency=low
+
+ * dh_clean: added -d flag (also --dirs-only) that will make it clean only
+ tmp dirs. (closes: #30807)
+ * dh_installdocs: to support packages that need multiple doc-base files,
+ will now look for debian/<package>.doc-base.<doc-id>.
+ * dh_compress: removed warning message (harmless).
+
+ -- Joey Hess <joeyh@master.debian.org> Sat, 6 Feb 1999 17:48:33 -0800
+
debhelper (1.2.33) unstable; urgency=low
* dh_compress: verbose_print() cd's.
# we can preserve the hard link across the compression and save
# space in the end.
my @f=();
- my %hardlinks={};
+ my %hardlinks;
foreach (@files) {
($dev, $inode, undef, $nlink)=stat($_);
if ($nlink > 1) {
doit("install","-m","644","-p",$copyright,"$TMP/usr/doc/$PACKAGE/copyright");
}
- # Handle doc-base files.
+ # Handle doc-base files. There are two filename formats, the usual plus
+ # an extended format (debian/package.doc-base.<doc-id>). Have to
+ # come up with good document-id's too.
+ my %doc_ids;
+
+ opendir(DEB,"debian/") || error("can't read debian directory: $!");
+ foreach (grep {/^$PACKAGE\.doc-base\..*$/} readdir(DEB)) {
+ $id=$_;
+ $id=~s/\.doc-base\./-/;
+ $doc_ids{$id}="debian/$_";
+ }
+ closedir(DEB);
+
+ # These next lines handle the format debian/doc-base.<doc-id>,
+ # which is in for completeness.
+ if ($PACKAGE eq $dh{MAINPACKAGE}) {
+ opendir(DEB,"debian/") || error("can't read debian directory: $!");
+ foreach (grep {/^doc-base\..*$/} readdir(DEB)) {
+ $id=$_;
+ $id=~s/doc-base\./$PACKAGE-/;
+ $doc_ids{$id}="debian/$_";
+ }
+ closedir(DEB);
+ }
+
+ # And this handles the normal format of course.
$file=pkgfile($PACKAGE,"doc-base");
- if ($file) {
+ if ($file ne '') {
+ $doc_ids{$PACKAGE}=$file;
+ }
+
+ if (%doc_ids) {
if (! -d "$TMP/usr/share/doc-base/") {
doit("install","-d","$TMP/usr/share/doc-base/");
}
- doit("install","-p","-m644",$file,
- "$TMP/usr/share/doc-base/$PACKAGE");
+ }
+ foreach $doc_id (keys %doc_ids) {
+ doit("install","-m644","-p",$doc_ids{$doc_id},
+ "$TMP/usr/share/doc-base/$doc_id");
if (! $dh{NOSCRIPTS}) {
- autoscript($PACKAGE,"postinst","postinst-doc-base");
- autoscript($PACKAGE,"prerm","prerm-doc-base")
+ autoscript($PACKAGE,"postinst","postinst-doc-base",
+ "s/#DOC-ID#/$doc_id/",
+ );
+ autoscript($PACKAGE,"prerm","prerm-doc-base",
+ "s/#DOC-ID#/$doc_id/",
+ );
}
}
}
.BR dh_installdeb (1)
for an explanation of how this works. Note that the package name will be
used as the doc-base document id.
+.PP
+If your package needs to register more
+than one document, you need multiple files. To accomplish this, you can use
+files named debian/package.doc-base.docid. The "docid" on the end is a
+string that is combined with the package name to generate a unique doc-base
+document id.
.SH OPTIONS
.TP
.B debhelper options
----------------------
You can just use the example rules files and do the rest of the new package
-set up by hand, or you could try the new dh-make package, which contains a
+set up by hand, or you could try the dh-make package, which contains a
"dh_make" command that is similar to debmake, and tries to automate the
process.
This is the TODO for debhelper. As more and more people use debhelper, this
list grows - I welcome patches to fix items on it!
-Bugs:
-
-* all commands should print a warning message if non-cumulative parameters
- are given more than once (ie, two -u's to dh_gencontrol). (#22588)
- (Bug currently under dispute, I think this is bogus).
-
Wishlist items:
* Make dh_* "use strict".
Deprecated:
-* remove dh_installdebfiles, dh_du.
- - need to wait a reasonable length of time. I'm currently planning
- on doing this after slink is released or one year after they were
- deprecated, whichever comes first. Be sure to grep whole debian
- archive for all of them before removing them, though!
+* remove dh_installdebfiles, dh_du.
+ - need to wait a reasonable length of
+ time. I'm currently planning on doing this after slink is released or
+ one year after they were deprecated, whichever comes first. Be sure to
+ grep whole debian archive for all of them before removing them, though!