summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey>2002-01-27 00:25:37 +0000
committerjoey <joey>2002-01-27 00:25:37 +0000
commit4f577ba14b2e6e8571246717a1eec408c9b618ae (patch)
tree4b6df3d7ebe79466ad063ae8ce1c7b406771a7d9
parentd6f3bdb1c18ff73a755949134c8850a7b075289f (diff)
r503: * dh_installman: more documentation about the .TH line. Closes: #129205
* dh_installxfonts: - Packages that use this should depend on xutils. See man page. - However, if you really want to, you can skip the dep, and the postinst will avoid running program that arn't available. Closes: #131053 - Use update-fonts-dir instead of handling encodings ourselves. Yay! - Pass only the last component of the directory name to update-fonts-*, since that's what they perfer now. - Other changes, chould fully comply with Debian X font policy now.
-rw-r--r--autoscripts/postinst-xfonts20
-rw-r--r--autoscripts/postrm-xfonts23
-rw-r--r--debian/changelog14
-rwxr-xr-xdh_clean2
-rwxr-xr-xdh_installman8
-rwxr-xr-xdh_installxfonts41
6 files changed, 49 insertions, 59 deletions
diff --git a/autoscripts/postinst-xfonts b/autoscripts/postinst-xfonts
index af02e124..4c5ab1b8 100644
--- a/autoscripts/postinst-xfonts
+++ b/autoscripts/postinst-xfonts
@@ -1,19 +1,3 @@
-makefontdir() {
- ENCDIR=/usr/lib/X11/fonts/encodings
- if [ -d $ENCDIR -a -d $ENCDIR/large ]; then
- /usr/bin/X11/mkfontdir -e $ENCDIR -e $ENCDIR/large "$@"
- else
- /usr/bin/X11/mkfontdir "$@"
- fi
-}
-
-if [ "$1" = "configure" ]; then
- fontdirs="#FONTDIRS#"
- updatecmds="#UPDATECMDS#"
-
- for dir in $fontdirs; do
- for currentcmd in $updatecmds; do
- $currentcmd /usr/lib/X11/fonts/$dir
- done
- done
+if [ -x /usr/sbin/update-fonts-dir ]; then
+ #CMDS#
fi
diff --git a/autoscripts/postrm-xfonts b/autoscripts/postrm-xfonts
index 29cec435..a9afcabe 100644
--- a/autoscripts/postrm-xfonts
+++ b/autoscripts/postrm-xfonts
@@ -1,22 +1,3 @@
-makefontdir() {
- ENCDIR=/usr/lib/X11/fonts/encodings
- if [ -d $ENCDIR -a -d $ENCDIR/large ]; then
- /usr/bin/X11/mkfontdir -e $ENCDIR -e $ENCDIR/large "$@"
- else
- /usr/bin/X11/mkfontdir "$@"
- fi
-}
-
-fontdirs="#FONTDIRS#"
-updatecmds="#UPDATECMDS#"
-
-if [ "$1" = "purge" -o "$1" = "remove" -o "$1" = "disappear" ]; then
- for currentdir in $fontdirs; do
- longdir=/usr/lib/X11/fonts/$currentdir
- if [ -d $longdir ]; then
- for currentcmd in $updatecmds; do
- $currentcmd $longdir
- done
- fi
- done
+if [ "$1" != "upgrade" -a -x /usr/sbin/update-fonts-dir ]; then
+ #CMDS#
fi
diff --git a/debian/changelog b/debian/changelog
index a009e1e0..ebe4eef3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,17 @@
+debhelper (3.4.2) unstable; urgency=low
+
+ * dh_installman: more documentation about the .TH line. Closes: #129205
+ * dh_installxfonts:
+ - Packages that use this should depend on xutils. See man page.
+ - However, if you really want to, you can skip the dep, and the
+ postinst will avoid running program that arn't available. Closes: #131053
+ - Use update-fonts-dir instead of handling encodings ourselves. Yay!
+ - Pass only the last component of the directory name to
+ update-fonts-*, since that's what they perfer now.
+ - Other changes, chould fully comply with Debian X font policy now.
+
+ -- Joey Hess <joeyh@debian.org> Tue, 15 Jan 2002 12:17:43 -0500
+
debhelper (3.4.1) unstable; urgency=low
* Fixed programmer's documentation of DOINDEP and DOARCH, Closes: #128546
diff --git a/dh_clean b/dh_clean
index 6e482118..095844aa 100755
--- a/dh_clean
+++ b/dh_clean
@@ -92,7 +92,7 @@ if (! $dh{D_FLAG}) {
# parameters). Note that you _don't_ quote wildcards used by find
# in here.
doit(split(/\s+/,"find . -type f -a
- ( -name #*# -o -name *~ -o -name DEADJOE
+ ( -name #*# -o -name .*~ -o -name *~ -o -name DEADJOE
-o -name *.orig -o -name *.rej -o -name *.bak
-o -name .*.orig -o -name .*.rej -o -name .SUMS
-o -name TAGS -o -name core -o ( -path */.deps/* -a -name *.P )
diff --git a/dh_installman b/dh_installman
index 3882188b..d61a2fa3 100755
--- a/dh_installman
+++ b/dh_installman
@@ -20,9 +20,15 @@ dh_installman is a debhelper program that handles installing
man pages into the correct locations in package build directories. You tell
it what man pages go in your packages, and it figures out where to
install them based on the section field in their .TH line and their filename
-extention. It also supports translated man pages, by looking for extensions
+extension. It also supports translated man pages, by looking for extensions
like .ll.8 and .ll_LL.8
+If dh_installman seems to install a man page into the wrong section or with
+the wrong extension, this is because the man page has thw wrong section
+listed in its .TH line. Edit the man page and correct the section, and
+dh_installman will follow suit. See to L<man(7)> for details about the .TH
+section.
+
Any man page filenames specified as parameters will be installed into the
first package dh_installman is told to act on. By default, this is the
first binary package in debian/control, but if you use -p, -i, or -a flags,
diff --git a/dh_installxfonts b/dh_installxfonts
index 6c699611..3611a8c2 100755
--- a/dh_installxfonts
+++ b/dh_installxfonts
@@ -19,19 +19,26 @@ dh_installxfonts is a debhelper program that is responsible for
registering X fonts, so their corresponding fonts.dir, fonts.alias,
and fonts.scale be rebuilt properly at install time.
-Before calling this program, you should have installed any X fonts
-provided by your package into the appropriate location in the package build
-directory. Also, your package should depend on xbase-clients (>=
-3.3.3.1-5).
+Before calling this program, you should have installed any X fonts provided
+by your package into the appropriate location in the package build
+directory, and if you have fonts.alias or fonts.scale files, you should
+install them into the correct location under etc/X11/fonts in your package
+build directory.
-It automatically generates the postinst and postrm commands needed to
-register X fonts. See L<dh_installdeb(1)> for an explanation of how this
+Your package should should depend on xutils (>= 4.0.3) so that the
+update-fonts-* commands are available.
+
+This programt automatically generates the postinst and postrm commands needed
+to register X fonts. See L<dh_installdeb(1)> for an explanation of how this
works.
=head1 NOTES
-See L<update-fonts-alias(8)>, L<update-fonts-scale(8)>, and L<mkfontdir(1x)>
-for more information about X font installation.
+See L<update-fonts-alias(8)>, L<update-fonts-scale(8)>, and
+L<update-fonts-dir(8)> for more information about X font installation.
+
+See Debian policy, section 12.8.5. for details about doing fonts the Debian
+way.
=cut
@@ -41,28 +48,26 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp=tmpdir($package);
my $XFONTDIR="$tmp/usr/X11R6/lib/X11/fonts/";
- # Find all fint directories in the package build directory.
+ # Find all font directories in the package build directory.
opendir DIR, $XFONTDIR || next;
my @fontdirs = grep { -d "$XFONTDIR/$_" && !/^\./ } (readdir DIR);
closedir DIR;
if (@fontdirs) {
- # Figure out what commands the postinst will need to call.
- my @updatecmds=('makefontdir');
+ # Figure out what commands the postinst and postrm will need
+ # to call.
+ my @cmds;
foreach my $f (@fontdirs) {
- push @updatecmds, 'update-fonts-alias'
+ push @cmds, "update-fonts-dir $f";
+ push @cmds, "update-fonts-alias $f"
if -f "$tmp/etc/X11/fonts/$f/$package.alias";
# This must come _before_ mkfontdir, thus the unshift.
- unshift @updatecmds, 'update-fonts-scale'
+ unshift @cmds, "update-fonts-scale $f"
if -f "$tmp/etc/X11/fonts/$f/$package.scale";
}
autoscript($package, "postinst", "postinst-xfonts",
- "s:#FONTDIRS#:".join(' ', @fontdirs).
- ":;s:#UPDATECMDS#:".join(' ', @updatecmds).":");
- autoscript($package, "postrm", "postrm-xfonts",
- "s:#FONTDIRS#:".join(' ', @fontdirs).
- ":;s:#UPDATECMDS#:".join(' ', @updatecmds).":");
+ "s:#CMDS#:".join("\n", @cmds).":;");
}
}