summaryrefslogtreecommitdiff
path: root/dh_installxfonts
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 /dh_installxfonts
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.
Diffstat (limited to 'dh_installxfonts')
-rwxr-xr-xdh_installxfonts41
1 files changed, 23 insertions, 18 deletions
diff --git a/dh_installxfonts b/dh_installxfonts
index 6c69961..3611a8c 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).":;");
}
}