]> git.donarmstrong.com Git - debhelper.git/commitdiff
r327: * dh_installxaw: Patch from Josip Rodin to update to fhs paths,
authorjoey <joey>
Mon, 20 Dec 1999 20:23:26 +0000 (20:23 +0000)
committerjoey <joey>
Mon, 20 Dec 1999 20:23:26 +0000 (20:23 +0000)
Closes: #53029
debian/changelog
dh_installxaw

index 5e5f6e929c2e0afd4640b845578def6ca6c485e5..95df3100d266f31f0fb5fbf8cf073339a7d03202 100644 (file)
@@ -1,3 +1,10 @@
+debhelper (2.0.81) unstable; urgency=low
+
+  * dh_installxaw: Patch from Josip Rodin to update to fhs paths, 
+    Closes: #53029
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 20 Dec 1999 12:21:34 -0800
+
 debhelper (2.0.80) unstable; urgency=low
 
   * Type fix, Closes: #52652
index 31867f156e67d6a9461a6ee9eb6224d6db4da2cc..bee971091c459efab64e748c8214ba3fa7a9648a 100755 (executable)
@@ -3,11 +3,11 @@
 # Integration with xaw-wrappers
 #
 # If debian/xaw-wrappers file exists, save it to 
-# $TMP/usr/lib/xaw-wrappers/conf/$PACKAGE
+# $TMP/usr/share/xaw-wrappers/config/$PACKAGE
 #
 # Also, add calls to postinst and postrm.
 
-BEGIN { push @INC, "debian", "/usr/lib/debhelper" }
+BEGIN { push @INC, "debian", "/usr/share/debhelper" }
 use Dh_Lib;
 init();
 
@@ -16,14 +16,49 @@ foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
        $xaw=pkgfile($PACKAGE,'xaw');
 
        if ($xaw ne '') {
-               if (! -d "$TMP/usr/lib/xaw-wrappers/conf") {
-                       doit("install","-d","$TMP/usr/lib/xaw-wrappers/conf");
+               if (! -d "$TMP/usr/share/xaw-wrappers/config") {
+                       doit("install","-d","$TMP/usr/share/xaw-wrappers/config");
                }
                doit("install","-p","-m644",$xaw,
-                    "$TMP/usr/lib/xaw-wrappers/conf/$PACKAGE");
+                       "$TMP/usr/share/xaw-wrappers/config/$PACKAGE");
 
                if (! $dh{NOSCRIPTS}) {
-                       autoscript($PACKAGE,"postinst","postinst-xaw");
+                       # Parse the xaw conf file to figure out what programs
+                       # and link names are present in it. Have to pass
+                       # those into the scripts.
+                       my %data;
+                       my $install_opts='';
+                       my $remove_opts='';
+                       my $stanza='';
+                       
+                       open (IN,$xaw);
+                       while (<IN>) {
+                               chomp;
+                               s/\s+/ /g;
+                               if (/^#/ eq '') {
+                                       if (/(.*?):\s?(.*)/) {
+                                               $data{lc($1)}=$2;
+                                               $stanza=1;
+                                       }
+                                       elsif ($stanza) {
+                                               $install_opts.="'$data{program} $data{'link-name'} $data{wrapped}' ";
+                                               $remove_opts.="'$data{'link-name'} $data{wrapped}' ";
+                                               undef %data;
+                                               $stanza='';
+                                       }
+                               }
+                       }
+                       close IN;
+
+                       if ($stanza) {
+                               $install_opts.="'$data{program} $data{'link-name'} $data{wrapped}'";
+                               $remove_opts.="'$data{'link-name'} $data{wrapped}'";
+                       }
+                       
+                       autoscript($PACKAGE,"postinst","postinst-xaw",
+                               "s:#OPTS#:$install_opts:");
+                       autoscript($PACKAGE,"prerm","prerm-xaw",
+                               "s:#OPTS#:$remove_opts:");
                        autoscript($PACKAGE,"postrm","postrm-xaw");
                }
        }