]> git.donarmstrong.com Git - debhelper.git/commitdiff
r503: * dh_installman: more documentation about the .TH line. Closes: #129205
authorjoey <joey>
Sun, 27 Jan 2002 00:25:37 +0000 (00:25 +0000)
committerjoey <joey>
Sun, 27 Jan 2002 00:25:37 +0000 (00:25 +0000)
   * 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.

autoscripts/postinst-xfonts
autoscripts/postrm-xfonts
debian/changelog
dh_clean
dh_installman
dh_installxfonts

index af02e1248c16cae9048f498119544c1583e3a494..4c5ab1b8f0d7d0d332815db3ee41534711a76376 100644 (file)
@@ -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
index 29cec43590754312e11bd10e3c2972d7ca172a93..a9afcabecfc852ecd5df3ee016e20f46aa1f4b88 100644 (file)
@@ -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
index a009e1e0e5ee1e7e718927c2d57217556932b87f..ebe4eef314a3f04e6098639d3401d7568d33d1d5 100644 (file)
@@ -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
index 6e482118e385fb6a62b8157b08926856928af4c7..095844aa5aef59c00f0f3db17cb0c9576c4d2aa5 100755 (executable)
--- 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 )
index 3882188b36d21d67c7f1e67b664467f3aae53a1b..d61a2fa3240e24e5d4f8164a45e74682536a367e 100755 (executable)
@@ -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,
index 6c699611b4b152bb88c2e64a20e3214815c726ae..3611a8c2ec80ead94b8f56b2a207a3eb38b022a5 100755 (executable)
@@ -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).":;");
        }
 }