]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_installwm
Fix typo in French translation, about debian/package.README.Debian files.
[debhelper.git] / dh_installwm
index 31ce63c604733069bff7c9767182613a504b5295..e07b7299a4a212b41f59b9d4f5d1563738bc0cd1 100755 (executable)
@@ -17,7 +17,9 @@ B<dh_installwm> [S<I<debhelper options>>] [B<-n>] [B<--priority=>I<n>] [S<I<wm .
 
 dh_installwm is a debhelper program that is responsible for
 generating the postinst and postrm commands that register a window manager
 
 dh_installwm is a debhelper program that is responsible for
 generating the postinst and postrm commands that register a window manager
-with L<update-alternatives(8)>
+with L<update-alternatives(8)>. The window manager's man page is also 
+registered as a slave symlink (in v6 mode and up), if it is found in 
+usr/share/man/man1/ in the package build directory.
 
 Any window manager programs specified as parameters will be registered in
 the first package dh_installwm is told to act on. By default, this is the
 
 Any window manager programs specified as parameters will be registered in
 the first package dh_installwm is told to act on. By default, this is the
@@ -46,14 +48,14 @@ Do not modify postinst/postrm scripts. Turns this command into a no-op.
 The commands used to run the window manager or window managers you want to
 register.
 
 The commands used to run the window manager or window managers you want to
 register.
 
+=back
+
 =head1 NOTES
 
 =head1 NOTES
 
-Note that this command is not idempotent. "dh_clean -k" should be called
+Note that this command is not idempotent. L<dh_prep(1)> should be called
 between invocations of this command. Otherwise, it may cause multiple
 instances of the same text to be added to maintainer scripts.
 
 between invocations of this command. Otherwise, it may cause multiple
 instances of the same text to be added to maintainer scripts.
 
-=back
-
 =cut
 
 init();
 =cut
 
 init();
@@ -64,14 +66,14 @@ if (! defined $dh{PRIORITY}) {
 
 if (@ARGV) {
        # This is here for backwards compatibility. If the filename doesn't
 
 if (@ARGV) {
        # This is here for backwards compatibility. If the filename doesn't
-       # include a path, assume it's in /usr/X11R6/bin.
+       # include a path, assume it's in /usr/bin.
        if ($ARGV[0] !~ m:/:) {
        if ($ARGV[0] !~ m:/:) {
-               $ARGV[0]="/usr/X11R6/bin/$ARGV[0]";
+               $ARGV[0]="/usr/bin/$ARGV[0]";
        }
 }
 
 foreach my $package (@{$dh{DOPACKAGES}}) {
        }
 }
 
 foreach my $package (@{$dh{DOPACKAGES}}) {
-#      my $tmp=tmpdir($package);
+       my $tmp=tmpdir($package);
        my $file=pkgfile($package,"wm");
 
        my @wm;
        my $file=pkgfile($package,"wm");
 
        my @wm;
@@ -84,9 +86,20 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        }
 
        if (! $dh{NOSCRIPTS}) {
        }
 
        if (! $dh{NOSCRIPTS}) {
-               foreach (@wm) {
-                       autoscript($package,"postinst","postinst-wm","s:#WM#:$_:;s/#PRIORITY#/$dh{PRIORITY}/",);
-                       autoscript($package,"prerm","prerm-wm","s:#WM#:$_:");
+WM:            foreach my $wm (@wm) {
+                       autoscript($package,"prerm","prerm-wm","s:#WM#:$wm:");
+
+                       my $wmman;
+                       if (! compat(5)) {
+                               foreach my $ext (".1", ".1x") {
+                                       $wmman="/usr/share/man/man1/".basename($wm).$ext;
+                                       if (-e "$tmp$wmman" || -e "$tmp$wmman.gz") {
+                                               autoscript($package,"postinst","postinst-wm","s:#WM#:$wm:;s:#WMMAN#:$wmman.gz:;s/#PRIORITY#/$dh{PRIORITY}/",);
+                                               next WM;
+                                       }
+                               }
+                       }
+                       autoscript($package,"postinst","postinst-wm-noman","s:#WM#:$wm:;s/#PRIORITY#/$dh{PRIORITY}/",);
                }
        }
 }
                }
        }
 }