From 4f577ba14b2e6e8571246717a1eec408c9b618ae Mon Sep 17 00:00:00 2001 From: joey Date: Sun, 27 Jan 2002 00:25:37 +0000 Subject: 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. --- dh_installxfonts | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) (limited to 'dh_installxfonts') 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 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 for an explanation of how this works. =head1 NOTES -See L, L, and L -for more information about X font installation. +See L, L, and +L 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).":;"); } } -- cgit v1.2.3