]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_installxaw
r538: * Make dh_installchangelogs install debian/NEWS files as well, as
[debhelper.git] / dh_installxaw
index 5cb94e248c476eba15a61ddd6a1103360bee45ae..17321834bf10818793b8a241544ebdf90f7b32bc 100755 (executable)
@@ -1,25 +1,65 @@
 #!/usr/bin/perl -w
-#
-# Integration with xaw-wrappers
-#
-# If debian/xaw-wrappers file exists, save it to 
-# $TMP/usr/share/xaw-wrappers/config/$PACKAGE
-#
-# Also, add calls to postinst and postrm.
 
+=head1 NAME
+
+dh_installxaw - install xaw wrappers config files into package build directories
+
+=cut
+
+use strict;
 use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_installxaw> [S<I<debhelper options>>] [B<-n>]
+
+=head1 DESCRIPTION
+
+Warning: The xaw-wrappers package has been removed from debian, and so this
+program is deprecated, and due to be removed soon.
+
+dh_installxaw is a debhelper program that is responsible for installing
+xaw wrappers config files into package build directories.
+
+It also automatically generates the postinst, prerm, and postrm commands
+needed to interface with the debian xaw-wrappers package. See
+L<dh_installdeb(1)> for an explanation of how this works.
+
+If a file named debian/package.xaw exists, then it is installed into
+usr/lib/xaw-wrappers/config/package in the package build directory.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-n>, B<--noscripts>
+
+Do not modify postinst/prerm/postrm scripts.
+
+=back
+
+=head1 NOTES
+
+Note that this command is not idempotent. "dh_clean -k" should be called
+between invocations of this command. Otherwise, it may cause multiple
+instances of the same text to be added to maintainer scripts.
+
+=cut
+
 init();
 
-foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
-       $TMP=tmpdir($PACKAGE);
-       $xaw=pkgfile($PACKAGE,'xaw');
+warning("The xaw-wrappers package has been removed from debian, and so this program is deprecated, and due to be removed soon.");
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+       my $tmp=tmpdir($package);
+       my $xaw=pkgfile($package,'xaw');
 
        if ($xaw ne '') {
-               if (! -d "$TMP/usr/share/xaw-wrappers/config") {
-                       doit("install","-d","$TMP/usr/share/xaw-wrappers/config");
+               if (! -d "$tmp/usr/share/xaw-wrappers/config") {
+                       doit("install","-d","$tmp/usr/share/xaw-wrappers/config");
                }
                doit("install","-p","-m644",$xaw,
-                       "$TMP/usr/share/xaw-wrappers/config/$PACKAGE");
+                       "$tmp/usr/share/xaw-wrappers/config/$package");
 
                if (! $dh{NOSCRIPTS}) {
                        # Parse the xaw conf file to figure out what programs
@@ -54,11 +94,23 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
                                $remove_opts.="'$data{'link-name'} $data{wrapped}'";
                        }
                        
-                       autoscript($PACKAGE,"postinst","postinst-xaw",
+                       autoscript($package,"postinst","postinst-xaw",
                                "s:#OPTS#:$install_opts:");
-                       autoscript($PACKAGE,"prerm","prerm-xaw",
+                       autoscript($package,"prerm","prerm-xaw",
                                "s:#OPTS#:$remove_opts:");
-                       autoscript($PACKAGE,"postrm","postrm-xaw");
+                       autoscript($package,"postrm","postrm-xaw");
                }
        }
 }
+
+=head1 SEE ALSO
+
+L<debhelper(1)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Joey Hess <joeyh@debian.org>
+
+=cut