3 # Integration with xaw-wrappers
5 # If debian/xaw-wrappers file exists, save it to
6 # $TMP/usr/share/xaw-wrappers/config/$PACKAGE
8 # Also, add calls to postinst and postrm.
10 BEGIN { push @INC, "debian", "/usr/share/debhelper" }
14 foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
15 $TMP=tmpdir($PACKAGE);
16 $xaw=pkgfile($PACKAGE,'xaw');
19 if (! -d "$TMP/usr/share/xaw-wrappers/config") {
20 doit("install","-d","$TMP/usr/share/xaw-wrappers/config");
22 doit("install","-p","-m644",$xaw,
23 "$TMP/usr/share/xaw-wrappers/config/$PACKAGE");
25 if (! $dh{NOSCRIPTS}) {
26 # Parse the xaw conf file to figure out what programs
27 # and link names are present in it. Have to pass
28 # those into the scripts.
39 if (/(.*?):\s?(.*)/) {
44 $install_opts.="'$data{program} $data{'link-name'} $data{wrapped}' ";
45 $remove_opts.="'$data{'link-name'} $data{wrapped}' ";
54 $install_opts.="'$data{program} $data{'link-name'} $data{wrapped}'";
55 $remove_opts.="'$data{'link-name'} $data{wrapped}'";
58 autoscript($PACKAGE,"postinst","postinst-xaw",
59 "s:#OPTS#:$install_opts:");
60 autoscript($PACKAGE,"prerm","prerm-xaw",
61 "s:#OPTS#:$remove_opts:");
62 autoscript($PACKAGE,"postrm","postrm-xaw");