]> git.donarmstrong.com Git - debhelper.git/commitdiff
r202: Initial Import
authorjoey <joey>
Tue, 17 Aug 1999 05:13:35 +0000 (05:13 +0000)
committerjoey <joey>
Tue, 17 Aug 1999 05:13:35 +0000 (05:13 +0000)
autoscripts/postinst-xaw
debian/changelog
dh_installxaw
dh_installxaw.1

index b8d718ea40189f5fb795db0693c8a7f207b99902..3d8e2d1ba5ba2157661c27aebaa8eb2b186fca6a 100644 (file)
@@ -1,3 +1,6 @@
 if test -x /usr/sbin/update-xaw-wrappers; then
        /usr/sbin/update-xaw-wrappers
 fi
+for opts in #OPTS#; do
+       update-alternatives --quiet --install $opts 25
+done   
index 61ce4b36d07618a66c953fec9174411ab8c44e42..2938e7c0429daf8af5158f2ae8e38055b252067d 100644 (file)
@@ -1,3 +1,10 @@
+debhelper (1.2.63) unstable; urgency=low
+
+  * dh_installxaw: updated to work with xaw-wrappers 0.90 and above. It
+    actually has to partially parse the xaw-wrappers config files now. 
+
+ -- Joey Hess <joeyh@master.debian.org>  Sun,  2 May 1999 19:13:34 -0700
+
 debhelper (1.2.62) unstable; urgency=low
 
   * dh_installemacsen: added support for site-start files. Added --flavor
index 31867f156e67d6a9461a6ee9eb6224d6db4da2cc..849fbf00c62c267d733e5fcb2642ada7aa77a246 100755 (executable)
@@ -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/lib/xaw-wrappers/config") {
+                       doit("install","-d","$TMP/usr/lib/xaw-wrappers/config");
                }
                doit("install","-p","-m644",$xaw,
-                    "$TMP/usr/lib/xaw-wrappers/conf/$PACKAGE");
+                       "$TMP/usr/lib/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");
                }
        }
index 19f474234c8a3535028389c0acc41414c3796f0b..b0a82bb2724a6ae9716c78b40fd4fb20d0d37fbb 100644 (file)
@@ -14,7 +14,7 @@ interface with the debian xaw-wrappers package. See
 for an explanation of how this works.
 .P
 If a file named debian/package.xaw exists, then it is installed into
-usr/lib/xaw-wrappers/conf/package in the package build directory.
+usr/lib/xaw-wrappers/config/package in the package build directory.
 .P
 For the first first binary package listed in the control file, you may use
 debian/xaw instead.