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 use Debian::Debhelper::Dh_Lib;
13 foreach $PACKAGE (@{$dh{DOPACKAGES}}) {
14 $TMP=tmpdir($PACKAGE);
15 $xaw=pkgfile($PACKAGE,'xaw');
18 if (! -d "$TMP/usr/share/xaw-wrappers/config") {
19 doit("install","-d","$TMP/usr/share/xaw-wrappers/config");
21 doit("install","-p","-m644",$xaw,
22 "$TMP/usr/share/xaw-wrappers/config/$PACKAGE");
24 if (! $dh{NOSCRIPTS}) {
25 # Parse the xaw conf file to figure out what programs
26 # and link names are present in it. Have to pass
27 # those into the scripts.
38 if (/(.*?):\s?(.*)/) {
43 $install_opts.="'$data{program} $data{'link-name'} $data{wrapped}' ";
44 $remove_opts.="'$data{'link-name'} $data{wrapped}' ";
53 $install_opts.="'$data{program} $data{'link-name'} $data{wrapped}'";
54 $remove_opts.="'$data{'link-name'} $data{wrapped}'";
57 autoscript($PACKAGE,"postinst","postinst-xaw",
58 "s:#OPTS#:$install_opts:");
59 autoscript($PACKAGE,"prerm","prerm-xaw",
60 "s:#OPTS#:$remove_opts:");
61 autoscript($PACKAGE,"postrm","postrm-xaw");